I have a question about GRUB2,Ubuntu and initrd:
I need at kernel level(initrd) unknown for me command (with used grub2) to disable boot/detect/use specific partition of disk(by /dev/sdX# or by Label or by UUID).
For example, I have live-CD/USB of Ubuntu + persistent (With casper-rw Labeled partition) on my SSD. And I want to use another partition like USB-disk on the same computer with other persistent partition(also must be Labeled partition as casper-rw) I'll do this with kernel command "persistent persistent-path=/live-usb" where "/live-usb" is a dir where is the placed file named "casper-rw".
But boot priority is given to the partition on the SSD-disk and not USB-disk (partition with file). If I rename the partition label on the SSD-disk to something else than "casper-rw" - then persistent works well with the file partiton. So I need the ability to disable boot/detect/use of a specific partition on the SSD-disk at the boot time of Ubuntu.
Thanks.
2 Answers
I think persistent-path
works only with a casper-rw file, and not with a partition.
There are two alternatives with partitions that I can suggest.
Relabel the
casper-rw
partition that you don't want to use to something else, e.g.casper-rw0
(you know this alternative already).If you use Ubuntu 20.04 LTS or newer, you can relabel the partition that you want to give priority to
writable
, and it should be selected (when detected) before the partition with the labelcasper-rw
. This alternative may be more attractive.
Using Multiple casper-rw Partitions on the Same Computer?
One method to get multiple persistent partitions on the same computer, would be to put your Persistent partitions on separate USB drives and plug in the drive with the persistence you want to use, before booting.
This method does not seem have much advantage over using two persistent USB drives.
casper-rw
orwritable
partition the boot encounters, The only way I have found to get multiple persistence to work is by usingcasper-rw
orwritable
files and by usingpersistent-path
. YUMI manages to get multiple persistent files of unlimited size working, but only using BIOS boot. I managed to duplicate that method once, I recall the method uses GRUB for DOS with virtual partitions and persistent-path.