From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 9 11:14:18 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id CF89137B401; Mon, 9 Jun 2003 11:14:18 -0700 (PDT) Date: Mon, 9 Jun 2003 13:14:18 -0500 From: Juli Mallett To: Joshua Oreman Message-ID: <20030609131418.A85608@FreeBSD.org> References: <23893.209.236.210.66.1055178986.squirrel@mail.romero3000.com> <20030609180452.GJ61917@pun.isi.edu> <20030609181132.GC85429@webserver.get-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030609181132.GC85429@webserver.get-linux.org>; from oremanj@webserver.get-linux.org on Mon, Jun 09, 2003 at 11:11:32AM -0700 X-Title: Code Maven X-Towel: Yes X-Negacore: Yes X-Authentication-Warning: localhost: juli pwned teh intarweb cc: hackers@freebsd.org cc: Ted Faber Subject: Re: ramdisk?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2003 18:14:19 -0000 * Joshua Oreman [ Date: 2003-06-09 ] [ w.r.t. Re: ramdisk?? ] > On Mon, Jun 09, 2003 at 11:04:52AM -0700 or thereabouts, Ted Faber seemed to write: > > On Mon, Jun 09, 2003 at 01:16:26PM -0400, romero3000@romero3000.com wrote: > > > (sorry about cross-posting this question. not sure which list is better) > > > > > > I want to to know how to create a ram file system for /var and /tmp so > > > that i can boot from flash memory and mount those two file systems on > > > ramfs. I've looked for howto's online but haven't found anything. any > > > suggestions???? > > > > On CURRENT: > > You mean -stable, don't you? > > > > > man vnconfig > > man vn > > > > I mount a swap backed fs (which I what I suspect you want) with: > > > > vnconfig -e -s labels -S ${vn_tmp_size} ${vn_tmp_device} && \ > > disklabel -r -w ${vn_tmp_device} auto && \ > > newfs /dev/${vn_tmp_device}c > /dev/null && \ > > mount -o nosuid -o nodev /dev/${vn_tmp_device}c /tmp && \ > > chmod 1777 /tmp > > > > N.B. I don't reserve the blocks on swap, which again is what I think you > > want. > > On -current: > > man mdconfig > man md > > How to do the above: > > vn_tmp_device=`mdconfig -a -t swap -s ${vn_tmp_size}m` && > disklabel -r -w ${vn_tmp_device} auto && \ > newfs /dev/${vn_tmp_device} >/dev/null && \ > mount -o nosuid,nodev /dev/${vn_tmp_device} /tmp && \ > chmod 1777 /tmp > > Replace ${vn_tmp_size} with the size of the disk, in Mb. Or if you don't need a disklabel and all that, you could just look at using mount_mfs and fstab entries outright. See the appropriate manual pages. -- juli mallett. email: jmallett@freebsd.org; efnet: juli;