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?
1 Answers
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
toramoption*.Unplug then replug the USB drive.
Open GParted and create a second ext4 partition and label it either
writableorcasper-rw.Open the system partition and edit /boot/grub/grub.cfg adding a space and the word
persistentto 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-rwwithwritable - For a
home-rwpartition replacecasper-rwwithhome-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.
- 18,890
- 10
- 64
- 105
-
If I create a persistence file, Will I have to repeat this thing everytime I boot? – Ashiq Tasdid Aug 02 '21 at 06:35
-
I have created the home-rw and writable file. What should I do next? – Ashiq Tasdid Aug 02 '21 at 06:38
-
Were you able to edit /boot/grub/grub.cfg? – C.S.Cameron Aug 02 '21 at 06:57
-
there is no grub.cfg file. It doesn't exists – Ashiq Tasdid Aug 02 '21 at 07:06
-
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. – C.S.Cameron Aug 02 '21 at 07:25
-
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 Aug 02 '21 at 07:32
-
I found it. I've opened the grub.cfg file. What to do next? – Ashiq Tasdid Aug 02 '21 at 07:33
-
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` – C.S.Cameron Aug 02 '21 at 07:39