Ubiquity crashes with mount points that are FAT16/32

Bug #1770093 reported by Adam Smith
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-basicfilesystems (Ubuntu)
Expired
Medium
Unassigned
Xenial
Expired
Medium
Unassigned
Bionic
Expired
Medium
Unassigned
Eoan
Won't Fix
Medium
Unassigned
Focal
Expired
Medium
Unassigned

Bug Description

[impact]

when installing on pi with ubiquity, the /boot/firmware partition gets mounted with extra parameters that causes ubiquity to crash.

[test case]

see original description.

[regression potential]

this removes the additional mount params from (only) the /boot/firmware mount, so any regression would likely involve problems with that partition. Also since this patches the installation path, regressions may occur during installation.

[scope]

Debian does not include the extra mount parameters, so Debian does not need patching.

This package has been unchanged since bionic. The code needing patching is unchanged between xenial and bionic.

This needs patching in all releases (Xenial, Bionic, Eoan, Focal).

[original description]

Hi, I've used ubiquity as an installer for the Raspberry Pi 2/3. One of the quirks of the Pi is its need for a FAT formatted boot partition. The Pi packages (flash-kernel etc) expect this to be mounted at /boot/firmware. However if I give ubiquity this mount point then it soon crashes.

I believe the problem is to do with the mount options that are automatically given to fat partitions. I've solved this by applying a patch to the partman-basicfilesystems package. Please see attached.

I'm not sure whether this is the correct fix, or a more generic fix should be applied to ubiquity and FAT partitions.

Revision history for this message
Adam Smith (adamsmith) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for partman-basicfilesystems" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Adam Smith (adamsmith) wrote :

Apologies, it appears the filename path is missing from the patch. The file is fstab.d/basic

Revision history for this message
Simon Quigley (tsimonq2) wrote :

Unsubscribing the Ubuntu Sponsors Team from this bug report as there is nothing to sponsor; this patch needs to be reviewed and turned into a debdiff for that to happen.

Thank you for your work on this!

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Simon, I disagree with that, there is a patch and it's useful to have sponsors visiblity on it, I'm subscribing the team back, it's not because a patch isn't a debdiff including the packaging that it can't be reviewed/sponsored

Mathew Hodson (mhodson)
no longer affects: ubiquity (Ubuntu)
Changed in partman-basicfilesystems (Ubuntu):
importance: Undecided → Low
Revision history for this message
Dan Streetman (ddstreet) wrote :
Revision history for this message
Dan Streetman (ddstreet) wrote :
Revision history for this message
Dan Streetman (ddstreet) wrote :
Revision history for this message
Dan Streetman (ddstreet) wrote :

@adamsmith I simplified your patch down to a 1-liner, can you verify it still fixes it for you? I have test builds in case it helps here:
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1770093

@waveform since you're the pi man, do you have an opinion on this? For quick reference, this is the patch to the 'fstab.d/basic' file:

@@ -86,7 +86,7 @@
      fi
     fi
     # base-passwd defines gid 46 as group plugdev
- if [ "$method" != efi ]; then
+ if [ "$method" != efi -a "$mountpoint" != "/boot/firmware" ]; then
      options="$options,umask=007,gid=46"
     fi
     echo "$path" "$mountpoint" vfat $options 0 1

Revision history for this message
Dan Streetman (ddstreet) wrote :

removing ubuntu-sponsors while I try to get feedback and sponsor this.

description: updated
Changed in partman-basicfilesystems (Ubuntu Eoan):
importance: Undecided → Low
Changed in partman-basicfilesystems (Ubuntu Bionic):
importance: Undecided → Medium
Changed in partman-basicfilesystems (Ubuntu Xenial):
importance: Undecided → Medium
Changed in partman-basicfilesystems (Ubuntu Eoan):
importance: Low → Medium
Changed in partman-basicfilesystems (Ubuntu Focal):
importance: Low → Medium
status: New → In Progress
Changed in partman-basicfilesystems (Ubuntu Eoan):
status: New → In Progress
Changed in partman-basicfilesystems (Ubuntu Bionic):
status: New → In Progress
Changed in partman-basicfilesystems (Ubuntu Xenial):
status: New → In Progress
Changed in partman-basicfilesystems (Ubuntu Focal):
assignee: nobody → Dan Streetman (ddstreet)
Changed in partman-basicfilesystems (Ubuntu Eoan):
assignee: nobody → Dan Streetman (ddstreet)
Changed in partman-basicfilesystems (Ubuntu Bionic):
assignee: nobody → Dan Streetman (ddstreet)
Changed in partman-basicfilesystems (Ubuntu Xenial):
assignee: nobody → Dan Streetman (ddstreet)
tags: added: ubuntu-sponsor-ddstreet
Revision history for this message
Dave Jones (waveform) wrote :

