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
  • 3
  • You haven't mentioned which Lubuntu (modern or legacy), but the Lubuntu team recommend mkusb (https://help.ubuntu.com/community/mkusb https://help.ubuntu.com/community/mkusb#Persistent_live_systems) The starting point is your release (there are 3 supported installers for Lubuntu, and thus the release & ISO in question does matter; 2 of the 3 have been tested & work; the third makes no sense being used in that way) – guiverc Oct 20 '20 at 22:26
  • It's the newest Lubuntu – ao32123 Oct 20 '20 at 22:37
  • So if I download live ubuntu then use mkusb to create persistent lubuntu live, it is supported thus working? – ao32123 Oct 20 '20 at 22:39
  • 1
    Your question needs to be more specific. You did not specify a release (which one is "newest?" Are you sure?) You did not link to any instructions that you followed (maybe they were unofficial or ancient). Alternately, you did not list the steps that you followed. You did not provide any troubleshooting details beyond "it didn't work". If you encountered any errors, you did not mention them. Help us to help you. – user535733 Oct 20 '20 at 22:43
  • The most recent Lubuntu is 20.04 LTS I found very few pages with problems looking alike, for example:

    https://askubuntu.com/questions/168246/why-isnt-persistence-working-on-lubuntu-12-04-live-usb

    But I can't procede because the files are unexistant/different. When I tried different creators, I saved files on desktop and in the new created partition I named "casper-rw". They always disapeared at reboot. I tried modifying some .cfg files with what I understood about a site (write "persistent" everytime you see "--" at the end).

    – ao32123 Oct 20 '20 at 22:53
  • Lubuntu 20.04 isn't the latest; 20.04.1 is later (and it's not the latest ISO released either; 18.04.5 was released a week after 20.04.1 so details matter). The question you linked was for a much older ubiquity ISO, I'd instead suggest https://askubuntu.com/questions/1283839/how-do-i-make-my-live-ubuntu-on-a-usb-stick-persistant/1283905#1283905 which links to another too if needed – guiverc Oct 20 '20 at 23:02
  • That's about all I found. – ao32123 Oct 20 '20 at 23:06
  • I know there are many reasons it doesn't work so that's why I am asking here to get help to solve my problem. – ao32123 Oct 20 '20 at 23:09
  • I think from 20.04 the persistence partition/file has to be named writable – schrodingerscatcuriosity Oct 20 '20 at 23:09
  • My first link is how it was tested & proven to work by the Lubuntu team itself, why I started with the mkusb link. If you're patient one of the maintainers of mkusb may see & respond to this with knowledge far beyond me (I've already linked to a tester again with more knowledge & understanding than me). Until then I've provided where I'd look... – guiverc Oct 20 '20 at 23:10
  • So if I follow the steps on https://help.ubuntu.com/community/mkusb in Ubuntu OS, I will be able to make a persistent live USB with my lubuntu-20.04.1-desktop-amd64.iso ? – ao32123 Oct 20 '20 at 23:18
  • That has been tested & works. It's tested numerous times during development (to ensure no issues have changed; which has been numerous times during the current groovy development cycle), but yes it's been tested & works. I'd verify your ISO is valid as per manual; https://manual.lubuntu.me/stable/1/1.1/retrieving_the_image.html – guiverc Oct 20 '20 at 23:21
  • I'll get back to you on that! Let's test it – ao32123 Oct 20 '20 at 23:31
  • Also maybe useful, https://discourse.lubuntu.me/t/create-persistent-usb-with-manual-install/1498/2 which leads you to https://askubuntu.com/questions/1181854/how-is-it-easier-to-make-a-persistent-live-drive-with-ubuntu-19-10 (you'll note answer was updated last on 20.04 release even though written for 19.10) – guiverc Oct 21 '20 at 00:18
  • 1
    @schrodigerscatcuriosity: For Ubuntu 20.04 a persistent file must be named writable a persistent partition can be named either writable or casper-rw. A separate persistent home file or partition can be named home-rw. – C.S.Cameron Oct 22 '20 at 05:02
  • @C.S.Cameron Sorry to annoy you with this, I'm developing my own multiboot usb software, if you are interested to check on it, in my profile there's a contact mail. – schrodingerscatcuriosity Oct 24 '20 at 00:07
  • @schrodigerscatcuriosity That email address is not working for me. – C.S.Cameron Oct 24 '20 at 01:34
  • @C.S.Cameron Now it's fixed. – schrodingerscatcuriosity Oct 24 '20 at 01:42

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
  • 19,519