Comment 0 for bug 2051099

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

In subiquity/server/controllers/install.py, grub_reset_conf has the following config:

#!/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 media, 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
}