0

Before posting this, I looked at 24 different duplicate questions including: How do I install Ubuntu to a USB key? (without using Startup Disk Creator). I couldn't find a single question that dealt with this. So, please don't mark duplicate unless there truly is another question asking this...

Now that I've followed the directions for creating a a bootable USB stick on macOS, and it works flawlessly, how do I make it permanent, rather than a trial/installer?

I believe this will help Windows users too. My ultimate goal is to have a single USB stick that I can use on Mac or PC, but in the end may have to carry 2

The directions I linked above are excellent! It worked perfectly. I'm not one of those people who can't follow directions. The problem is that the directions ended too soon.

Here is what I mean by "make it permanent"

  1. When I boot off the USB stick, I get GRUB menu offering "Try Ubuntu without installing", "Install Ubuntu", "OEM install (for manufactures)", and "Check disk for defects"
    • I want this to boot straight into a full Ubuntu Install.
  2. When I boot into "Try Ubuntu", the drive is very small.
    • I want to make the full space of my 32GB USB stick available
    • I don't want to waste my precious little space on tools for installing Ubuntu on another drive. (This is my drive!)
  3. The drive seems to be in a Guest/Read-only-ish mode.
    • I tried to remove the media files in the Examples directory linked on the Desktop and got an error
    • I tried to downloaded the google-chrome-stable deb from Google, but...
      • the Ubuntu GUI installer doesn't even seem to try to open it.
      • dpkg -i won't install it because of 3 dependencies.
      • apt can't locate any of the 3 dependencies.
      • none of the answers on How to install Google Chrome work for me.
    • [ I fully realize that the Chrome issue may be a red herring ]

Let me clarify my criteria

  1. EDIT: I can't believe I'm doing this again, but here we go... Let me take the big bold question at the top, and break it down phrase by phrase...

    • Now that I've followed the directions for creating a a bootable USB stick on macOS,
      • If you are calling this question a duplicate of another and the other does not specifically address following those directions, it is a different question
    • and it works flawlessly,
      • If you are calling this question a duplicate of another and the other is about failing to follow those directions, it is a different question
    • how do I make it permanent,
      • The key word there is it. What does that pronoun refer too? A USB drive that was created in about 2 minutes by dding an ISO on to it. What does it NOT refer too? A USB drive that created over the course of hours by using it as the target of the GUI Ubuntu installer.
      • If you are calling this question a duplicate of another and the other does not populate the USB drive via dd or Etcher, it is a different question
    • rather than a trial/installer?
      • If you are calling this question a duplicate of another and the other produces the Live CD/trial/installer, it is a different question
  2. I want my hard drive to be untouched.

  3. I don't want to make an Ubuntu USB "install disk".
  4. I do want to Ubuntu installed on a USB disk.
  5. The answer may very well be that it's not possible to do.
    • REMINDER: My question is in bold at the top
    • The answer may be that I have to try something else
  6. This question is not a duplicate.
    • If the answer turns out that I have to try something else, that's okay. But marking the question as a duplicate prevents smart people from considering the question.

Please don't be nasty

Before you vote to close this, put it on hold, mark it duplicate, or kill my dog, post a comment and lets see if we can improve the question to your satisfaction. I'm doing this for posterity. Please don't be nasty.

2

There are a few very broad options.

  1. When I boot off the USB stick, I get GRUB menu offering "Try Ubuntu without installing", "Install Ubuntu", "OEM install (for manufactures)", and "Check disk for defects"
    • I want this to boot straight into a full Ubuntu Install.

There are 2 options you have here

First - you need to modify the boot menu. There are detailed instructions on how to do so here - How to bypass "Try it / Install" screen when booting from USB Live Session? (without installing in the USB)

Second - Install Ubuntu onto the flash drive - will come back to this.

  1. When I boot into "Try Ubuntu", the drive is very small.
    • I want to make the full space of my 32GB USB stick available
    • I don't want to waste my precious little space on tools for installing Ubuntu on another drive. (This is my drive!)

Again you have a few options

First, partition the USB. If you shrink the partition with the live files you can create a second partition and mount it (manually) after you boot. If you wanted to make this permanent you would need to remaster the iso. This is a good option if all you need is data storage.

  • Note - could be done loop mounting a file as well, but that gets a bit more complicated.

Second, use persistence. This is described in detail in several locations

How do I get a live-USB to use a partition for persistence?

https://help.ubuntu.com/community/mkusb/persistent

https://wiki.ubuntu.com/LiveUsbPendrivePersistent

The disadvantage of this option is that persistence has limitations:

  • It is a COW system , and thus all your changes are written to a file which is mounted as an overlay. This works all right for minor changes such as installing a few packages or making customization to your interface or saving wifi passwords, but will fail if you instll many packages or try to maintain the system with sudo apt update && sudo apt upgrade as there is not method to track all those changes.

