dajhorn/pkg-zfs — Issue #8: grub problems
Author: thw
Created: 2011-11-02 17:41:07+00:00
State: open

Hi Darik,

i have a few grub-related issues. In all cases i encountered these problems on a fresh
install via amd64 live-cd to an empty disk.

1. Following this howto, i never ever got grub-pc installed. Not on 11.04, nor on 11.10. In step 5.6 when executing

# apt-get install --no-install-recommends linux-image linux-image-generic linux-headers-generic

i get

The following extra packages will be installed:
linux-firmware linux-headers-3.0.0-12 linux-headers-3.0.0-12-generic linux-image-3.0.0-12-generic wireless-crda
Suggested packages:
fdutils linux-doc-3.0.0 linux-source-3.0.0 linux-tools
Recommended packages:
grub-pc grub-efi-amd64 grub-efi-ia32 grub lilo
The following NEW packages will be installed:
linux-firmware linux-headers-3.0.0-12 linux-headers-3.0.0-12-generic linux-headers-generic linux-image linux-image-3.0.0-12-generic linux-image-generic wireless-crda
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.

You see, grub-pc is recommended but ignored due to the switch.

In step 6.1 grub-probe is succesful but /boot/grub is missing and also grub-install and update-grub

# grub-probe /
zfs

# ls /boot/grub/zfs*
ls: cannot access /boot/grub/zfs*: No such file or directory

# which update-grub
# which grub-install
#

# dpkg -l | grep grub
ii grub-common 1.99-12ubuntu5+zfs1~oneiric1 GRand Unified Bootloader (common files)

2. /etc/grub.d/10_linux: 68: xUNKNOWN (0x2fc12fc1): not found

apt-get install grub-pc resolves the problem regarding /boot/grub and the missing tools

# grub-probe /
zfs

# ls //boot/grub/zfs*
/boot/grub/zfsinfo.mod /boot/grub/zfs.mod

# which update-grub
/usr/sbin/update-grub
# which grub-install
/usr/sbin/grub-install
#

but it throws an error message

Creating config file /etc/default/grub with new version
Installation finished. No error reported.
Generating grub.cfg ...
[: 68: missing ]
/etc/grub.d/10_linux: 68: xUNKNOWN (0x2fc12fc1): not found
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
done

3. error: cannot find a GRUB drive for /dev/disk/by-id/ata-WDC_...CAWF6778257. Check your device.map.

For the first time (i did numerous installations previous with 10.04 using /dev/sda) i used /dev/data/by-id/ addressing
schema. /dev/disk/by-id/ has two entries for every disk/partition: an ata-* and a scsi-*. First, inspired by the howto, i used
the scsi variant which worked until step 6.5

# grub-install /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WCAWF6778257
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/disk/by-id/scsi-SATA_WDC_WD2500AAJS-_WD-WCAWF6778257. Check your device.map.

I found that /boot/grub/device.map didnt exist and tried to fix this

# cat /boot/grub/device.map
cat: /boot/grub/device.map: No such file or directory

# grub-mkdevicemap --no-floppy
# cat /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-WDC_WD2500AAJS-00V4A0_WD-WCAWF6778257

Since grub-mkdevicemap only added the ata variant, i started over by erasing the hd and rebooting from live-cd
using this id. I encountered all 3 issues.

# grub-install /dev/disk/by-id/ata-WDC_WD2500AAJS-00V4A0_WD-WCAWF6778257
/usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/disk/by-id/ata-WDC_WD2500AAJS-00V4A0_WD-WCAWF6778257. Check your device.map.
#
# cat /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-WDC_WD2500AAJS-00V4A0_WD-WCAWF6778257

BUT (!!!!)

# grub-install /dev/sda
Installation finished. No error reported.

After rebooting, the system is fully functional.

Best regards
Thomas