bug-grub
[Top][All Lists]
Advanced

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

Re: Installing GRUB to flash bootdisk...


From: Jochen Hoenicke
Subject: Re: Installing GRUB to flash bootdisk...
Date: Fri, 29 Jun 2001 10:11:35 +0200

On Jun 28, Eric Peterson wrote:
> 
> I'm trying to load GRUB onto a flash boot disk (being treated by the
> BIOS as a floppy drive).  Although I can successfully burn a Linux
> bzImage to the flash (with a minor modification to give it a DOS-like
> BPB) and boot it, doing similar things with GRUB has me stumped.  
>
> Here's the basic procedure I'm using:
> 
>     mke2fs /dev/fd0               # Build the fs
>     mount /dev/fd0 /mnt/floppy
>     cp bzImage /mnt/floppy        # my kernel
> 
>     mkdir /mnt/floppy/boot/grub
>     cp /boot/grub/* /mnt/floppy/boot/grub   # Bring in GRUB stuff
>     
>     grub --batch <<EOF
>     device (fd0) /dev/fd0   # Not sure if this is necessary
>     root (fd0)
>     install (fd0)/boot/grub/stage1 (fd0) (fd0)/boot/grub/e2fs_stage1_5 
> (fd0)/boot/grub/stage2
>     quit
>     EOF

You shouldn't use e2fs_stage1_5 when installing to floppy.  It doesn't
make sense to use stage1_5 if it can't be embedded into a safe place.

This is probably not your problem though.

Grub uses the geometry provided by the BIOS (INT13h AH=8) to do the
cylinder/head/sector translation.  If the BIOS provides a bogus
geometry, grub doesn't work.

I have a patch against a recent CVS version of grub that can be used
to force grub to use the information from the BPB instead.  You still
have to provide a correct BPB yourself.  The patch is at
http://www.informatik.uni-oldenburg.de/~delwi/grub/

  Jochen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]