[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: making the floppy without rebooting



On Sun, Sep 19, 1999 at 04:21:31PM -0400, John Tobey wrote:
> I'm working on a script based on Marcus's ``how to make a boot disk
> (part I)''

Great! Thank you very much, this script will be very helpful!

> My hope is to have it create the boot disk under Linux without
> requiring a reboot.

I hope we will also be able to create it under the Hurd, but don't worry
about that yet (at least not before we have updated GRUB so /sbin/grub works
under the Hurd).

>  The resulting disk boots goes fine until this:
> 
>   Hit return to resume /hurd/ext2fs.static.gz<RET>
>   /hurd/ext2fs.static.gz: fd0: Invalid argument
> 
> Was I supposed to insert the root disk when it asked for a return?

Indeed. Did the error message appear instantly or did e2fs load the disk
before giving the error message? It should load in the whole disk, then run
bunzip2 on it and use it as a root file system (not your disk, of course,
but the fictional root disk). Maybe you got the message because bunzip2
fialed (for obvious reasons).

> Perhaps my script corrupts the floppy filesystem with dd, grub, and/or
> failing to sync at the right times.

> fd=/dev/fd0
> floppy=/floppy
> gnu=/gnu

Can you add argument parsing (including --help and other conventional
stuff)?
 
> #test -f /usr/share/grub/i386-pc/stage2 || ( apt-get install grub )

Probably give an error message instead automatical installation (with
apt-get, those fancy features get too easy, it seems :)

> dd if=/dev/zero of=$fd bs=1k count=1440 || exit 1

Are you checking for errors? Then the -c option to mke2fs may be better.

> mke2fs -N 32 -o hurd $fd
> mount $fd $floppy
> mkdir $floppy/boot
> cp $gnu/boot/gnumach.gz $gnu/boot/serverboot.gz $floppy/boot/

Remember what Roland said about creating a loop file system and then dumping
the whole thing on the floppy. This may be a lot faster.
 
The rest looks fine, thanks!
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org  Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de                        PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/


Reply to: