Click to See Complete Forum and Search --> : Grub boot Floppy Problem


DR1947
07-05-2004, 08:33 PM
I am trying to install Grub as my boot loader. When I dd the stage1 file to floppy all is well The system returns

dd if=stage1 of=/dev/fd0 bs=512 count=1
1+0 records in
1+0 records out

However when I dd the state2 file I get

dd if=stage2 of=/dev/fd0 bs=512 seek=1
203+1 records in
203+1 records out

The Grub manual indicates i should see
dd if=stage2 of=/dev/fd0 bs=512 seek=1
153+1 records in
153+1 records out

I may have added a second kernel to my system since it appears to have a couple of config files in the /boot directory.

config-2.4.22-1.2115.nptl
config-2.4.22-1.2194.nptl

There are matching intrd, vmlinux, vmlinuz

When I attemp to boot with the grub boot floppy I get this error

Gbub Loading Stage2Geom Error.

The is the file:/boot/grub config file if it helps

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2194.nptl)
root (hd1,0)
kernel /vmlinuz-2.4.22-1.2194.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2194.nptl.img
title Fedora Core (2.4.22-1.2115.nptl)
root (hd1,0)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img
title DOS
rootnoverify (hd0,0)
chainloader +1




I woule like to get Grub into the MBR so I can get to my latest kernel I am booting with a Fedora Core1 boot floppy so I am not getting the latest kernel

Thanks in advance for any help

saikee
07-06-2004, 08:13 AM
Think I have made Grub floppies with FC2 and Suse. Knew the numbers were different each time from the book. Do we not expect a different length of Stage2 each time Grub is revised? Never mess around with the original dd arrangement and my Grub disks boot fine.

If you know the location of the menu.lst file (usually in /boot/grub) on boot up to Grub prompt the command

configfile (hd1,0)/boot/grub/menu.lst

will boot the system up if your Linux is in the second hdd and 1st partition, as suggested by your FC2 configuration.

I am only 2.5 weeks into Linux and don't have a clue on how to play with the kernel yet but Grub has got 4 Linux systems co-exist with my XP so far.

DR1947
07-07-2004, 08:20 AM
Thanks for the reply. I was not worried about the numbers being different as much as I was about the floppy not booting up the PC. Thought the numbers might be a clue. Copying the files was to create a Grub Boot Floppy so I could then get grub into the MBR and boot my Linux on hdb or Windoze on hda. Synaptic says that Grub is installed so I just need to get the correct stuff written to the MBR to boot up. Synaptic also sails LILO is installed. I would be happy to use LILO if I can get it to install to the MBR.

saikee
07-07-2004, 09:37 AM
Your information is a bit confusing.

The way I understand is that you have Windows on the first HDD known as hda1 by Linux and you put Fedora Core 2 in a second HDD known to Linux as the hdb1.

I think FC2 may allow you to select either Grub or Lilo as the bootloader. The configuration file you posted would suggest Grub has been utilised. Thus Lilo should be history and no need to discuss it any further.

If the system has been installed correctly Grub would have moved into the MBR of hda permanently and manages the booting for both Windows and FC2.

Don’t know how you did it your system should be bootable with

(1) Fedora Core (2.4.22-1.2194.nptl)

(2) Fedora Core (2.4.22-1.2115.nptl)

(3) DOS

The last one could be Windows according to your description.

However if the system fails to work you can get your Windows back by using Windows CD’s Recovery Console command prompt “fixmbr”.

If you can’t get back to FC2 then you can boot the computer up with a Grub boot disk.

As far as I am aware a Grub boot disk only has stage1 and stage2 files in it and that is all it can put inside the MBR. Thus you only get a command prompt after booting Grub and nothing else.

My last post on using one line of instruction at Grub command prompt

Configfile (hd1,0)/boot/grub/menu.lst

has been tried on FC2, Suse and Mandrake (change partition number as needed) and it works every time.

I have FC2, Suse and Mandrake stored in the same hard disk but any of them can be called up by one Grub floppy with “configfile” which is a command within Grub. The menu.lst in my case is your configuration file posted here. If Suse follows Fc2 and Mandrake is the last I will need to address their partitions as (hd1,0), (hd1,1) and (hd1,2) respectively.

Grub counts from zero and Linux starts with 1 so in the Grub’s configuration file

Grub (hd1,0)=hdb1 in Linux
Grub (hd0,0)=hda1 in Linux and so on

Hope the above helps

DR1947
07-08-2004, 02:46 PM
saikee again thanks for the reply.

You are correct Win 2K is on the first hard disk Fedora is on the second. When I did the original install I wanted Grub to install to the MBR. There was some error, it was so long ago I do not remember the error. At any rate if memory serves the MBR was fouled up and I need to use my Window recovery disks to fix the MBR. So I could get to windows. I made boot floppy during this install.

So I boot to windows if no floppy is installed and Linux if I use a Fedora core 1 boot floppy. At least I can get to both Operating systems.

I tried to reinstall Fedora and put Grub into the MBR, now the message is "no changes are made ". So I still need a floppy to boot it Linux. Grub never show up during a boot process.

The floppy I created when I dd the stage1 and stage2 files returns the error I mentioned earlier.
Grub Loading Stage2Geom Error. From what I have read this means grub does not find something where it expected to find it. I do not get grub> promt

I would like to get a boot loader to allow booting either OS and not need the floppy except for emeregencys Any Ideas since I can not seem to get a working Grub boot disk.

saikee
07-08-2004, 07:40 PM
DR1947,

OK I think your situation is that in order to use FC1 the floppy will boot it up for you. Without the floppy the PC boots to Windows.

The command you need to put Grub into MBR is just

grub-instal /dev/hda

You must do it as a root user. The hda means 1st HDD resided by Windows. No unmber after hda mean the whole HDD and that is for MBR.

Your original menu.lst posted here has no boot entry for Windows but the one title "DOS" is the one. You can edit DOS back to Wibdows in FC1 with an editor if you like. To get it boot to floppy drive repeat the same three lines for the Windows but change (hd0,0) to (fd0).

You should be able to get your FC1 back. Have a look at my signature. There is information useful for you there. If I can jump around between 4 Linux and a XP there is no reason why can't you do the same.