Installing grub on '/dev/md126p1 system doesn't boot

Bug #1587889 reported by Carl Karsten
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Installed, xenial, machine wont boot.

machine has
lspci ...
00:1f.2 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 02)
two disks that show up as sda/b

pxe net install, preseed disk options:

d-i user-setup/encrypt-home boolean false

# d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic

# This makes partman automatically partition without confirmation.
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true

Installer syslog shows:

May 31 22:03:46 grub-installer: info: Installing grub on '/dev/md126p1'
May 31 22:03:46 grub-installer: info: grub-install does not support --no-floppy
May 31 22:03:46 debconf: --> INPUT low grub-installer/force-efi-extra-removable
May 31 22:03:46 debconf: <-- 30 question skipped
May 31 22:03:46 debconf: --> GO
May 31 22:03:46 debconf: <-- 0 ok
May 31 22:03:46 debconf: --> GET grub-installer/force-efi-extra-removable
May 31 22:03:46 debconf: <-- 0 false
May 31 22:03:46 grub-installer: info: Running chroot /target grub-install --force "/dev/md126p1"
May 31 22:03:46 grub-installer: Installing for i386-pc platform.
May 31 22:03:59 grub-installer: grub-install: warning: File system `ext2' doesn't support embedding.
May 31 22:03:59 grub-installer: grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
May 31 22:03:59 grub-installer: Installation finished. No error reported.
May 31 22:03:59 grub-installer: info: grub-install ran successfully
May 31 22:03:59 debconf: --> GET grub-installer/make_active
May 31 22:03:59 debconf: <-- 0 true
May 31 22:04:00 debconf: --> PROGRESS STEP 1
May 31 22:04:00 debconf: <-- 0 OK

Revision history for this message
Carl Karsten (carlfk) wrote :

I booted the installer into rescue mode:

~ # mount /dev/md126p1 /target
~ # chroot /target grub-install --force "/dev/md126p1"
Installing for i386-pc platform.
grub-install: error: cannot find a device for /boot/grub (is /dev mounted?).

~ # mount
rootfs on / type rootfs (rw)
none on /run type tmpfs (rw,nosuid,relatime,size=404492k,mode=755)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=2002416k,nr_inodes=500604,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/md126p1 on /target type ext4 (rw,relatime,data=ordered)

Revision history for this message
Carl Karsten (carlfk) wrote :
Revision history for this message
Carl Karsten (carlfk) wrote :

fix: grub-install /dev/md126

Steps:
I booted into installer rescue mode

~ # mkdir target
~ # mount /dev/md126p1 target
~ # mount -t proc none /target/proc
~ # mount -o bind /dev /target/dev
~ # mount -t sysfs sys /target/sys
~ # chroot /target /bin/bash
root@dhcp225:/# grub-install /dev/md126
Installing for i386-pc platform.
Installation finished. No error reported.
root@dhcp225:/#

reboot, grub comes up, all is well.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I just did a full install with RAID on a VM; I set up two full disks (clean partition table) as RAID1 and used Guided to write partitions to RAID1 array. Install completed successfully and appears to boot just fine.

The only thing that was not tested was booting with RAID degraded, but it otherwise all looks like things behave the way they should; ergo, I can't reproduce the issue.

Could you please add more information as to how you're doing the partitioning, if you're setting special RAID metadata settings, etc?

Changed in grub-installer (Ubuntu):
status: New → Incomplete
Revision history for this message
Carl Karsten (carlfk) wrote :

fix: grub-install /dev/md126

Steps:
I booted into installer rescue mode

~ # mkdir target
~ # mount /dev/md126p1 target
~ # mount -t proc none /target/proc
~ # mount -o bind /dev /target/dev
~ # mount -t sysfs sys /target/sys
~ # chroot /target /bin/bash
root@dhcp225:/# grub-install /dev/md126
Installing for i386-pc platform.
Installation finished. No error reported.
root@dhcp225:/#

reboot, grub comes up, all is well.

Revision history for this message
Carl Karsten (carlfk) wrote :

Whoops, Sorry about the duplicate comment #5.

Revision history for this message
Carl Karsten (carlfk) wrote :

More info:

I am installing onto two servers that I bought used. I have no idea how they were configured. The hope was that the installer would just replace whatever was there.

I did get 2 dialogs:
(from memory)
1. Do you want to enable raid?
2. do you want to enable serial ata? (made me think "sata is not enabled by default?" but it was not that. )

The first time I answered Yes to both, the 2nd time no. no difference.

Revision history for this message
Phillip Susi (psusi) wrote :

@Mathiue, this is an intel fakeraid rather than plain software raid, which is why you couldn't reproduce it.

Closing the report now since as Carl discovered, you need to install grub to the whole array rather than a partition in it.

Changed in grub-installer (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Carl Karsten (carlfk) wrote :

Um, I am not sure this should be closed.

It wasn't my choice to where to install grub, the installer / partman? make the wrong choice. I think.

 d-i partman-auto/choose_recipe select atomic

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.