Score:3

How to turn my Live USB to Persistence Live USB?

in flag

I don't have another computer to use rufus and create a persistent USB. For that reason I used my android to make my USB bootable. Yeah, I've created a ext4 partition. I just want to use that as a persistence drive. I have 2 partitions on my usb. 1 is fat 32 which is /dev/sda1. The second one is ext4 which is /dev/sda2. I want to use my /dev/sda2 as a persistence partition. How can I do that?

Score:5
cn flag

Turn Live USB into Persistence Live USB?

You can not use a FAT32 partition for persistence, for this you need ext2, ext3 or ext4. You can however add a persistence file named writable to a FAT32 partition, but it will be limited to 4GB. A second persistence file named home-rw can also be added for a total of 8GB.

For a persistent partition:

  • Boot the USB using the toram option*.

  • Unplug then replug the USB drive.

  • Open GParted and create a second ext4 partition and label it either writable or casper-rw.

  • Open the system partition and edit /boot/grub/grub.cfg adding a space and the word persistent to the end of the first menuentry right after ---.

If system partition is not editable, ie if it's ISO9660, or an ISO file, you may need to enable persistence each boot, (similar to using toram).

If you decide to use persistence files:

sudo dd if=/dev/zero of=casper-rw bs=1M count=512
sudo mkfs.ext4 -F casper-rw
  • (Replace 512 with the "size in MB" you require, max 4000)
  • For Ubuntu 20.04 and later replace casper-rw with writable
  • For a home-rw partition replace casper-rw with home-rw

Booting toram

After turning on the computer, press Shift.

If it boots BIOS mode a language screen will come up, press Esc. Press F6 then press Esc again. At the bottom of the screen type a space and toram.

If the computer boots to a GRUB menu, type the letter e next to the first menu item. Go down to the line that starts with linux and at the end of it after ---, type a space and toram. Press F10 to boot.

Ashiq Tasdid avatar
in flag
If I create a persistence file, Will I have to repeat this thing everytime I boot?
Ashiq Tasdid avatar
in flag
I have created the home-rw and writable file. What should I do next?
C.S.Cameron avatar
cn flag
Were you able to edit /boot/grub/grub.cfg?
Ashiq Tasdid avatar
in flag
there is no grub.cfg file. It doesn't exists
C.S.Cameron avatar
cn flag
Where did you put the Ubuntu system files, The FAT32 partition or the ext4 partition? Is there a folder named **boot** with a folder named **grub** inside? Is there a folder named **cdrom**? look inside that.
Ashiq Tasdid avatar
in flag
The system files are in Fat32 partition. Yeah there is a boot folder. And yet there is also a folder called grub inside of it. But, There are no cdrom folder
Ashiq Tasdid avatar
in flag
I found it. I've opened the grub.cfg file. What to do next?
C.S.Cameron avatar
cn flag
Add a space and the word `persistent` to the end linux line of the first menuentry right after ---, 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.