Can't deploy using root XFS partition using 18.04

Bug #1908761 reported by Gabriel Ramirez
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Undecided
Unassigned
curtin
Invalid
Undecided
Unassigned
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps to reproduce:

1) Setup VM using OVMF firmware
2) Comission node
3) Choose disk layout where
/boot/efi/ is on 512mb fat32 partition

For the rest of the layout, create a VG, then LV, and format it as XFS and mount it as '/'
4) Deploy 18.04

5) Deployment will boot into grub prompt
grub>

Paastebin of deployment logs:
https://paste.ubuntu.com/p/W2jtwTWhbS/

Tags: sts seg
Revision history for this message
Lee Trager (ltrager) wrote :

I was able to reproduce this as well. While 20.04 works chainbooting over the network doesn't work so there may be two bugs here

1. When network booting GRUB it is unable to find the local bootloader to chainboot to when using LVM + XFS
2. When installing 18.04 on LVM + XFS GRUB isn't being configured locally.

Both 18.04 and 20.04 are effected by 1 but only 18.04 is effected by 2.

Changed in maas:
status: New → Triaged
milestone: none → 2.9.x
Eric Desrochers (slashd)
tags: added: seg sts
Revision history for this message
Ryan Harper (raharper) wrote :

Is this not just the same XFS on root over LVM?

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1652822

XFS on root requires a /boot with ext4 when using LVM.

Revision history for this message
Eric Desrochers (slashd) wrote :

When I deployed the same VM in MAAS as follows:

# Working
vda-part1 536.9 MB fat32 /boot/efi
vgroot-lvroot 31.7 GB ext4 /

# Not working
vda-part1 536.9 MB fat32 /boot/efi
vgroot-lvroot 31.7 GB xfs /

Connecting to the console I observed the following (and the VM stay in 'Deploying' in MAAS), probably waiting for MAAS to mark it as 'failling deployment'

$ virsh console <VM_WITH_XFS>
[ 28.174306] cloud-init[1294]: Can not apply stage config, no datasource found! Likely bad things to come!
[ 28.174561] cloud-init[1294]: ------------------------------------------------------------
[ 28.174996] cloud-init[1294]: Traceback (most recent call last):
[ 28.175377] cloud-init[1294]: File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 485, in main_modules
[ 28.175966] cloud-init[1294]: init.fetch(existing="trust")
[ 28.176384] cloud-init[1294]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 350, in fetch
[ 28.176773] cloud-init[1294]: return self._get_data_source(existing=existing)
[ 28.177163] cloud-init[1294]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 260, in _get_data_source
[ 28.177604] cloud-init[1294]: pkg_list, self.reporter)
[ 28.177992] cloud-init[1294]: File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 778, in find_source
[ 28.178569] cloud-init[1294]: raise DataSourceNotFoundException(msg)
[ 28.178973] cloud-init[1294]: cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
[ 28.179383] cloud-init[1294]: ------------------------------------------------------------
[ 28.701279] cloud-init[1340]: Can not apply stage final, no datasource found! Likely bad things to come!
[ 28.701514] cloud-init[1340]: ------------------------------------------------------------
[ 28.702102] cloud-init[1340]: Traceback (most recent call last):
[ 28.702548] cloud-init[1340]: File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 485, in main_modules
[ 28.703001] cloud-init[1340]: init.fetch(existing="trust")
[ 28.703377] cloud-init[1340]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 350, in fetch
[ 28.703839] cloud-init[1340]: return self._get_data_source(existing=existing)
[ 28.704290] cloud-init[1340]: File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 260, in _get_data_source
[ 28.704738] cloud-init[1340]: pkg_list, self.reporter)
[ 28.705081] cloud-init[1340]: File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 778, in find_source
[ 28.705423] cloud-init[1340]: raise DataSourceNotFoundException(msg)
[ 28.705794] cloud-init[1340]: cloudinit.sources.DataSourceNotFoundException: Did not find any data source, searched classes: ()
[ 28.706135] cloud-init[1340]: ------------------------------------------------------------

Revision history for this message
Ryan Harper (raharper) wrote :

> # Not working
> vda-part1 536.9 MB fat32 /boot/efi
> vgroot-lvroot 31.7 GB xfs /

This config scenario is tracked (ignored?) here
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1652822

The workaround is to create a /boot partition, with ext4, so you have:

vda-part1 ext4 /boot
vda-part2 fat32 /boot/efi
vgroot-lvroot xfs /

Revision history for this message
Eric Desrochers (slashd) wrote :

diff -u b/grub2-2.02/debian/build-efi-images f/grub2-2.04/debian/build-efi-images

@@ -98,6 +100,7 @@
  gfxterm_background
  gzio
  halt
+ help
  hfsplus
  iso9660
  jpeg
@@ -105,6 +108,7 @@
  loadenv
  loopback
  linux
+ ls
  lsefi
  lsefimmap
  lsefisystab
@@ -112,21 +116,25 @@
  memdisk
  minicmd
  normal
+ ntfs
  part_apple
  part_msdos
  part_gpt
  password_pbkdf2
  png
  reboot
+ regexp
  search
  search_fs_uuid
  search_fs_file
  search_label
  sleep
+ smbios
  squash4
  test
  true
  video
+ xfs
  zfs
  zfscrypt
  zfsinfo

Revision history for this message
Eric Desrochers (slashd) wrote :

Thanks Ryan, just got the notifications for your message.

Will check this out.

Revision history for this message
Eric Desrochers (slashd) wrote :

Ryan what about adding 'xfs' in grub2 debian/build-efi-images ?

Changed in curtin:
status: New → Invalid
Revision history for this message
Eric Desrochers (slashd) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

@Eric

Yeah, I *think* that will work; I believe at the time I manually performed that step and it worked.

I'm not sure w.r.t Secure Boot and shim-signed; Maybe @vorlon can confirm if the xfs grub2 module is signed/included in shim-signed?

> As follow:
> https://salsa.debian.org/grub-team/grub/-/commit/01f1eee93acd4113475b403f80661cf651fbcc00

Ah, that's adding it to the signed bits... that looks promising.

Revision history for this message
Ryan Harper (raharper) wrote :

You might just mark this bug duplicate of the other so we can close both if this fixes things; and if so, I can update our vmtest which exercises this path. Note this is broken all the way back through Xenial.

Revision history for this message
Eric Desrochers (slashd) wrote :

I have started the SRU.

For more details about the SRU, please refer to bug #1652822.

Revision history for this message
Eric Desrochers (slashd) wrote :

This bug was fixed in the package grub2 - 2.02-2ubuntu8.21

---------------
grub2 (2.02-2ubuntu8.21) bionic; urgency=medium

  * d/build-efi-images:
    - Add xfs module to signed UEFI images
      (Closes: #911147) (LP: #1652822)
---------------

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.