Your third option is to do an install into the usb itself (will come back to this).

  1. The drive seems to be in a Guest/Read-only-ish mode.
    • I tried to remove the media files in the Examples directory linked on the Desktop and got an error
    • I tried to downloaded the [google-chrome-stable deb from Google][2], but...
      • the Ubuntu GUI installer doesn't even seem to try to open it.
      • dpkg -i won't install it because of 3 dependencies.
      • apt can't locate any of the 3 dependencies.
      • none of the answers on How to install Google Chrome work for me.

Well there are several problems here, I will not address the problem with google chrome, that is a separate issue.

But yes, when you boot the .iso the file system is squashfs , and this file system is ro. You can only make changes to the system (delete files, edit config files) by remastering the iso.

See https://help.ubuntu.com/community/LiveCDCustomization

Short of remastering there is no way to make those sorts of changes. If you try to do so with persistence you are highly likely to either have the same error or eventually you will break persistence as the COW method of persistence is not designed to make changes to the ro squashfs system.


My suggestion:

With what you are wanting to do, IMO, the best solution is to do a regular install into the flash drive, it will then act as a normal install, and you can install, upgrade, and customize all you want.

A full install should be just as portable / flexible as the live media.


Where to go from here

Your question is actually quite broad. Pick one of the options (persistence, remaster the iso, or install) and post if you have a specific problem.

As far as chrome, the answer you linked should work. If it does not you may need to file a bug report with chrome as it is a 3rd party app.

Alternates to chrome include chromium (same browser without the branding). You would file a bug report, if needed, with Ubuntu.

Or Firefox. Firefox is on the verge of a new release and it looks good.

https://blog.mozilla.org/blog/2017/09/26/firefox-quantum-beta-developer-edition/

It is the firefox daily ppa https://launchpad.net/~ubuntu-mozilla-daily/+archive/ubuntu/ppa and will likely be available in the ubuntu repositories very soon.

See How to replace downloaded binary file with one downloaded from software manager?

  • Thank you for this very detailed answer. I've learned a lot from a cursory read of it. I will study it in detail and get a lot more out of it. I certainly think you are right: Doing a 2 minute dd of the ISO to a flash drive felt like it got me 99% of the way there, but is actually 95% going down the wrong path. Sadly, booting VirtualBox from the ISO and installing to the USB disk took HOURS, and I still don't have a usable system. (unusably slow and no wifi) – Bruno Bronosky Nov 9 '17 at 14:03
  • It will take a while to learn a new OS. Dual boot for a while and gradually transition. Ask for help when you hit a brick wall and read the documentation when you can. – Panther Nov 9 '17 at 14:13
  • I've been using Linux since 1995, professionally since 1997. But I've only used it as a workstation for short stints over the years. I love Linux for a server. I've never been happy with it on a laptop. But, for those "There's an emergency that needs addressed and I'm nowhere near my laptop" events, I figure having Linux in my pocket would be great. – Bruno Bronosky Nov 9 '17 at 18:25
  • @BrunoBronosky, 1. Do you want a portable system, portable between computers? I mean not only portable in your pocket ;-) 2. Do you need it to boot both in UEFI mode and BIOS mode? 3. To be honest, for such emergency purposes, I would suggest a persistent live system with a casper-rw partition, because it is more portable than an installed system. (It can also be booted live-only, if you wish or if you manage to corrupt the system for persistence.) 4. You are welcome to use Ubuntu or an Ubuntu flavour, but there are dedicated linux distros for this purpose (emergency, repair, recovery ...). – sudodus Nov 9 '17 at 18:47
  • @sudodus I may end up going the pendrivelinux.com route, but that would be a different question. I may ask questions about that in the future. What I really like about the instructions that I followed is that they are official, fast, and create a hardware independent Ubuntu. – Bruno Bronosky Nov 9 '17 at 19:18
2

It is impossible!

What you are asking is not possible. Let me break it down using quotes from your question above.

How do I make it permanent?

The key word there is it. What does that pronoun refer too? A USB drive that was created in about 2 minutes by dding an ISO on to it. What does it NOT refer too? A USB drive that created over the course of hours by using it as the target of the GUI Ubuntu installer.

The answer is you can't make it permanent. You can make it persistent. You can make the persistent install point to another partition in your USB to store all your data and all the changes you make to the system.

What you have done is done. You can't finish it. It is finished!

I suppose you know the difference between persistent and full install. Others may find What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive? useful. The point is these are two different things and you can't turn one to another without erasing and starting over.

I don't know why it takes "hours" for you to make a full install on an USB drive. I have done it many times, and it takes me 30 minutes max. But why you take hours is a different question and you are most welcome to ask that question separately.

There are many ways to make a full install USB, some using virtual machine, some using real machines, some methods call for unplugging hard drives others do not. Here is the link to that question you linked at the beginning:

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

Since the one you tried did not work for you, try another way. If you used VirtualBox, try Qemu/KVM virtual machine instead. Fiddle with the USB setting of your virtual machine so that it can write faster. Or use a real machine to install full Ubuntu into your USB, using another DVD/USB to install it from.

In conclusion: Format it and make it into something else.

Hope this helps

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.