From owner-freebsd-questions Sat Dec 23 17:54:09 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA10787 for questions-outgoing; Sat, 23 Dec 1995 17:54:09 -0800 (PST) Received: from Aspen.Woc.Atinc.COM ([198.138.38.205]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA10627 for ; Sat, 23 Dec 1995 17:52:18 -0800 (PST) Received: (from jmb@localhost) by Aspen.Woc.Atinc.COM (8.6.12/8.6.9) id UAA23692; Sat, 23 Dec 1995 20:50:30 -0500 Date: Sat, 23 Dec 1995 20:50:29 -0500 (EST) From: "Jonathan M. Bresler" X-Sender: jmb@Aspen.Woc.Atinc.COM To: Bill Henderson cc: questions@freebsd.org Subject: Re: HARD DISK COPY ? help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk On Sat, 23 Dec 1995, Bill Henderson wrote: > Could someone give me directions on how to create a stand alone boot floppy with > the nessary > exe's to do a disk image or copy from one disk to another ? or should I use the dump util ? > > I really need help on how to do this here is a little script that i have used. you may have to modify it to get it working in your enviroment. it uses a kernel called MINI for instance. you may need to remove some binaries as well, depending upon what you want/need. best of luck Jonathan M. Bresler FreeBSD Postmaster jmb@FreeBSD.ORG play go. ride bike. hack FreeBSD.--ah the good life i am moving to a new job. PLEASE USE: jmb@FreeBSD.ORG #!/bin/sh # # create a fixit floppy # # alternate method suggested by joerg_wunsch@uriah.heep.sax.de # Floppy 1: # # disklabel -r -w -B fd0 fd1200 # newfs -t 2 -u 15 -i 65536 -l 1 /dev/rfd0a # mount /dev/fd0a /mnt # cp custom.kernel /mnt/kernel # umount /mnt # # Floppy 2: # # the regular boot.flp # # After the kernel has been loaded (perhaps with -c to give you a "safe" # time window), swap the floppies. # # # # create a bootable floppy # # # format the floppy # # /usr/sbin/fdformat -q fd0 # place boot block on the floppy # disklabel -w -B -b /usr/mdec/fdboot -s /usr/mdec/bootfd /dev/rfd0c fd1440 # # newfs the one and only partition # /sbin/newfs -t 2 -u 18 -l 1 /dev/rfd0a # # mount the new floppy # /sbin/mount /dev/fd0a /mnt # # create required directories # mkdir /mnt/dev mkdir /mnt/bin mkdir /mnt/sbin mkdir /mnt/etc mkdir /mnt/root mkdir /mnt/mnt # for the root partition mkdir /mnt/tmp # needed ?? mkdir /mnt/var # needed ?? # mkdir -p /mnt/usr/share/misc # # populate the directories # cp -f /sys/compile/MINI/kernel /mnt gzip -c -best /sbin/init > /mnt/sbin/init gzip -c -best /sbin/fsck > /mnt/sbin/fsck gzip -c -best /sbin/mount > /mnt/sbin/mount gzip -c -best /sbin/umount > /mnt/sbin/umount # gzip -c -best /sbin/shutdown > /mnt/sbin/shutdown gzip -c -best /sbin/halt > /mnt/sbin/halt gzip -c -best /sbin/restore > /mnt/sbin/restore gzip -c -best /bin/sh > /mnt/bin/sh gzip -c -best /bin/sync > /mnt/bin/sync # gzip -c -best /bin/ls > /mnt/bin/ls # cp -f termcap /mnt/usr/share/misc/termcap cp /root/.profile /mnt/root cp -f /dev/MAKEDEV /mnt/dev chmod 500 /mnt/sbin/init chmod 555 /mnt/sbin/fsck /mnt/sbin/mount /mnt/sbin/umount # chmod 4550 /mnt/sbin/shutdown chmod 555 /mnt/sbin/halt chmod 6555 /mnt/sbin/restore chmod 555 /mnt/bin/sh /mnt/bin/sync /mnt/bin/ls # chmod 444 /mnt/usr/share/misc/termcap # # create the devices nodes # cd /mnt/dev ./MAKEDEV std # ./MAKEDEV wd0 # ./MAKEDEV wd1 ./MAKEDEV sd0 ./MAKEDEV sd1 ./MAKEDEV pty0 # needed ?? cd / # # create minimum filesystem table # cat > /mnt/etc/fstab < /mnt/etc/passwd < /mnt/etc/master.passwd <