Sun 02 Jan 2011 11:00:12 PM UTC, original submission:
Hi,
I am becoming more and more desperate about grub. It lacks a simple and plain low level install program.
Grub always tries to be more smart and clever than the admin, and unfortunately this does not always work.
Grub tries to hide as much as possible behind black magic like grub-install, but does not tell what is really going on there.
This works only as long as there is the standard situation of installing linux the regular way.
However, I was not able to figure out how to install grub the way it works with other boot loaders like lilo or syslinux, i.e. tell grub to just
- install itself on a given block device without trying to be magic or smart
- use the grub files from a given directory
- boot the first bios drive
and that's it.
I am trying to install a boot loader on a virtual disk (i.e. an lvm device) used as the boot disk for a virtual machine.
When installing the boot code, the virtual disk is seen from the host system like /dev/mapper/raid-vmtest with partitions. When starting the virtual machine, the same device now looks like /dev/hda or /dev/sda, or the first physical disk from the BIOS view.
Unfortunately, it is not possible (or at least I did not find a way due to the poor documentation) to install grub successfully on such a virtual disk. Grub always tries to find something about this device /dev/mapper/raid-vmtest through opaque black magic, and cannot accept that the disk appears with a differnt name and at a different place when booting. This is horrible, a nightmare.
There should be some low level installation program, which does not use any magic or autoconfiguration at all, which just installs grub with parameters given on the command line (or some documentation telling how to achieve that), e.g. for
- preparing virtual disks
- preparing real external disks with a USB adapter for later
use as a boot disk
- repairing boot disks while booting from a USB-Stick
I've already wasted so much time with unsuccessfully trying to install grub the way I need it (and not the way grub believes it should be), especially because grub always prepares the disk to boot it as if it appeared at the same place it is while installing grub.
Please improve.
|