GRUB_PC (simple example): still doesn't work
Adrian von Bidder
avbidder at fortytwo.ch
Fri Dec 11 16:29:47 CET 2009
Heyho!
As reported a few weeks ago, I have a problem getting my clients to boot.
Starting with the "simple" example from fai-doc on Debian (installing
squeeze). I modified it as little as possible. This is fai
3.3.3+experimental1 with a freshly created nfsroot.
Basically:
disk_config/FAIBASE
+++
disk_config disk1 disklabel:msdos
primary swap 1G swap rw
primary / 50-100% ext3 rw,errors=remount-ro tuneopts="-c 0 -i 0"
+++
The host is in classes
DEFAULT
LINUX
I386
FAIBASE
DHCPC
GRUB_PC
host
LAST
and the following gets my attention when I get through the logs:
disk_var.sh seems ok:
+++
SWAPLIST="/dev/sda1"
BOOT_DEVICE="/dev/sda"
ROOT_PARTITION=/dev/sda2
BOOT_PARTITION=/dev/sda2
+++
(or should BOOT_PARTITION be /dev/sda to get grub installed in the MBR?
Where do I set this?)
Ugly perl errors in task_partition, but the partitions are being created
just as I expect it, so not sure if this is pertinent.
+++
Calling task_partition
Partitioning local harddisks using setup-storage
Starting setup-storage 1.2+exp
Using config file: /var/lib/fai/config/disk_config/FAIBASE
Executing: parted -s /dev/sda unit TiB print
Use of uninitialized value $fs in substitution (s///) at /usr/share/fai/setup-storage//Volumes.pm line 215.
Use of uninitialized value $fs in substitution (s///) at /usr/share/fai/setup-storage//Volumes.pm line 215.
Use of uninitialized value $fs in substitution (s///) at /usr/share/fai/setup-storage//Volumes.pm line 215.
Use of uninitialized value $fs in substitution (s///) at /usr/share/fai/setup-storage//Volumes.pm line 215.
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
Finding all volume groups
Executing: mdadm --detail --scan --verbose -c partitions
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mklabel msdos
Executing: parted -s /dev/sda mkpart primary linux-swap 512B 1073742335B
Executing: parted -s /dev/sda mkpart primary ext3 1073742336B 8589934591B
Executing: mkswap /dev/sda1
Executing: mkfs.ext3 /dev/sda2
Executing: tune2fs -c 0 -i 0 /dev/sda2
Executing: fai-vol_id -u /dev/sda1
Executing: fai-vol_id -l /dev/sda1
/dev/sda1 UUID=7979757e-0f50-4f51-bcb8-0e514bd1cfe9
Executing: fai-vol_id -u /dev/sda2
Executing: fai-vol_id -l /dev/sda2
/dev/sda2 UUID=6bc49997-e8a3-4db1-9144-7ff27b8f6d00
+++
And finally grub fails:
+++
===== shell: GRUB_PC/10-setup =====
grub-mkimage: error: cannot stat /usr/lib/grub/i386-pc/pc.mod
grub-mkimage: error: cannot stat /usr/lib/grub/i386-pc/_chain.mod
grub-setup: error: The size of `/boot/grub/core.img' is too small
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.30-2-686
Found initrd image: /boot/initrd.img-2.6.30-2-686
Found memtest86+ image: /boot/memtest86+.bin
done
GRUB_PC/10-setup FAILED with exit code 1.
+++
Calling grub-install /dev/sda directly succeeds:
+++
# grub-install /dev/sda
grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists.
However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /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
+++
(... and begs the question: cann I create a more usual setup with FAI that
would allow embedding, getting rid of that warning too?)
Hmm.
Something strange is going on: using class "GRUB" instead of "GRUB_PC" also
fails:
+++
===== shell: GRUB/10-setup =====
fcopy: copied /var/lib/fai/config/files/boot/grub/menu.lst/GRUB to /target/boot/grub/menu.lst
grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists.
However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: Cannot read `/grub/core.img' correctly
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.30-2-686
Found initrd image: /boot/initrd.img-2.6.30-2-686
Found memtest86+ image: /boot/memtest86+.bin
done
Grub installed on /dev/sda on (hd0,1)
ERROR: postinst returned code 1
GRUB/10-setup FAILED with exit code 1.
+++
How is grub-setup being called? That's only for GRUB_PC, right? I double
checked, the host is not in GRUB_PC, only in GRUB. Perhaps it's just
telling me that it's too close to the weekend for me to think about this
any more, so have a nice weekend. Tips appreciated, though.
(Class LILO works so I have a fallback for now.)
cheers
-- vbi
--
90% of the people do not understand copyright,
the other 10% simply ignore it.
-- Aigars Mahinovs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 388 bytes
Desc: This is a digitally signed message part.
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20091211/90234c5a/attachment.bin
More information about the linux-fai
mailing list