Re: Installing grub for a different computer

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

 



On Mon, 2004-11-15 at 20:39 +0000, Colin Paul Adams wrote:
> >>>>> "Kevin" == Kevin Freeman <kfreem02@xxxxxxxxxxx> writes:
>     Kevin> Note that you can install grub to a floppy disk.  Assuming
>     Kevin> you have a floppy drive on the original PC this could have
>     Kevin> saved you a bit of hardware tinkering.
> 
> This seems like a good idea, so I tried it.
> 
> But when I boot with the floppy, I get:
> 
> Grub hard disk error.
> 
> (Both before I restored the hard disk to the machine, and afterwards).
> 
> I've changed the boot sequence to F,A to try to avoid it looking at
> the hard disk.


>From http://myrddin.org/howto/debian-grub.php :
  mkfs /dev/fd0
  mount /media/floppy/  #or /mnt/floppy if FC2
  mkdir -p /media/floppy/boot/grub

cp /boot/grub/stage1 /boot/grub/stage2 /boot/grub/menu.lst /media/floppy/boot/grub/
  umount /media/floppy/
  
  /sbin/grub --batch --device-map=/dev/null <<EOT
  device (fd0) /dev/fd0
  root (fd0)
  setup (fd0)
  quit
  EOT

In theory that gives you a grub floppy which includes a working menu.
In my testing, it produces a floppy that boots to a grub command prompt.
In any case, you can now attempt to boot the sick machine.

Assuming the FC boot partition on /dev/hda1, type root (hd0,0), followed
by configfile /grub/grub.conf.  This will load the "lost" boot menu.
You should be able to check the entries, make any temporary changes, and
boot into FC.  You can then reinstall grub so that the floppy is no
longer necessary - but keep it somewhere safe just in case you need it
again.

Kevin Freeman


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux