I recently installed the newest version of lubuntu live to a USB, but as my USB is only 4 gig it wont save the persistence correctly, I was wondering if there was a loophole, that would let me put in a file to be installed onto the temporary hard drive created in the RAM. so my question is, where is the information to load/ install the applications on the USB.
-
1Please tell us: 1. which version (name of the iso file) that you downloaded; 2. which tool you used to create a persistent live drive; 3. Have you got more than one USB pendrive, hard disk drive or solid state drive? Or are you considering persistence in an internal drive?– sudodusApr 11, 2018 at 17:11
-
11. I used lubuntu-17.10.1-desktop-amd64.iso 2. i used PDL-Casper-RW-Creator.exe after using rufus to burn it. 3. i have two 4gb usbs and 1 1gb usb and i cannot use the hard drive on the computer (work)– user9586765Apr 12, 2018 at 2:55
-
The information to load/ install the applications on the USB is stored on a file or partition named casper-rw, Casper-rw can be located anywhere on the boot path from a partition on the internal drive to a partition on the Persistent USB to a file on the root of the USB to a folder anywhere on the drive if the folder name is listed as persistent-path in grub.– C.S.CameronApr 17, 2018 at 17:46
1 Answer
What you can do with your two 4GB USB pendrives
I think the best thing you can do with your current USB drives is the following.
Boot from the drive with Lubuntu 17.10.1 (which is live-only)
Install
mkusb
,sudo add-apt-repository universe # only for standard Ubuntu sudo add-apt-repository ppa:mkusb/ppa # and press Enter sudo apt-get update sudo apt-get install mkusb mkusb-nox usb-pack-efi
This works but will not be persistent.
Make the
lubuntu-17.10.1-desktop-amd64.iso
file available to the live-only system (by connecting a drive with the file and copying or downloading the file again).Use mkusb to create a persistent live Lubuntu system in the second 4 GB USB pendrive. See this link: help.ubuntu.com/community/mkusb/persistent
Select 100% for persistence (which may cause complaints, but it should work anyway).
Shutdown and remove the first (live-only) USB drive.
Boot into the second and now persistent live USB pendrive. You can stop here.
If you want more drive space for persistence, you can connect the first (live-only) USB drive.
Use gparted to
- remove the partitions on the first (live-only) USB drive,
- create a partition with an
ext4
file system - and put the label
home-rw
on that partition. - If problems with gparted, install mkusb in this persistent live system and use it to wipe the first mibibyte. After that gparted should work (Select 'device' and create a partition table and after that a partition ...)
Reboot into the persistent live USB drive and select Try Lubuntu (not with persistence).
- Connect the
home-rw
USB drive. copy the content of
/home
to the home partition, dry run to check,sudo rsync -Havn /media/lubuntu/casper-rw/upper/home/ /media/lubuntu/home-rw
and the real copying (without the option
n
)sudo rsync -Hav /media/lubuntu/casper-rw/upper/home/ /media/lubuntu/home-rw
- Connect the
Reboot with both USB pendrives connected.
If you cannot select the correct USB drive for booting, the one with the operating system, you can boot and when at the grub menu connect the other USB drive (with
home-rw
). Then continue from the grub menu.Now you should have a persistent live system with a maximum 3 GB
casper-rw
partition for the root file system (to install programs etc) and a 4 GBhome-rw
partition for/home
, and you can use a total of 7 GB for persistence.When you have confirmed, that your system is persistent, and that it uses both
casper-rw
andhome-rw
, you can remove/media/lubuntu/casper-rw/upper/home/
.
Check that it looks like this:
You can right-click on the screenshot and open it in a big window to see it in full size.
Command lines and output from them:
lubuntu@lubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 384M 6.1M 377M 2% /run
/dev/sdc4 925M 925M 0 100% /cdrom
/dev/loop0 863M 863M 0 100% /rofs
/cow 2.6G 137M 2.3G 6% /
/dev/sdb1 3.7G 8.0M 3.4G 1% /home
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 4.0K 1.9G 1% /tmp
tmpfs 384M 8.0K 384M 1% /run/user/999
/dev/sdc5 2.6G 137M 2.3G 6% /media/lubuntu/casper-rw
lubuntu@lubuntu:~$ sudo parted /dev/sdb p
Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdb: 4005MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 4005MB 4003MB primary ext4
lubuntu@lubuntu:~$ sudo parted /dev/sdc p
Model: JetFlash Transcend 4GB (scsi)
Disk /dev/sdc: 4052MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1247MB 989MB primary
5 1247MB 4051MB 2804MB ext2 primary
1 4051MB 4052MB 681kB primary msftdata
lubuntu@lubuntu:~$ sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
loop0 squashfs /rofs
sda
├─sda1 vfat AD68-7CA2
├─sda2 ext4 lubuntu 0162276e-c99e-43b5-87c3-59bb064af44b
├─sda3 swap b66eb718-af47-41d0-9932-e35cdaae11c3 [SWAP]
└─sda4 ext4 xubuntu-core ad262cdc-ba80-4536-b686-1caf1b5ef441
sdb
└─sdb1 ext4 home-rw d43d50f7-f372-47da-9f22-eb075e725164 /home
sdc
├─sdc1
├─sdc2
├─sdc3 vfat usbboot BF5D-50BE
├─sdc4 iso9660 Lubuntu 17.10 amd64 2018-01-06-00-29-08-00 /cdrom
└─sdc5 ext4 casper-rw 03f25a82-d74b-497e-b86e-a6efaf749d6f /media/lubuntu/casper-rw
sr0
zram0 [SWAP]
zram1 [SWAP]
zram2 [SWAP]
zram3 [SWAP]
lubuntu@lubuntu:~$ sudo lsblk -m
NAME SIZE OWNER GROUP MODE
loop0 863M root disk brw-rw----
sda 111.8G root disk brw-rw----
├─sda1 512M root disk brw-rw----
├─sda2 15G root disk brw-rw----
├─sda3 3.9G root disk brw-rw----
└─sda4 15G root disk brw-rw----
sdb 3.7G root disk brw-rw----
└─sdb1 3.7G root disk brw-rw----
sdc 3.8G root disk brw-rw----
├─sdc1 665K root disk brw-rw----
├─sdc2 1M root disk brw-rw----
├─sdc3 244M root disk brw-rw----
├─sdc4 943M root disk brw-rw----
└─sdc5 2.6G root disk brw-rw----
sr0 1024M root cdrom brw-rw----
zram0 478.9M root disk brw-rw----
zram1 478.9M root disk brw-rw----
zram2 478.9M root disk brw-rw----
zram3 478.9M root disk brw-rw----
lubuntu@lubuntu:~$
More powerful alternative
Things will work better (and be easier), if you get a fast USB 3 pendrive with at least 16 GB, and create a persistent live Lubuntu system in that drive.