Score:1

persistence: how to modify location of upper and work directories?

ec flag

I have release 20.04 LTS. When I boot liveUSB with persistence option, on USB two folders are created (as I understand during first time boot): work, upper. I want to rename them / assign different location. Where are these names set on liveUSB?

P.S. I know how to edit USB, I want to know what to change.
As an alternative being able to access /cow/uppper would help too: Where is the upper layer of the live cd image overlayfs root filesystem stored?

Added 2:
USB created with Make Startup Disk from Ubuntu LiveUSB 20.04 LTS (usb-creator-gtk from terminal). Not quite bootstrapping, still made me recall that word.

Added 1: /usb_path/Ubuntu 20.04 LTS amd64/boot/grub

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

set timeout=5
menuentry "Ubuntu" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
    initrd  /casper/initrd
}
menuentry "Ubuntu (safe graphics)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash nomodeset ---
    initrd  /casper/initrd
}
menuentry "OEM install (for manufacturers)" {
    set gfxpayload=keep
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed only-ubiquity quiet splash oem-config/enable=true ---
    initrd  /casper/initrd
}
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'Boot from next volume' {
    exit
}
menuentry 'UEFI Firmware Settings' {
    fwsetup
}
fi
Score:1
cn flag

Persistence Files and Partitions

Writable, (casper-rw) and home-rw persistence overlays may exist as files located on any FAT32 partition of a drive or as individual ext 2,3, or 4 partitions on the drive.

The OS will use the first file it finds while booting named writable and the first file or partition it finds named home-rw. A drive may have multiple sets of persistence files but each set must be located in a uniquely named folder. The path to these folders is specified in grub.cfg. Typically the maximum size of a persistence file is 4GB, there are ways to use larger persistence files but the methods are complicated, (see YUMI and Ventoy).

An OS is limited to only one persistence partition named either "writable" or "casper-rw", for OS files and one persistence partition named "home-rw" for home directory files. Persistence size is only limited by the size of the drive.

To access a persistent file: https://askubuntu.com/a/101582/43926

Persistent-path Ref: https://askubuntu.com/a/1269476/43926

Martian2020 avatar
ec flag
You write: "The path to these folders is specified in grub.cfg." I added full grub.cfg to the question as Added 1. I could not see that path right away. Where is it exactly?
Martian2020 avatar
ec flag
I'm re-created USB (see Added 2, `usb-creator-gtk`) in the question. `grub.cfg` file looks the same.
C.S.Cameron avatar
cn flag
For a persistent boot you need to add the word `persistent` to the linux line in your first GRUB menuentry, ie: `linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash persistent ---`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.