DEV Community

Spencer Krum
Spencer Krum

Posted on

2

Fixing "groot must be grub root device" on ibmcloud

Some images on ibmcloud have an issue when installing new kernels (and thus rebuilding the initramfs and grub config files).

# apt-get upgrade
...
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-42-generic
I: The initramfs will attempt to resume from /dev/vdc
I: (UUID=083a8bfd-95a8-4808-bd75-ed3c1be04dd4)
I: Set the RESUME variable to override this.
Setting up ubuntu-server (1.417.4) ...
Processing triggers for linux-image-4.15.0-99-generic (4.15.0-99.100) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-99-generic
I: The initramfs will attempt to resume from /dev/vdc
I: (UUID=083a8bfd-95a8-4808-bd75-ed3c1be04dd4)
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/x-grub-legacy-ec2:
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
uuid not supported. update 'groot' in /boot/grub/menu.lst

groot must be grub root device (ie '(hd0)'). not 'LABEL=cloudimg-rootfs'

run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2 exited with return code 1
dpkg: error processing package linux-image-4.15.0-99-generic (--configure):
 installed linux-image-4.15.0-99-generic package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 linux-image-4.15.0-99-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ooof. Very annoying.

Until we get a fix everywhere, you can fix this very easily yourself.

Edit: /boot/grub/menu.lst

Find this section:

...
## default grub root device
## e.g. groot=LABEL=cloudimg-rootfs
# groot=LABEL=cloudimg-rootfs

...

Change # groot=LABEL=cloudimg-rootfs to # groot=(hd0) (leaving the comment)

Then have the package manager try again

# apt-get install -f

This should succeed without issue. Then you can reboot to test the change

# reboot

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more