1

I am unable to set up persistence on my Lubuntu. The settings never save and the files I stock on any partition get deleted. I've been trying Rufus, Unetbootin, rufus then trying to partitionate manually in Windows 10 and same with Unetbootin (and the precedent way in linux too). I sometime got a new Volume that apeared, but I know there is somethings missing (like a casper-rw file & modifications in some files, I think). I don't know how I can solve that. I've been able to read little about similar problems, but it was always missing steps(or error 404).

I would like to get help please. Could you please write and explain completely the steps to solve my problem. I have some good knowledge on Linux but I wish it will be clear for me as I've seen one solution with uncompleted bash commands and missing steps... I would be very grateful!

ao32123
  • 11

1 Answers1

2

Simple Hand Made Persistent USB

This exercise should show you how to build a Persistent USB from the ground up. It has a casper-rw/writable Persistence partition, a NTFS/FAT32 Data partition and will boot in either BIOS or UEFI mode. It can be easily modified to multiboot etc.

  • Boot Installed Ubuntu or Live USB.
  • Insert Target USB.
  • Start GParted.
  • Create a GPT partition table on Target USB.
  • Create a 1MB BIOS boot partition on the left, formatted as unformatted.
  • Add a 300MB FAT32 EFI boot partition next to it.
  • Add an ext4 root partition large enough for the Ubuntu ISO's contents, (~ 3GB for 20.04).
  • Create an ext4 partition labeled casper-rw
  • Add a NTFS data partition if desired.
  • Apply all operations.
  • Flag partition 1 bios_grub.
  • Flag Partition 2 boot, esp
  • Close GParted.

gparted

  • Open the ISO's folder as Administrator, open the ISO using Archive Manager.
  • Extract the ISO's contents to the Target's root partition.
  • Drag and drop the boot and EFI folders from Archive Manager window to the EFI boot partition.
  • Edit sdx2/boot/grub/grub.cfg adding set root=(hd0,3) after the "Try Ubuntu ..." line.
  • Add a space and the word "persistent" after ---.

grub.cfg

  • Install grub, if in BIOS mode or booted from Live USB drive run:

      sudo mount /dev/sdx2 /mnt
    

    sudo grub-install --boot-directory=/mnt/boot /dev/sdx

  • If in UEFI mode on installed system, boot into the Target drive and run the above commands.

*Booting based on mkusb by sudodus

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125