(no subject) [GRUB boot problems]

Phil Schaffner Philip.R.Schaffner at NASA.gov
Wed Jan 14 15:00:44 UTC 2004


On Tue, 2004-01-13 at 10:53, Paolo wrote:
> Phil Schaffner said:
> > On Tue, 2004-01-13 at 03:42, Paolo wrote:
> >Snip<
> >
> > Have seen a number of cases where the BIOS disk mapping does not match
> > what the running system sees.  This seem to happen particularly with
> > RAID controllers and/or SCSI controllers mixed with IDE.  Try making a
> > grub boot floppy on a working system and doing a "find /grub/stage1" (or
> > "find /boot/grub/stage1" if you do not have a /boot partition) and find
> > out what grub sees as (hdM) and (hdM,N) where M=[disk 0, 1, etc.] and
> > N=[partition 0, 1, ...].  You should be able to boot the system from the
> > floppy once you figure it out.
> 
> I'm sorry but I don't think I understand what you mean here.
> I can boot the machine with the fedora cd,
> linux rescue
> and then
> chroot /mnt/sysimage
> 
> So I can enter in the /grub partition and... ?
> Do you want me to open the stage1 file ?

Looks like quite a lot went on in this thread while I was off doing what
they pay me for :-) but still no resolution.

>From "info grub":
-------------------------------------------------------------------------
Creating a GRUB boot floppy
===========================

   To create a GRUB boot floppy, you need to take the files `stage1'
and `stage2' from the image directory, and write them to the first and
the second block of the floppy disk, respectively.

   *Caution:* This procedure will destroy any data currently stored on
the floppy.

   On a UNIX-like operating system, that is done with the following
commands:

     # cd /usr/share/grub/i386-pc
     # dd if=stage1 of=/dev/fd0 bs=512 count=1
     1+0 records in
     1+0 records out
     # dd if=stage2 of=/dev/fd0 bs=512 seek=1
     153+1 records in
     153+1 records out
     #

   The device file name may be different. Consult the manual for your
OS.
-------------------------------------------------------------------------

I can also e-mail you directly with a compressed grub floppy image,
and/or a script to create a grub floppy with menu support, if it would
help.

After booting from the grub floppy you should be able to run "find
/grub/stage1" and see what disk/partition it is on.  If my guess is
correct that you have a problem with mapping to a different device at
boot time then the session might look like this:

	grub> find /grub/stage1		# what you type at prompt
	(hd1,1)				# what grub finds

You would have expected (hd0,1) if everything mapped the same on the
boot as the installer or running system.

Can also try to find other known system files to verify what grub sees
as the other partitions, for example:

	grub> find /etc/fstab
	(hd1,2)


Then boot to the recovery mode as you mention above.  Look at the
/mnt/sysimage/boot/grub/device.map file (not in chroot mode) created
from Anaconda and see how well it matches what grub sees booting from
the floppy.  You can also run grub at the recovery command line
with/without the "--device-map=/mnt/sysimage/boot/grub/device.map"
switch and try the "find" commands as above.  If everything is the same,
then I'm clueless.  If they differ, send the results from the
floppy-boot grub and the rescue grub for further advice.


> 
> > You may find that the floppy boot sees different mappings than the
> > installation saw, or that the running system will see if/when you get it
> > to boot.  Use /boot/grub/device.map to get consistent results after you
> > figure out the mapping.  When running grub from the command line when
> > the system is up, use "grub --device-map=/boot/grub/device.map" and do
> > finds similar to above to verify the mapping.  Once you have it right,
> > you should be able to do something like:
> > 	# grub --device-map=/boot/grub/device.map
> > 	grub> root(hd0,1)
> > 	grub> setup (hd0)
> > 	grub> quit
> >
> > Good luck - this is a trial-and-error process in my experience on
> > systems where the grub disk ordering changes between boot-time and
> > running system.
> 
> Well,
> thanks a lot for your answer!

OK - FWIW

Phil







More information about the fedora-list mailing list