After many unsuccessful trials based on almost everything about this topic on the Internet, I decided to ask this question again. There is almost a perfect answer in this platform, but it did not work. That's why I am here.
I want to have Ubuntu 18.04 installed on my USB memory stick (SanDisk Cruzer Glide 32GB) with a persistent storage of more than 4GB (at least 23GB in my case).
I used MiniTool partition wizard to format the stick (NTFS) on Windows. Then, I used Universal USB Installer 1.9.8.2 to install Ubuntu 18.04 on the stick. Here, I tried to format the stick either fat32 or ntfs, but nothing changed. Later, I used another Ubuntu to delete the casper-rw file and create another partition with the same name by following the steps given in the link given above. Unfortunately, I couldn't make it working although I tried almost all combinations.
Can anyone give a thorough list of steps to follow in order to install it on the stick properly?
Edit: I gave ear to @c-s-cameron 's comment below and used YUMI to do that, and it worked. I believe all other answers would work, but I dont have time to give a try for all of them. Thanks all, again!
I suggest that you try mkusb. It can create a persistent live drive with a
casper-rw
partition almost automatically (it is an option in the graphical user interface).casper-rw
partition is only limited by the size of the USB drive (and the size of a 'competing'usbdata
partition (for exchange of data with Windows) that you may give drive space). You can select 100% (of the remaining space, when the system files are installed) for persistence and use most of the drive space for thecasper-rw
partition.If you run standard Ubuntu live, you need an extra instruction to get the repository Universe. (Kubuntu, Lubuntu ... Xubuntu have the repository Universe activated automatically.)
Links
help.ubuntu.com/community/mkusb
help.ubuntu.com/community/mkusb/persistent
Quick start manual mkusb version 12 alias mkusb-dus
**Full Install to USB - BIOS/UEFI **
Full installs have a few advantages over Persistent installs, more secure, faster boots, better file management, but do not work installing Ubuntu.
If you would like your USB drive to be able to boot from multiple computers, both BIOS and UEFI:
Use mkusb to make a Live system on the Installer USB (2GB or larger).
Use mkusb to make a Persistent system on the Target USB, 16GB or larger, using default settings with ~12GB persistence, (remaining NTFS partition is used as Windows accessible data partition).
Open GParted and delete sdx4, the ISO9660 partition and expand sdx5 into the recovered space, sdx being the device name of the Target drive.
Unplug or remove HDD before proceeding further, (optional but recommended, highly recommended in UEFI mode).
Boot Installer drive, select Try.
Insert Target drive
Start Install Ubuntu...
Select Something else.
Select sdx5, (on the target drive), and click Change.
Select Use as: ext4, Format and Mount point: /.
Don't touch any other partitions (unless adding a /home partition).
Select sdx5 for boot loader installation.
Complete installation.
Cut grub.cfg from sdx5/boot/grub and paste to sdx3/boot/grub, overwriting the existing grub.cfg file.
Boot the target drive and run sudo update-grub to add all drives to boot menu.
Syslinux type installers like Universal, UNetbootin and Rufus do not allow persistent partitions on the same disk.
It is possible to install a casper-rw partition on a second disk. It can be an internal drive or a flash drive or other USB device. The first casper-rw file or partition encountered while booting is used for persistence.
YUMI will allow you unlimited casper-rw file size on NTFS, it is a Windows app and uses grub4dos to make large casper-rw files. YUMI can make multiple Persistent installations on a USB drive. https://www.pendrivelinux.com/yumi-multiboot-usb-creator/
For a persistent drive I prefer mkusb, (a Linux app), it can be installed to your 18.04 USB. It uses a FAT32 partition for boot, a read only ISO9660 partition for the OS, a ext2 casper-rw partition for persistence and a NTFS data partition that can be used by Linux and Windows. A mkusb drive is easy to customize. https://help.ubuntu.com/community/mkusb
Rufus is able to create persistent live drives that work in both UEFI (MBR or GPT) and BIOS mode, with casper-rw being used for the persistent storage partition, so it can have a size of more than 4GB. Ubuntu Live ISOs created after August 1, 2019 support the persistent storage feature, so persistent partitions are only working with Rufus 3.7 and later using Ubuntu 19.10 and later. For best results please upgrade Rufus to version 3.9 or later.