1

I have made a persistent Live stick for Ubuntustudio 20.04.2.0 LTS.

I want to let people boot from this stick to use it in the configuration I have made.

However I want to avoid that somebody playing around just clicks on the desktop icon "Ubuntu Studio 20.04.0 LTS installieren" and in the worst case does not understand the following dialogues. He might ruin the installed system on the hard disk or SSD.

Therefore I removed this starter from the desktop. However, although my stick has a partition casper-rw and it remembers things I have done in previous sessions (e.g. commands entered to a terminal, stored files and the like), the starter "Ubuntu Studio 20.04.0 LTS installieren" re-appears after each reboot, although I have deleted it before shutting down and the stick is persistent.

How can I prevent the reappearing of this particular starter.

One other question targeted at the use case of this persistent live stick to be tried by very computer-unexperienced people: How could I possibly prevent the (normal) user from any changes to /dev/sdaX, i.e. all partition of the builtin hard drive or builtin SSD? It must not be fail proof against people knowing about sudo, pkexec or the files governing the use of becoming root: Just the normal user should be prevented from altering the builtin disk. Would this be possible by mounting the partitions found on /dev/sda? Could one achieve this by manipulating systemd? If yes: how?

  • 2
    A better question is: For the purpose you're giving to it why aren't you using a full proper install in the same USB drive instead of a live session with persistence? – ChanganAuto May 09 '21 at 22:01
  • You can prevent changes to a fully-installed system by using overlayfs. Do a proper install of Ubuntu (to a HDD, SSD, or USB), customize it, then lock it to read-only using the overlayroot package. It's trivial to unlock...if you know how. – user535733 May 10 '21 at 01:33
  • ChangangAuto, a proper full proper install is not the best thing in my use case: It is limited to the computer on which the full install was made. For the comparison see the first answer below. - I want to make a stick which can be booted from almost any computer (with the right architecture) and let people use it - without first letting them abandon their current operating system, go through the difficulties to set up a dual boot system and so on. – Adalbert Hanßen May 10 '21 at 14:00
  • user535733: Changing the HDD or SSD of the computer on which my solution shall be used is off limits. – Adalbert Hanßen May 10 '21 at 14:02

2 Answers2

2

quick and dirty method since you are using persistence, add this to your ~/.profile or add as a startup command in settings>session and startup>application autostart.

if [ -e "$HOME/Desktop/ubiquity.desktop" ]; then rm -r "$HOME/Desktop/ubiquity.desktop"; fi

dick
  • 21
0

Ubiquity the Ubuntu installer is not included in a Full install

Ubuntu can be installed to a USB in different ways. A Live install does not save between sessions. A Persistent install extracts the OS from a compressed file and saves data to an overlay file or partition each session, and a Full install installs the complete OS to the USB just like an install to internal disk.

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.

  5. Slightly less wear on the drive.

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 the forums).

  3. No ugly startup / install screen.

  4. Better security, you can use full encryption

  5. You can use proprietary drivers.

  6. Swapfiles and partitions work and Hibernation can be enabled.

  7. Many persistent installs are limited to a 4GB casper-rw and a 4GB home-rw persistence file, to get more persistence requires persistence partitions. Once casper-rw is full, the drive will not boot.

  8. More efficient usage of disk space. Does not require reserved space for persistence.

  9. Faster boot, no automatic disk checking or Try Ubuntu/Install Ubuntu screen.

  10. You can run VBox and use virtual machines.

  11. Generally faster boot than Live or Persistent USB's.

  12. More stable, better for day to day use. I have run Ubuntu off a flash drive for 5 years making only LTS upgrades.

Note that once booted, both methods run at about the same speed. If the computer has lots of RAM Ubuntu should run mainly in RAM and there will not be a big difference between running off internal HDD and USB3 flash drive f.

Full Install Method

A quick and easy method to flash a Full install to USB can be found here: Easy Full Install USB that Boots both BIOS and UEFI

A more traditional methods for creating a Full install USB from scratch can be found here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

C.S.Cameron
  • 19,519
  • Thank you for the comparison. Of course I already have made full installs on USB devices instead of the builtin HDD or SSD. One such stick made for a Lenovo W530 on a Lenovo also boots on a T430. Both are very similar in their hardware, mainly the screen and video hardware size differ. But it neither booted from a Lenovo T400 nor from a Sony VAIO. They differ too much. Although booting takes longer, a live stick can run on more devices. - What creates the deleted Installer starter after each boot process? This starter on the desktop is a tremendous threat to my objective, see my question. – Adalbert Hanßen May 10 '21 at 14:11
  • @Adalbert Hanßen A normal install to USB will boot on either Legacy mode or UEFI mode computers, not both. The methods I link above will boot on both Legacy and UEFI computers and should boot on both of your computers. With a Live Persistent USB, Ubiquity is part of the read only filesystem.squashfs file and can't easily be deleted. – C.S.Cameron May 11 '21 at 01:10
  • My USB stick boots from my Legacy Laptop. But it also boots from an UEFI computer. I used Unetbootin to copy the ISO image onto the stick. As a preliminary solution to my question, now I have written a script ~/.config/autostart/autostart.sh which removes the starter for Ubiquity, which is created every time I boot from that stick. It works, but it is a crutch! – Adalbert Hanßen May 13 '21 at 21:04
  • When you talk about "full install": Once I already installed Ubuntu 18.04 on a USB3-pendrive using exactly the same procedures as in an installation on the hard disk. But this pendrive boots only on the particular Lenovo W530 on which I made it (and on a T430, which has very similar hardware). It did not boot on other PCs, although they all were Legacy PCs. Was my install a full install in your sense (besides that I did not have a chance to test it on an EFI PC)? – Adalbert Hanßen May 13 '21 at 21:24
  • If you add proprietary drivers, Nvidia, AMD, etc, the drive may not work on other computers. The links I mention above allow the Full install drive to boot both Legacy and UEFI modes. There may be lots of reasons a Bootable USB doesn't boot: https://askubuntu.com/a/1190765/43926 – C.S.Cameron May 14 '21 at 01:06