This question already has an answer here:

2GB is the recommended size of an usb stick for a live image. On my 4GB stick there is space to add some other packages which I frequently use (e.g. programs to make backups).

Is it possible to easily add such packages to the stick such that they are available on my live system? -->yes

Is it mandatory to use the persistent method for this purpose?

Is it possible to this such that those added packages on the stick will all automatically be installed when I install from this augmented live image stick?

What are the necessary steps for these tasks? -->see https://help.ubuntu.com/community/mkusb.

Edits: I already created an usb stick from the file xubuntu-18.04.1-desktop-amd64.iso using usb-creator-gtk. There are 695 objects in 1.4GB on this 4GB stick, so there should be plenty of free space.

Exploring this stick with GParted shows strange things:

  • sdb1 with 4kB,
  • then 5,67MB unassigned,
  • then sdb2 with 2,28 MB,
  • the rest is unassigned.

I don't believe that! I can boot from this stick and try out Xubuntu 18.04 but I have seen that some packages which I always need are missing on the stick and I would like to add them.

From the comments to this post I learned the keyword persitent and in the German Wiki https://wiki.ubuntuusers.de/Archiv/Live-USB_-_persistente_Installation/ I found an explanation for it (however this article is old and an archieved one, apparently from Jan. 2014, so it might be outdated for current versions of Ubuntu): On such an installation there is a second partition which is marked as something special to hold all modified settings of the live system including the files added to it. According to the cited article, this second partition is created this way: sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sdXY where XY has to be modified such that it specifies the usb stick to be used. But before this step, some other steps have to be done as described in that article.

In the comments there is a reference to mkusb. Looking at https://help.ubuntu.com/community/mkusb#Persistent_live_systems I also found a reference to persistent usb drives.

marked as duplicate by WinEunuuchs2Unix, Fabby, Eric Carvalho, Thomas Ward Dec 12 '18 at 19:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    @Yaron I marked this as duplicate as per my understanding of the question. And I believe that OP wants a persistent USB. – Kulfy Dec 11 '18 at 14:19
  • You can use mkusb to create a persistent live drive, which has another partition table with read/write access to a casper-rwpartition, where the system will store program packages, shellscripts (and simple data files). This will be created automatically by mkusb according to the details in links from the previous comments. But 4 GB is rather small for a persistent live drive. I would recommend a fast USB 3 drive with at least 16 GB which will give you more storage space and better performance. – sudodus Dec 11 '18 at 15:41
  • 1
    Remastersys used to be the way to go for custom boot iso's but has been discontinued. There are several forks around. IsoRespin is one of the simpler to use. linuxiumcomau.blogspot.com/2017/06/… . others include Cubic: askubuntu.com/questions/741753/… – C.S.Cameron Dec 12 '18 at 5:16
  • 1
    Have you got answers for your doubts or are any questions unanswered in this post? Also, the edit you made just now seems to be like an answer to your question – Kulfy Dec 12 '18 at 12:15

A persistent Live USB is essentially a copy of the installation DVD.

The files in the original ISO remains as is in a read only file system. All the Updates and extra software you install are saved in the space designated for keeping the changes. Say, you update Firefox. in a normal installation the old one is replaced. In persistent installation the old one stays as is, the newer version is located in the persistent virtual disk (within the USB) taking up extra space and sometimes creating problems. If you install an extra software like Chrome in a persistent Live USB, it will get installed in the same virtual disk. Now if you install Ubuntu from this persistent copy into another hard drive the original version of Firefox in the DVD image will get installed and the Chrome will be ignored.

Also see What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive?

How to make a custom ISO

To have a Live USB that includes all the software you want in Ubuntu, you need to create a custom ISO file with those software packed in it. Make sure this custom ISO is less than 4GB to fit your USB drive. Then you will need to create a Live USB using this custom ISO.

See Ubuntu help on customizing the ISO file.

ISORespin and Cubic are two software options mentioned in the comments. I don't know anything about these.

I hope this helps

  • Are LiveCDCustomization instructions still working? I understand UCK is no longer supported. The Remastersys forks never seem to stay supported for long. – C.S.Cameron Dec 13 '18 at 3:47
  • I have not tested it. – user68186 Dec 13 '18 at 4:02

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