Factory reset GRUB config (99_reset) does not boot to the installer

Bug #2051099 reported by Yao Wei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
Fix Committed
High
Unassigned

Bug Description

In subiquity/server/controllers/install.py, it creates 99_reset for GRUB config if factory-reset is set:

#!/bin/sh
{HEADER}

set -e

cat << EOF
menuentry "Restore Ubuntu to factory state" {{
      search --no-floppy --hint '(hd0,{PARTITION})' --set --fs-uuid {FS_UUID}
      linux /casper/vmlinuz uuid={CASPER_UUID} rp-partuuid={RP_UUID} nopersistent
      initrd /casper/initrd
}}
EOF

However, this boot entry cannot boot into the factory reset mode for the following reasons:
1. This does not boot into live squashfs layer, that means it boots into the "installed" live environment.
2. We would like to configure the boot parameters so we could specify cloud-configs to be used, and disable nouveau during and after installation.

This is the GRUB config we are using for the reset partition, for example:

menuentry "Restore Ubuntu to factory state" {
 set gfxpayload=keep
 linux /casper/vmlinuz layerfs-path=minimal.standard.live.squashfs nopersistent ds=nocloud\;s=/cdrom/cloud-configs/reset-partition --- quiet splash modprobe.blacklist=nouveau nouveau.modeset=0
 initrd /casper/initrd
}

Yao Wei (medicalwei)
description: updated
description: updated
Revision history for this message
Yao Wei (medicalwei) wrote :

My proposal is not to load Linux kernel, but maybe chainload into /EFI/boot/bootx64.efi so that we can use the GRUB option over there.

Do you think this is okay?

Revision history for this message
Yao Wei (medicalwei) wrote :
Olivier Gayot (ogayot)
Changed in subiquity:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

We shouldn't need layerfs-path=minimal.standard.live.squashfs on the kernel command line any more since recent changes to livecd-rootfs to set this in the initrd for desktop ISOs. But the other stuff makes sense.

Yao Wei (medicalwei)
Changed in subiquity:
status: Triaged → Fix Committed
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.