From owner-freebsd-questions Fri May 21 7:53:35 1999 Delivered-To: freebsd-questions@freebsd.org Received: from moe.nycrc.net (gabriel.nycrc.net [209.73.202.66]) by hub.freebsd.org (Postfix) with SMTP id 0492B1516C for ; Fri, 21 May 1999 07:53:30 -0700 (PDT) (envelope-from vince@moe.nycrc.net) Received: (qmail 9979 invoked by uid 1000); 21 May 1999 14:53:41 -0000 Date: Fri, 21 May 1999 10:53:40 -0400 From: Vince Gonzalez To: Lukas Ruf Cc: FreeBSD Questions Subject: Re: Boot Disk Message-ID: <19990521105340.A9909@moe.nycrc.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Lukas Ruf on Fri, May 21, 1999 at 09:27:25AM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, May 21, 1999 at 09:27:25AM +0200, Lukas Ruf wrote: > Hi all, > > does a DOCUMENTATION on how to create a BOOT FLOPPY DISK exist anywhere? > > Any points and hints are gratefully appreciated. Here goes... From /etc/disktab: # To make a filesystem on a floppy: # fdformat [-f ] fd[.] # disklabel -B -r -w fd[.] fd # newfs fd[.] Mount it, and copy a kernel there. You may need to gzip it first, be sure to call gzip with the -9 option. Copy the entire /boot directory to your new floppy. (I'm pretty sure you can do this without problems; anyone?) You'll notice that after you copy your kernel and the boot directory there isn't a whole lot of space left. You'll need an MFS root floppy. So create a file in /boot (on your floppy) called loader.rc that contains something like this: load /kernel echo Insert MFS root floppy and press enter: read load -t mfs_root /mfsroot boot Then repeat the fdformat,disklabel,newfs steps on a new floppy. Make sure your running kernel has vn(4) support. Do this: dd if=/dev/zero of=my.new.mfs.root count=5760 This will create a 2880k file. Since you've recompiled your kernel with vn(4) support, you can do this: vnconfig /dev/vn0 my.new.mfs.root And then this: newfs /dev/vn0 minimum2 minimum2 is defined in /etc/disktab by the way. Now mount your new mfs root. mount /dev/vn0 /mnt Now put stuff on the filesystem you just mounted. When you think you're done, unmount the vn device and gzip -9 my.new.mfs.root. I prefer to use gzip as a filter in this case since it's annoying to compress and decompress the file all the time. However you do it, put the gzip'd file on your new mfs root fs. Populating your mfsroot is the hard part. You should now have a bootable kernel floppy and mfs root floppy. I have some images of these if you're interested, but wouldn't doing it yourself be more fun? :) BTW, if you need to do more than just boot and run a shell and ls, you'll need to recompile most of the stock programs to use shared libraries. I'm sure someone will let us know if I got anything wrong. :) -- vince@nycrc.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message