2

I understand this question is extremely similar to this, however the solutions in that question do not apply to current methods of controlling Grub when booting a USB. My initial grub screen is controlled by grub.cfg, not syslinux.txt or isolinux.txt.

To start off with, I have successfully created a persistent USB. I can use ctrl-alt-f3 to drop into shell and do what I need to do (which is compile and run a program). However I am unable to edit grub.cfg in such a way that I can either boot straight into terminal, or bypass the Install screen entirely. Having to drop into the shell display is annoying and not the way I want this to work.

The following default menuentry in my grub.cfg is the issue. I need this to be persistent, and text based. When I add both text and persistent flags, nothing changes; I still get thrown into the Ubuntu Server install screen.

menuentry "Install Ubuntu Server" {
    set gfxpayload=keep
    linux   /casper/vmlinuz   quiet  ---
    initrd  /casper/initrd
}

What do I need to change to make this go straight into a terminal?

This question also gets close, but unfortunately doesn't help me either.

This question doesn't help me either as I am using the stated version of mkusb-plug which apparently removed Try/Install. Doesn't stop it booting into Ubuntu Server's setup screen!

1 Answers1

3

mkusb can clone most Linux iso files but can make persistent live drives only for Ubuntu Desktop, the community flavours (Kubuntu, Lubuntu ... Xubuntu), Debian live and some respins (distros based on Ubuntu and Debian, where the boot structure is not changed too much).

mkusb cannot make persistent live drives from Ubuntu Server iso files. But you can use the following command line for Ubuntu Live Server 20.04.3 LTS,

sed -e 's# append   initrd=/casper/initrd quiet  ---#append initrd=/casper/initrd persistent --#' -e 's#\tlinux\t/casper/vmlinuz   quiet  ---#linux\t/casper/vmlinuz persistent --#' ubuntu-20.04.3-live-server-amd64.iso > persistent-ubuntu-20.04.3-live-server-amd64.iso

Copy and paste it into a terminal window. It is very important that you get it exactly correct. Otherwise it will fail. Explanation: Editing the iso file can be done within very strict limits. The total size must be preserved and only text strings should be modified. So I replace quietand some whitespace and one hyphen with persistent both for booting via syslinux in BIOS mode and via grub in UEFI mode.

Now you can clone the modified iso file with a cloning tool, for example mkusb-dus or mkusb-plug, for example

dus persistent-ubuntu-20.04.3-live-server-amd64.iso

The result will be a persistent live drive, that works both in BIOS mode and UEFI mode.


I have no method to make it start with a command line. You still have to switch to a virtual text screen with ctrl+alt+F3 (or ctrl+alt+F4 ... and back to the menu with ctrl+alt+F1).

sudodus
  • 47,684