1

I have installed Ubuntu 14.04.3 to a 16GB pendrive so as to obtain a Live OS that stores persistent data on an ext4 partition. I followed the instructions on various tutorials and answers, recently on this: How do I get a live-USB to use a partition for persistence?

Everything works fine except persistence.

This is what I did:

  1. Boot from a live Ubuntu on USB (here: USB2) without a persistent file.
  2. Insert another USB (here: USB1), open gparted, unmount and delete all partitions.
  3. Select "unallocated" and create two partitions:
    sdc1: 1 - 2170 - auto - MiB // Primary Partition - fat32 - OS
    sdc2: 0 - auto - 0 - MiB // Primary Partition - ext4 - casper-rw
  4. Extract USB1 and then insert it in a Windows machine. Install Ubuntu on OS using "UNETBOOTIN" (but I've also used "Universal USB Installer", no difference later on) and set a 10 MiB persistent file.
  5. Delete casper-rw under Windows (but I've also done it under Ubuntu).
  6. Boot Ubuntu from USB2, insert USB1, open GParted and Right Click on the fat32 partition (OS 2.10 GiB), select Manage Flags and check "Boot" and "lba" ("Boot" is already checked; checking "lba" does not seem to change the situation later on).
    The "casper-rw" is now larger than 4GB (12.81 GiB), but persistence does not work.
  7. Modify the file "txt.cfg" as reported here below.

But even so persistence does not work. Can someone help? Many thanks in advance.

default live

label live

  menu label ^Try Ubuntu without installing

  kernel /casper/vmlinuz.efi

  append  file=/cdrom/preseed/ubuntu.seed boot=casper cdrom-detect/try-usb=true persistent noprompt floppy.allowed_drive_mask=0 ignore_uuid initrd=/casper/initrd.lz quiet splash --

label live-install

  menu label ^Install Ubuntu

  kernel /casper/vmlinuz.efi

  append  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity cdrom-detect/try-usb=true persistent noprompt floppy.allowed_drive_mask=0 ignore_uuid initrd=/casper/initrd.lz quiet splash --

label check

  menu label ^Check disc for defects

  kernel /casper/vmlinuz.efi

  append  boot=casper integrity-check cdrom-detect/try-usb=true persistent noprompt floppy.allowed_drive_mask=0 ignore_uuid initrd=/casper/initrd.lz quiet splash --

label memtest

  menu label Test ^memory

  kernel /install/mt86plus

label hd

  menu label ^Boot from first hard disk

  localboot 0x80
  • Are you trying to boot on a UEFI machine in UEFI mode? txt.cfg is not the file to edit in that case, it's grub.cfg – ubfan1 Dec 14 '15 at 5:47
  • Many thanks! I will try that as soon as possible and then report. – Robi Fiorita Dec 14 '15 at 16:41
  • @ubfa1 I went over the whole procedure once more, but editing the relevant grub.cfg instead of n. 7. above. This is what I did: Here it is: menuentry "Try Ubuntu without installing" { set gfxpayload=keep linux /casper/vmlinuz.efi persistent file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- initrd /casper/initrd.lz } But the result was a black screen! Can you help? – Robi Fiorita Dec 15 '15 at 16:50
  • I usually put the "persistent" after the "boot=casper", but a black screen may be a video problem -- try the nomodeset option (edit grub.cfg or a function key at the grub menu). – ubfan1 Dec 15 '15 at 21:26
  • Now I have the "persistent" after the "boot=casper", but I still get a black screen. I will try the nomodeset option, if I find out how to do that. But why should it be a video problem, if everything works fine without the word "persistent"? Many thanks! – Robi Fiorita Dec 16 '15 at 8:02
0

Syslinux has not allowed persistent partitions on the same drive since Ubuntu 14.04.

However a Syslinux type install, (UNetbootin, Rufus, Universal), will use a persistent partition labeled casper-rw or home-rw if it is located on a different drive, either internal or external. It will use the first casper-rw file or partition it finds while booting

If you want a casper-rw partition on the same drive use grub2 type bootable disk creator like mkusb, (that works with BIOS and UEFI), or install grub2 to the USB manually and loop mount an ISO.

If you simply need more than 4GB persistence you can use YUMI to make the drive, it's casper-rw file can be larger than 4GB and there is a UEFI version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.