I'm not sure we should be encouraging people to try the installer on the Pi (for which we provide pre-installed images instead); still I don't see any particular harm in adding support for this to ubiquity for those that want to play with it.

The only thing that slightly concerns me with the patch is whether any *other* platforms use /boot/firmware for a non-FAT boot partition, and hence whether the test should be refined to be more Pi-specific? Testing for a "Raspberry Pi" prefix in /proc/device-tree/model would do the trick if that's desired?

Revision history for this message
Dan Streetman (ddstreet) wrote :

Ack, good point thanks - I updated the patch to:

@@ -87,7 +87,9 @@
     fi
     # base-passwd defines gid 46 as group plugdev
     if [ "$method" != efi ]; then
- options="$options,umask=007,gid=46"
+ if ! ([ "$mountpoint" = "/boot/firmware" ] && grep -sq "Raspberry Pi" /proc/device-tree/model); then
+ options="$options,umask=007,gid=46"
+ fi
     fi
     echo "$path" "$mountpoint" vfat $options 0 1
    fi

@adamsmith can you test with this patch to make sure it fixes the install problem? I have builds of partman-basicfilesystems in this ppa:
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1770093

Revision history for this message
Adam Smith (adamsmith) wrote :

Sorry for the slow reply. Launchpad bug report messages seem to end up in my junk folder. I currently don't use the pi at the moment so can't test the patch immediately (are you aiming for the 20.04 release?). The patch testing for the raspberry pi seems sensible. My only issue with your patch is dropping the "defaults". This seems to always be applied in pi images, but I've no clue if it is redundant.

Revision history for this message
Dan Streetman (ddstreet) wrote :

> are you aiming for the 20.04 release

no; it's definitely too late for that, but possibly could happen as a SRU post-release.

> My only issue with your patch is dropping the "defaults". This seems to always be applied in pi images, but I've no clue if it is redundant.

Yeah, I was not sure if the options needed to be fully reset to 'defaults' or if just dropping the umask and/or gid was enough. It would help if we could understand why ubiquity is crashing with the umask/gid mount options.

If you're not able to test, I think it would make sense to let this bug sit until you, or anyone else, can resume testing/verification. As @waveform said, most people using Pi will be using pre-installed images.

I'm on CC for this bug, so whenever you (or, anyone else interested in this bug) is available to test (and then, verify) the patch, let me know.

Revision history for this message
Brian Murray (brian-murray) wrote :

The Eoan Ermine has reached end of life, so this bug will not be fixed for that release

Changed in partman-basicfilesystems (Ubuntu Eoan):
status: In Progress → Won't Fix
Revision history for this message
Dan Streetman (ddstreet) wrote :

I'm still on cc for this bug, so if someone can verify the proposed patch, I'll work on it, but I'm going to remove myself as assignee until that time.

Changed in partman-basicfilesystems (Ubuntu):
assignee: Dan Streetman (ddstreet) → nobody
Changed in partman-basicfilesystems (Ubuntu Xenial):
assignee: Dan Streetman (ddstreet) → nobody
Changed in partman-basicfilesystems (Ubuntu Bionic):
assignee: Dan Streetman (ddstreet) → nobody
Changed in partman-basicfilesystems (Ubuntu Eoan):
assignee: Dan Streetman (ddstreet) → nobody
Changed in partman-basicfilesystems (Ubuntu Focal):
assignee: Dan Streetman (ddstreet) → nobody
Changed in partman-basicfilesystems (Ubuntu):
status: In Progress → Incomplete
Changed in partman-basicfilesystems (Ubuntu Xenial):
status: In Progress → Incomplete
Changed in partman-basicfilesystems (Ubuntu Bionic):
status: In Progress → Incomplete
Changed in partman-basicfilesystems (Ubuntu Focal):
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for partman-basicfilesystems (Ubuntu Bionic) because there has been no activity for 60 days.]

Changed in partman-basicfilesystems (Ubuntu Bionic):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for partman-basicfilesystems (Ubuntu Xenial) because there has been no activity for 60 days.]

Changed in partman-basicfilesystems (Ubuntu Xenial):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for partman-basicfilesystems (Ubuntu) because there has been no activity for 60 days.]

Changed in partman-basicfilesystems (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for partman-basicfilesystems (Ubuntu Focal) because there has been no activity for 60 days.]

Changed in partman-basicfilesystems (Ubuntu Focal):
status: Incomplete → Expired
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.