Re: GRUB boot floppy creation

From: Leonard Evens (len_at_math.northwestern.edu)
Date: 01/31/05


Date: Sun, 30 Jan 2005 18:42:57 -0600

thufir wrote:
> I can't boot into Fedora linux, only win2k, on a dual boot system. I
> don't want to effect the MBR or similar on the hard drive, therefore I
> want to create a GRUB boot floppy.
> <http://grub4dos.sourceforge.net/wingrub_examples.html#q2> describes
> how to do this, but I have some question. based on
> <http://grub4dos.sourceforge.net/wingrub.html#q4> my values for the
> grub list manager:
>
> Key p12
> Desc p12 dsk eng (nsfS)
> path C:\grubStuff\
> or
> path A:\
>
> clicking on "system" has no effect, while "output" simply brings up a
> browse list of directory's to change the path. Where's the step to
> actually create the boot floppy, please?
>
>
> thanks,
>
> Thufir Hawat
>

The following should work. Boot into rescue mode from the Fedora CD.
As indicated do chroot /mnt/sysimage.

Put a floppy disk in the floppy drive.

Do
dd if=/usr/share/grub/i386*/stage1 /dev/fd0 bs=512 count=1
dd if=/usr/share/grub/i386*/stage2 /dev/fd0 seek=1

You can then boot into native grub from that floppy.

Having done that, in grub do

grub> root (xxx,y)
where xxx is the disk containing your linux and y represents the partion
on which /boot gets mounted. But remember grub counts from 0. So if
you have only one disk, and /boot gets mounted on the second primary
partition, use root (hd0,1)

If you have had grub installed by the Fedora installation file, there
should be relevant files in /boot/grub. Try

grub> configfile (xxx,y)/grub/grub.conf
with the same rules about xxx and y. That should bring up the usual
grub boot menu and allow you to boot. If you don't have such a
configuration file already present on that disk, you will have to
eventually make one. Someone else suggested how to go about it.

But to boot right now you need a
grub> kernel /vmlinuz-.... ro root=...
where you need to fill in the appropriate ... s for your system.
You probably also need
grub> initrd /initrid-...
again filling in the specificaiton for the kernel on your disk,
Then
grub> boot
should boot you into Linux. Once you are there, you can create a
configuration file, and a grub boot floppy containing it. The other guy
explained how to do that. Roughly, you make a file system on the
floppy disk, mount it, make a /boot/grub directory on it, copy the grub
stage1 and stage2 and your configuration file, which should be called
grub.conf to that directory on the floppy, and then umount the floppy.
Finally, you run /sbin/grub and do
grub> root (fd0)
grub> setup (fd0)

That should do it. It did for me.

If you don't already have a configuration file, here is a copy of mine,
which you will probably have to make changes to. I have two scsi disks,
so you will have to adapt it to the disks you have and the location of
the relevant partitions.

# 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/sdb2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Fedora Core (2.6.9-1.11_FC2)
         root (hd1,0)
         kernel /vmlinuz-2.6.9-1.11_FC2 ro root=LABEL=/ rhgb quiet
         initrd /initrd-2.6.9-1.11_FC2.img
title Fedora Core (2.6.9-1.6_FC2)
         root (hd1,0)
         kernel /vmlinuz-2.6.9-1.6_FC2 ro root=LABEL=/ rhgb quiet
         initrd /initrd-2.6.9-1.6_FC2.img
title Fedora Core (2.6.8-1.521)
         root (hd1,0) kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/
rhgb quiet
         initrd /initrd-2.6.8-1.521.img
title Windows 2000
         rootnoverify (hd0,0)
         chainloader +1



Relevant Pages

  • Re: GRUB Problems with Dell Optiplex GX1
    ... inappropriate boot image when they turn it on... ... It will boot from a floppy, but installing it to ... FreeBSD folks tend not to use Grub, ...
    (freebsd-questions)
  • Re: Problem in the boot of Windows XP with Grub
    ... I have 3 HDs Sata, in which 2 HDs of 160GB are for ... being my first experience with it) the plant was normal There was no error, however, when restart the computer and select the option in Grub boot Windows XP, simply restart the computer, when I select Fedora, the boot normally carries. ...
    (Fedora)
  • Re: GRUB Problems with Dell Optiplex GX1
    ... inappropriate boot image when they turn it on... ... It will boot from a floppy, but installing it to ... FreeBSD folks tend not to use Grub, ...
    (freebsd-questions)
  • RE: fedora-list Digest, Vol 70, Issue 59
    ... Latest Kernel causes reboot hell ... Subject: Fedora on Macbook Air? ... Chad>When it comes to booting from a disk drive, I believe the Air only boot OS's ... someone decided to set up grub by default to hide its ...
    (Fedora)
  • Re: f8 boots!
    ... title Fedora single ... I can just boot in single mode and change it. ... by hand through the grub shell, to any grub entry, if needed. ... on the U.S. defense budget ...
    (Fedora)