grub not installed to selected location

Bug #1970995 reported by Greyson Brown
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When installing Xubuntu to a USB drive, grub was installed to the computer's hard drive rather than the USB as selected.

I attempted to install Xubuntu 22.04 on a USB drive by using the "Something else" installation option. Booted into a Xubuntu 22.04 live USB (/dev/sda) using UEFI boot. I created an EFI system partition (250MB), a swap partition (4000MB), and a root partition (the remaining 120000-ish MB) on the destination USB drive (/dev/sdb). I also selected the destination USB (/dev/sdb) in the "Device for loader installation:" drop down (please see attached screenshot). I have used this configuration successfully for several Xubuntu 20.04 installs, so I have no reason to believe there is an issue with these options/configuration.

The installation completes normally, and there does not appear to be an issue as the system will reboot into the USB drive (/dev/sdb during installation), but the computer will not boot correctly if the USB drive is removed, and the USB cannot be booted from on another computer. It appears that grub was at least partially installed on the computer hard drive (/dev/nvme0n1 in my case). /dev/nvme0n1 contains a factory Windows 11 install and a Xubuntu 20.04 install, if that is relevant.

In 20.04, this processes resulted in a USB drive that could be booted from on any computer using UEFI booting while leaving the computer hard drive alone. This appears to no longer be the case with 22.04.

This is my first bug submission, so please let me know if I failed to correctly submit this bug or if additional information is needed.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: XFCE
Date: Fri Apr 29 14:08:08 2022
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/xubuntu.seed maybe-ubiquity quiet splash ---
InstallationDate: Installed on 2022-04-29 (0 days ago)
InstallationMedia: Xubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Greyson Brown (greysonbrown) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Ken C (kcgeemail) wrote (last edit ):

I also experienced this. In my case the boot partition on the external drive appeared to be format/init correctly, with boot and esp flags set, but there was no data or folders on it.

fstab #comments# on the external said that boot was setup on sda (the internal drive of the computer), while all other partitions were properly set up on sdcx (the external drive). It also set up the internal drive's swap as swap, though I guess that would not cause a problem, it would just not be used if it could be booted on another computer? The actual commands are set by UUID.

I'm going to try to replicate this, and do some more searching. I limited my search to "Xubuntu", but I assume the same installer is used with "Ubuntu" (just different data)?

# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdc2 during installation
UUID=59971f52-e8ad-4181-b9cd-5296f89640fc / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
UUID=CA84-F41F /boot/efi vfat umask=0077 0 1
# /home was on /dev/sdc6 during installation
UUID=ef625a25-d7a5-4c4c-a902-ab51fa7a9272 /home ext4 defaults 0 2
# swap was on /dev/sda12 during installation
UUID=5af1f9c7-df0b-468d-bc18-8886671f447d none swap sw 0 0
# swap was on /dev/sdc5 during installation
UUID=e190a001-5c05-45d6-9d15-b0f30a1ad94c none swap sw 0 0

Revision history for this message
oldfred (oldfred) wrote :

Duplicate of this bug which never was fixed & still applies to every version using Ubiquity installer. Bug has multiple work arounds, but still needs fix.
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

Revision history for this message
Ken C (kcgeemail) wrote :

I just learned this is an old bug,

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

with a suggested workaround here (basically, temporarily disable the boot, efi, hidden flags of the internal drive):

https://askubuntu.com/questions/16988/how-do-i-install-ubuntu-to-a-usb-key-without-using-startup-disk-creator/1056079#1056079

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/1970995

tags: added: iso-testing
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.