grub issues during FAI install
Steffen Grunewald
steffen.grunewald at aei.mpg.de
Wed Jul 8 10:50:07 CEST 2009
I'm using the /boot/grub/menu.lst/GRUB example that comes with FAI, and
the corresponding postinst. (Lenny, AMD64)
After fcopy'ing /boot/grub/menu.lst, I usually see the following messages
produced by the postinst script:
grub-probe: error: Cannot open `/boot/grub/device.map'
/usr/sbin/grub-install: line 374: [: =: unary operator expected
Installation finished. No error reported.
This is the contents of the device map /target/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0)<->/dev/sda
(hd1)<->/dev/sdb
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-amd64
Updating /boot/grub/menu.lst ... done
Grub installed on /dev/sda on (hd0,0)
Since the "line 374" error appears to be related to a missing device.map,
and everything seems to work fine, I'm not worried too much about it.
But - I have a single machine that would cause trouble with the same
(GRUB) setup. It's got two disks as well, and should behave the same.
It doesn't (same place):
More than one install_devices?
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.
-h, --help print this message and exit
-v, --version print the version information and exit
--root-directory=DIR install GRUB images under the directory DIR
instead of the root directory
--grub-shell=FILE use FILE as the grub shell
--no-floppy do not probe any floppy drive
--force-lba force GRUB to use LBA mode even for a buggy
BIOS
--recheck probe a device map even if it already exists
INSTALL_DEVICE can be a GRUB device name or a system device filename.
grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the boot
sector.
Report bugs to <bug-grub at gnu.org>.
Can't open /target/boot/grub/device.map
Searching for GRUB installation directory ... found: /boot/grub
Probing devices to guess BIOS drives. This may take a long time.
Searching for default file ... Generating /boot/grub/default file and setting the default boot entry to 0
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-amd64
Updating /boot/grub/menu.lst ... done
Grub installed on /dev/sda /dev/sdb on
ERROR: postinst returned code 1
- and closer examination shows that in disk_var.sh, there's a line
BOOT_DEVICE="/dev/sda /dev/sdb"
when it should read
BOOT_DEVICE="/dev/sda"
only.
For whatever reason this has happened: it shouldn't. There could be
several reasons to have multiple bootable devices (e.g. different
OSes), and they should be selectable in the BIOS.
A (visible) complaint should be emitted instead.
Perhaps, in such cases ($BOOT_DEVICE consisting of multiple entries)
the one corresponding to $ROOT_PARTITION (or the first one) should be
used?
Cheers,
Steffen
--
Steffen Grunewald * MPI Grav.Phys.(AEI) * Am Mühlenberg 1, D-14476 Potsdam
Cluster Admin * http://pandora.aei.mpg.de/merlin/ * http://www.aei.mpg.de/
* e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}
No Word/PPT mails - http://www.gnu.org/philosophy/no-word-attachments.html
More information about the linux-fai
mailing list