Hi The problem seem to be in the "config/files/boot/grub/menu.lst/postinst" script for GRUB. When i change the line: [ -r $target/var/log/fai/disk_var.sh ] && . $target/var/log/fai/disk_var.sh
to [ -r $target/var/log/fai/disk_var.sh ] && . /tmp/fai/disk_var.sh GRUB is installed on both hard drives. The variable $target doesn't seem to be available for the "postinst" script. When I add the static path to the "disk_var.sh" file it works. Even though it seems so work the script complains about /dev/md0 as $BOOT_PARTITION. I get the error: Can't match device: /dev/md0 /Olof Mattsson On Tue, 2008-09-23 at 13:08 +0200, Olof Mattsson wrote: > On Tue, 2008-09-23 at 11:35 +0200, Henning Sprang wrote: > > Olof Mattsson wrote: > > > We are setting up a new FAI installation server for deploying Lenny to > > > our clients. > > > The disk partitioning works fine. Were using LVM over softraid. > > > The problem is that GRUB is not installing correctly. The script > > > scripts/GRUB/10-setup fails with exitcode 1. > > > > Do you see any log output with that? > > > > Henning > > This is what I get i shell.log: > ===== shell: GRUB/10-setup ===== > + error=0 > + trap error=1 ERR > + fcopy -Uv /boot/grub/menu.lst > Classes: LAST fai-client GRUB DHCPC FAIBASE I386 LINUX SW_RAID TEST > DEFAULT > copy_one: source: boot/grub/menu.lst: > ps: /var/lib/fai/config/files/boot/grub/menu.lst > tpath: /target/boot/grub > using class: GRUB > mkdir /target/boot/grub > fcopy: copied /var/lib/fai/config/files/boot/grub/menu.lst/GRUB > to /target/boot/grub/menu.lst > name2num 0 = 0 ; 500 = 500 > chown/chmod u:0 g:500 m:33188 /target/boot/grub/menu.lst > executing /var/lib/fai/config/files/boot/grub/menu.lst/postinst > GRUB /target/boot/grub/menu.lst > Test if class NOMBR is in DEFAULT > TEST > SW_RAID > LINUX > I386 > FAIBASE > DHCPC > GRUB > fai-client > LAST > ifclass returns 1 > You shouldn't call /sbin/grub-install. Please > call /usr/sbin/grub-install instead! > > 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 <[EMAIL PROTECTED]>. > 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: /vmlinuz-2.6.26-1-486 > Found kernel: /memtest86+.bin > Updating /boot/grub/menu.lst ... done > > Grub installed on /dev/sda /dev/sdb on > ERROR: postinst returned code 1 > ++ error=1 > + exit 1 > GRUB/10-setup FAILED with exit code 1. > > Grub is installing on sda and sdb when it should be installing on md0 > > To make things work I need to: > umount everything in /target except /target/root > chroot /target > mount -a > grub-install /dev/md0 > Add root (hd0,0) to menu.lst. > > /Olof Mattsson > >
