2

I can't install applications in Ubuntu 18.04.4 LTS version while using live persistence USB. Some of the installations work but most of them doesn't. It always keep showing errors while installation like add CD-ROM, unable to locate package, couldn't find any package etc. I already tried installation of many applications but only some of them work. Normal ways of installation isn't working this way. I made the live persistence USB by this tutorial https://www.youtube.com/watch?v=dCjvrJEdy0E from another Ubuntu live USB.

3 Answers3

2

Installing application programs in a persistent live drive

My experience is that most application programs can be installed and/or upgraded in a persistent live system. But there are a few things to consider.

  • Many application programs are stored in the repository Universe. If you run standard Ubuntu live, you need an extra instruction to get it. (Kubuntu, Lubuntu ... Xubuntu have the repository Universe activated automatically.)

    sudo add-apt-repository universe  # only for standard Ubuntu live
    
  • Some software, for example the linux kernel and the kernel drivers are activated before the overlay for persistence. This means that it will not work to make updates work for them (even if you have installed new program packages for them).

sudodus
  • 46,324
  • 5
  • 88
  • 152
2

Installing VirtualBox into Ubuntu persistent live

  • Create a persistent live system of Ubuntu 18.04.4 LTS using mkusb

  • Install virtualbox into the persistent live system using the Debian package from the VirtualBox web site

  • Download the version for your version of Ubuntu

  • Run a series of terminal window commands. I started by making my persistent live system up to date, and then run dpkg to install the package. Looking at the error output, I could identify which additional packages, that must be installed. See the following list of commands (printed with the command 'history').

     1  sudo apt update
     2  sudo apt full-upgrade 
     3  setxkbmap se  # keyboard for my native language
     4  ls *
     5  cd Downloads/
     6  ls
     7  dpkg -i virtualbox-6.1_6.1.10-138449~Ubuntu~bionic_amd64.deb 
     8  sudo dpkg -i virtualbox-6.1_6.1.10-138449~Ubuntu~bionic_amd64.deb 
     9  sudo add-apt-repository universe
    10  sudo dpkg -i virtualbox-6.1_6.1.10-138449~Ubuntu~bionic_amd64.deb 
    11  sudo apt install libcurl4 libqt5opengl5 libqt5printsupport5 libqt5x11extras5 libsdl1.2debian
    12  sudo dpkg -i virtualbox-6.1_6.1.10-138449~Ubuntu~bionic_amd64.deb 
    13  sudo /sbin/vboxconfig
    14  sudo apt install gcc make perl
    15  sudo /sbin/vboxconfig
    16  virtualbox
    

I downloaded a Lubuntu iso file and booted a live session from it in VirtualBox to check that it really works according to these instructions.

Right-click on the screenshot, open in another window and watch it in full screen to see details:

enter image description here

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Impressive. I'm amazed that a Live environment can be stretched so far! – user535733 Jun 17 '20 at 17:34
  • @user535733, It helps with a lot of RAM and a fast drive. In this case 16 GB RAM and an SSD. – sudodus Jun 17 '20 at 18:36
  • @Sudodus: I have had better luck with VBox from Ubuntu Software than from the VirtualBox.org site. – C.S.Cameron Jun 18 '20 at 10:03
  • @C.S.Cameron, I think there are pros and cons with both methods to install VirtualBox. – sudodus Jun 18 '20 at 10:31
  • @Sudodus: I think we had that discussion a couple of years ago: https://askubuntu.com/questions/1016892/trying-to-set-up-virtualbox-with-live-persistent-usb-made-using-mkusb/1017418#1017418 – C.S.Cameron Jun 19 '20 at 03:10
  • Did a bit more searching, I now recall eventually having problems with VBox on Persistent USB and switching to Full install. It has been over 3 years with daily use and the Full install with VBox is still working. https://askubuntu.com/questions/911626/is-it-possible-to-run-a-bootable-image-iso-windows-from-usb/911905#911905 – C.S.Cameron Jun 19 '20 at 03:35
  • @C.S.Cameron, Yes, thanks for reminding me of that discussion :-) I guess it varies with time (and version of Ubuntu) which version of VirtualBox works better with Ubuntu. It might also differ how easy it is to make extra features like USB connection to work. Please notice also that I only show here what is possible, not what is the best method. – sudodus Jun 19 '20 at 06:54
1

Full Install vs Persistent install

A Persistent install is a wonderful and quick way to get started with Ubuntu.

For long term use consider doing a Full install to USB, It does not suffer from the irritating 20.04 disk check problem when booting.

A Full install USB and a Persistent install USB both save data and installed programs after reboot.

Comparison between Persistent and Full install USB

Advantages of a persistent install:

  1. You can use the persistent pendrive to install Ubuntu to another computer.

  2. A persistent install takes up less space on the pendrive.

  3. You can reset the pendrive by overwriting the old casper-rw file with a new one.

  4. The install to pendrive takes less time.

Advantages of a Full install:

  1. You can update and upgrade.

  2. If you have problems or wish to modify, the solution is the same as with an internal install, (You can ask for help in these forums).

  3. No ugly startup / install screen.

  4. Better security, you can use full encryption

  5. You can use proprietary drivers.

  6. Hibernation works.

  7. A persistent install for some installers, (UNetbootin, YUMI BIOS/UEFI), is limited to a 4GB casper-rw and a 4GB home-rw persistence file, to get more persistence requires persistence partitions, as used by mkusb and Rufus. Once casper-rw is full in any persistent drive, the drive will not boot.

  8. More efficient usage of disk space. Does not require reserved space for persistence and when programs are updated the original program data remains in the squashfile and the new data is added to casper-rw/writable.

  9. Faster boot, no automatic disk checking or Try Ubuntu/Install Ubuntu screen. (Mkusb has fixed this bug)

Note that once booted, both methods run at about the same speed.

Full Install Method

One method for creating a Full install USB: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

C.S.Cameron
  • 19,519
  • 1
    +1, It is a good idea to mention a full install to USB here. It has many good features, and I use such a system myself :-) but I think you exaggerate the advantages of a full install versus a persistent live system (for example: if you use mkusb or Rufus, there will be a partition for persistence automatically, so no size limit; usage of disk space is not worse for persistent live; you can avoid automatic disk checking in [persistent live] drives by mkusb; and I show here that you can use VBox in a persistent live drive). – sudodus Jun 18 '20 at 07:27
  • 2
    @sudodus; Yes I need to update. By more efficient I mean that with a Persistent drive when a program is updated, the original program date remains in the squashfile, with a Full install, updated program data replaces the existing program data. There is no way to get rid of old data in the squash file. The Disk Check warning still comes up in mkusb persistent drives even if no check is done. Most other installers still have Disk Check,(and Try/Install). Full installs of 20.04 seem to boot much faster to me. I will try benchmarking. Will also try VBox with various makes of Persistent USB again. – C.S.Cameron Jun 18 '20 at 09:59
  • I can agree with your edited answer :-) – sudodus Jun 18 '20 at 10:29