Install linux to USB drive

Robb

Ars Praetorian
527
I recently got a 500GB Samsung T7 USB hard drive which I would like to use for a while at least to toy/experiment with linux distributions. Problem is, it seems fairly difficult to actually install linux to a USB drive like this, at least for a relative newb like me. I've tried Rufus with the persistent partition set to use the entire drive, but it seems I've ran into issues on 2nd boot after actually changing anything (On both Linux Mint and MX linux). Is there something obvious I'm missing? This seems like an easy use case but its just not working for me....

I was really trying to avoid installing to a system drive to avoid any issues with boot partitions etc.. (bad experience years ago). I really just want to keep it solely on this USB drive.
 
  • Like
Reactions: Camelsmilk

Robb

Ars Praetorian
527
Yea the sound of that bug scares me, don't wanna have to mess with trying to fix/restore my windows boot or anything, think I'll just take a pass on trying linux for another 10 years. Thats basically what happened long ago last time i tried and why I did not want to attempt to install to a system drive, lost a windows install and had to futz around with that for hours to fix. Oh well....
 

Wheels Of Confusion

Ars Legatus Legionis
66,177
Subscriptor
Yea the sound of that bug scares me, don't wanna have to mess with trying to fix/restore my windows boot or anything, think I'll just take a pass on trying linux for another 10 years. Thats basically what happened long ago last time i tried and why I did not want to attempt to install to a system drive, lost a windows install and had to futz around with that for hours to fix. Oh well....
I don't know why Ubuntu hasn't addressed that bug in their installer. An obvious work-around would be to avoid Ubuntu and its derivatives. Debian and Debian-based distros won't inherit that bug, as well as pretty much any distro that doesn't use Ubiquity from Canonical. But that's probably cutting off a lot of distros you wanted to try.

The bug also seems limited to initial installs and "dist-upgrade" (in-place upgrades between major releases), so even there it doesn't look like it's insurmountable as long as you're careful. It shouldn't affect your other boot drives if you take those out of the system before installing Linux to the external drive (a chore, but the safest way to do any multiboot setup), and if you do a clean install for subsequent Ubuntu(-based) versions.

I think you should be safe if you:
1) Use Rufus or Balena Etcher to make a live USB thumbdrive strictly for booting a live environment (not the T7 you want to run Linux from). Download the live .iso of the distro you want to try, and set it up on a USB thumbdrive (or whatever). Point is, use Rufus/whatever to make a dedicated "install media" like Microsoft's Windows install media USB keys.
2) Disconnect all the other drives from the system before installing Linux from the live thumbdrive to the T7, so only the Live USB drive and the T7 on are connected.
3) Don't do in-place OS upgrades on that T7 while there's another disk in the system.

The reason I suggest this is because the last I read, making "peristant" USB drives directly with Rufus was experimental (but that was years ago; may have changed). It's less problematic to use the live bootable thumbdrive from Rufus to install Linux to a separate external drive, which will be peristant as it's a "normal" installation method.

Before doing that you may need to change the boot disk order in your BIOS/UEFI so that USB drives have priority. That way when the drive is disconnected the computer will just skip it and go to the first available boot disk (the internal ones). It should also be relatively system-agnostic, so you can take the Linux drive to multiple machines and boot into it from them without too much fiddling.
 
  • Like
Reactions: VividVerism

VividVerism

Ars Praefectus
6,728
Subscriptor
Aw, I didn't mean to scare you off!

There's a workaround if you dig through the bug tracker thread (or maybe in one of the duplicates) where you just change some flag on the...I want to say the EFI partition...on your Windows drive(s) to avoid the installer finding that when adding the Linux bootloader. After install, just change the flag back.

My last dual-boot install, I physically disconnected the Windows drive to avoid any risk of hitting this bug (I'm not even sure the distro I picked suffers from it). But I only went that route because it was actually easier to disconnect a SATA cable than muck around with partition flags. If your drives are harder or impossible to disconnect or remove (I hit the issue on a laptop with soldered-on storage) the partition flags workaround isn't exactly difficult, just annoying.

If you're extra paranoid, as someone said, you could try Linux in a VM at first.
 

VividVerism

Ars Praefectus
6,728
Subscriptor
Wanted to check out steam/proton and gaming in general. Vm not an option for that I assume.
Yeah, probably not ideal, particularly for newer games. Abusing a live USB install media as a persistent trial system would likewise give an artificially bad experience.

Got any old laptops collecting dust in a closet you could just do a full install on for a trial run?
 

koala

Ars Tribunus Angusticlavius
7,579
Hmmm, I thought there would be BIOS options to disable hard drives. But neither my laptop nor my gaming PC have any.

So, yeah, there is always going to be a small risk. IMHO if you don't try to set up dualboot, the risks are very small, but YMMV. LiveCDs are mostly good to start installers and test briefly hardware, even with persistency hacks I don't think you'll have a great experience.

If you want to avoid the risk, yeah, get some extra hardware. Or buy a Steam Deck :)

My GF decided to nuke Windows on her laptop and go with Pop!_OS. She's been happy, and she was able to set up Hogwarts Legacy on her own, and she says it performs like Windows, apparently.
 
  • Like
Reactions: Camelsmilk

VividVerism

Ars Praefectus
6,728
Subscriptor
Hmm, I'm not a fan of Pop! OS. I'll probably go back to some Ubuntu flavor at some point, or look into some other "beginner" distro to try.

The OS is fine, I guess, although I'm not particularly fond of the app launcher menu from the sidebar. My main gripe is actually the software store/updater. There's no progress bar or any other indicator to show that installation or update progress is actually occurring, just a little spinny "busy" indicator. It tends to completely freeze my system (to the point of requiring a hard reset) if I'm updating the flatpak userspace component it needs to install to accompany the Nvidia driver, and also doing anything else on the system at the same time. It got bad enough for a while that EVERY SINGLE TIME I would log in to do something (play a game, browse the web, pay bills, whatever) my computer would freeze and I had to decide whether to force a hard reset or wait it out, and I had zero options for judging whether waiting could help or not. Eventually I just completely disabled automatic updates of any kind, and now have a habit of finishing (or starting) any session with opening a terminal for apt update/full-upgrade and flatpak update commands. At least THOSE show a progress indicator of some kind.

I'm not sure if my actual problem boils down to old barely supported hardware, a Pop!_OS specific issue for bolting flatpak onto a system designed for snap, or something else; but the lack of decent GUI updater/store makes it all worse.

And I'm not really interested in installing replacements to system components as fundamental as the (GUI interface to the) software updater.
 
Thanks for the help/info and discussion. I'll see about getting some older/slower hardware, just have 3 pc's in the house now and they are all used by me/kids so nothing spare at the moment. Really just trying to plan for Win10 EOL and wondering if I can actually make the jump to linux thereafter and not have to deal with Windows any more. Been tinkering with linux for about 25 years now, first distro came free with an Abit motherboard I believe, really wanting to make it work at some point.
Side question... Manjaro, is that what used to be Mandrake and it would not have the boot bug correct? I just really do not want to take even the slightest chance messing up my Win install and dealing with that, but very curious at the same time....
 

Wheels Of Confusion

Ars Legatus Legionis
66,177
Subscriptor
Side question... Manjaro, is that what used to be Mandrake and it would not have the boot bug correct? I just really do not want to take even the slightest chance messing up my Win install and dealing with that, but very curious at the same time....
It would not have the boot bug. It's not based on Ubuntu or most anything Canonical-made.
However, it's not Mandrake. That's more than defunct, and was based on Red Hat. Manjaro is based on Arch, which is not based on Red Hat or Debian but is its own lineage.
 

VividVerism

Ars Praefectus
6,728
Subscriptor
Really just trying to plan for Win10 EOL and wondering if I can actually make the jump to linux thereafter and not have to deal with Windows any more.
Incidentally, although I do encourage you to try Linux again on at least one of your machines, you might be able to download and install Windows 11 even if your machine is technically unsupported.

After a bad Windows 10 update made my Windows install unbootable, I ended up with a working Windows 11 install on a computer that has absolutely no business being able to run Windows 11. That's actually the one I'm currently dual-booting with Pop!_OS.
 
Bah, I about give up, so frustrating that at every turn there are roadblocks. Flashed Manjaro iso to a cf card try booting to it to try to install to USB hd and just get a black screen then something about dev disk by-label manjaro_kde_2313 device did not show up after 30 seconds falling back to interactive prompt. You can try to fix the problem manually.....
3 distros I can get into the live iso but can't install due to the Ubuntu bug or I can't get into the live environment to begin with.
Sorry I just had high hopes of things being nice and easy now but seems much like the situation last time I tried over ten years ago...
 
Last edited:

Wheels Of Confusion

Ars Legatus Legionis
66,177
Subscriptor
Sounds similar to this problem: https://forum.manjaro.org/t/device-did-not-show-up-after-30-seconds-i-cant-install-manjaro/121381/3
There's a potential work-around there for it.
With your computer still on, unplug the live media, wait a few seconds, plug it back in, then type 'exit' and hit Enter.

After a little while you may get a working graphical interface, or you may get a blank, black screen with a mouse pointer.
If the latter, try pressing ctrl+alt+F(number) key. You can cycle from F1 to F7. What you're doing is cycling through virtual terminals to find the one that has a graphical interface or command prompt running, but which wasn't showing for you. If you get a command prompt it'll probably be asking you to log in. On first boot the username and password are both 'manjaro'. From here I'm just going to copy a post in that thread:
When you are logged in, you can view some logs:

journalctl -b0 -u display-manager

Ultimately you can restart the display-manager (in other terms the login manager)

sudo systemctl restart display-manager

If that does not help. Then start you desktop environment directly:

# stop the display-manager sudo systemctl stop display-manager # For gnome for example: startx /usr/bin/gnome-session

However… if such a problem happen then it is most likely a gpu problem of some sort. Since I have no information what so ever about your system, you are on your own.
(the lines with # in the code example are just comments for the poster's benefit and will not actually do things, they just describe what the line below them will do)

Which raises the question: what hardware are you using? And do you have a spare actual USB thumb drive instead of a CF card?
 
Fairly common hardware I would say, an asus B550 motherboard, Ryzen 5600G, RTX 3060TI.
All my flash drives are in use with files and things, which is why i was originally trying to install directly from ISO to the usb drive. Cant believe CF card (128GB samsung EVO in a flash adapter) is causing headaches now.... its from one thing to another to another. On the bright side I am typing this from and Endeavour install on my USB drive which I did from the CF card... that being said, not impressed, having trouble getting any kind of archive/package manager to work, not sure if the mirrors are down or what.
I really liked linux mint when i had it in iso/preview mode, but think I'll play around with Manjaro again and see if I can get it going.
 

koala

Ars Tribunus Angusticlavius
7,579
IMHO, I would stick to the mainstream distros. The more mainstream the distro, usually the less tinkering. (The title of the Endeavour website reads "a terminal-centric distro", after all. But it seems to have built-in support for Nvidia, so it has that going for it.)

I would be tempted to recommend SteamOS or Universal Blue for gaming, because they have a strong focus on running Steam, but I'm not sure they are tinker-free (well, SteamOS is tinkerfree on the Steam Deck. But maybe not on regular hardware).

But it's really hard to recommend something easy-to-use, with Nvidia and good gaming support (I guess you want Steam). There's probably some focused distros that work well, but maintaining distros "flawlessly" is hard.
 
  • Like
Reactions: VividVerism

koala

Ars Tribunus Angusticlavius
7,579
(BTW, although it's a bit controversial, Ventoy is a very nice tool that can create a bootable disk where you can drop ISOs to boot. This means you don't need to reflash every time you want to try a new distro, and that means you can keep files on it more conveniently.)

(I'm also experimenting with UDF on Ventoy, because it's about the only non-FAT filesystem that Windows, macOS, and Linux support out of the box. Although it requires mounting from the terminal on macOS. Although really I don't use it day to day enought to endorse this.)
 
  • Like
Reactions: r0twhylr

VividVerism

Ars Praefectus
6,728
Subscriptor
(BTW, although it's a bit controversial, Ventoy is a very nice tool that can create a bootable disk where you can drop ISOs to boot. This means you don't need to reflash every time you want to try a new distro, and that means you can keep files on it more conveniently.)

(I'm also experimenting with UDF on Ventoy, because it's about the only non-FAT filesystem that Windows, macOS, and Linux support out of the box. Although it requires mounting from the terminal on macOS. Although really I don't use it day to day enought to endorse this.)
Ventoy is awesome! Once I learned about it, it's what I finally used for creating bootable media for multiple Windows ISOs, memtest86, and a handful of Linux distros I was going to try in case I couldn't get Windows working in the end in my thread linked earlier. None of the other methods I tried to create bootable media from the Windows ISOs were working and were a pain in the ass to try repeatedly on multiple USBs.

I hadn't heard of Ventoy before that so I definitely looked around a bit to get a feel for the reputation of it. I'm curious, what's controversial about it? I don't recall finding anything hinting that, at the time, but I might rethink my use depending on what the controversy is!
 

VividVerism

Ars Praefectus
6,728
Subscriptor
But it's really hard to recommend something easy-to-use, with Nvidia and good gaming support (I guess you want Steam). There's probably some focused distros that work well, but maintaining distros "flawlessly" is hard.
Gaming and Nvidia support is one of the main reasons I went with Pop!_OS back when I set up my current dual boot system. I had assumed since it was coming from a company with a good reputation for selling hardware with their Linux distro pre-installed that it would make the whole experience smoother. I guess they definitely focus on their own hardware, though, and as I said earlier I'd have a hard time recommending them now. But, I will say, the gaming aspect with Steam did not disappoint. All other issues aside, Pop!_OS was stupid easy to get up and running with playing my Steam games. I don't think I touched the terminal once. And, the Nvidia drivers were installed during the initial OS installation, I think I just needed to select the correct ISO for that. For the most part, that aspect "just worked".

One annoying aspect of Steam on Linux is that it defaults to installing library games into a user-specific directory. If the OP is like me, my family makes extensive use of the family sharing feature in Steam. Also we log into each other's Steam accounts from time to time. To avoid installing multiple copies of large games, I was going to set up a shared directory everyone could switch their Steam default install location to. There are instructions online just a quick search away, for adding everyone to a steamuser group and setting up a directory with access to everyone in that group. THAT task is going to take some minor tinkering in the terminal. But that's an issue on any distro.

The UI for Pop!_OS itself would be a little confusing to any Linux newbies coming from Windows or Mac. I was definitely looking into other distros for my backup in case I couldn't get Windows working again for my most recent adventure. An easy transition for Windows users was very important in my case, because my family was already going to be annoyed at being forced into Linux on the main family computer. I wanted to make the transition as easy and painless as possible!

I expect many Ubuntu-based distros (particularly the "for beginners" distros) will have a similar Steam install experience to Pop!_OS. I can't comment on actual use because I did eventually get Windows working and never tried them, but I had ISOs downloaded and ready to go for Linux Mint and Zorin. I think there was a third I was going to try as well, but I can't remember it now. I'll update if it comes to me later. It may have just been one of the official Ubuntu flavors.
 
Last edited:
Will I finally backed up one of my flash drives and used it and it's like night and day. Apparently cf card was an issue for all but a couple distros for some reason. Now happily in a manjaro install and planning to try others like nobara. So install part is complete thanks for the help.
Now on to the challenging part of getting everything to work otherwise, but I'll take those questions elsewhere. First thing I've seen is an Appimage from qidi that requires a library that apparently I can't install in manjaro... But again I'll tackle those separately
 

koala

Ars Tribunus Angusticlavius
7,579
I hadn't heard of Ventoy before that so I definitely looked around a bit to get a feel for the reputation of it. I'm curious, what's controversial about it? I don't recall finding anything hinting that, at the time, but I might rethink my use depending on what the controversy is!
The provenance of the software is not clear. It's only on the AUR and nix, most distros don't have it. It smells strange. But I'm not aware of any other alternative which runs on Linux (I think there's a few Windows alternatives).
 

malor

Ars Legatus Legionis
16,093
I was really trying to avoid installing to a system drive to avoid any issues with boot partitions etc.. (bad experience years ago). I really just want to keep it solely on this USB drive.
This is a late answer, but for others who happen into this thread: the easy way to do that: use Rufus to burn an OS installer to a USB key. Remove all drives from the system except for your installer and your desired target USB drive. Pulling out NVMe drives can be a real PITA, but there's no helping it.

Then boot up and use your BIOS boot selector to boot from the USB key. Run through the installer and have it install to the hard drive. The installer will see only one drive, and will thus correctly build an EFI partition and put all its files there; even the buggy Ubuntu installer can't get confused if there's only one possible target. All the mountpoints will be aimed at the correct UUIDs, so if your chosen distro has a /boot/efi, it will end up pointed at the right place, and that setting will persist even after adding the other drives back in.

Do your updates and any initial configuration, make sure the system is stable and running well. Then power it down, and reconnect all the drives you detached. From then on, you should be able to use your BIOS to choose what drive to boot from.

If your chosen distro doesn't support Secure Boot (many don't), you will have to toggle Secure Boot off and on as you switch between OSes. You can leave it disabled all the time, but that removes a layer of protection from Windows, so I don't really suggest it.

If you really can't detach all drives but the target, then you can use a distro with a non-buggy installer, like Pop!_OS. That installer has gotten it right every time for me, even when Windows drives were present. But then you have to be very careful about specifying where to install and especially where to install the boot files.

You need more knowledge to install on the correct drive out of multiples, even with a good installer. If there's only one drive in the system, then you can just accept most or all the defaults and let it install itself, even if the installer is Ubuntu's crappy offering.
 
  • Like
Reactions: m0nckywrench

koala

Ars Tribunus Angusticlavius
7,579
2) Disconnect all the other drives from the system before installing Linux from the live thumbdrive to the T7, so only the Live USB drive and the T7 on are connected.
Sorry but I think fear and laziness are over riding any curiosity or desire to tinker on Linux. 2 of my drives are nvme, one of which is tucked away behind a graphics card, so just going to leave things as is and go on with windows.
Pop!_OS is a good recommendation, and recommending unplugging the Windows drives is also good, but really in those cases you want to steer people into using some extra hardware (although the OP's purpose was playing with gaming, which means that extra hardware is unlikely superdisposable :(
 

VividVerism

Ars Praefectus
6,728
Subscriptor
Relying on the UEFI system boot menu for day to day use is almost always going to be an annoying and user hostile experience, at least for every system i've installed dual boot on. The Linux bootloader menu tends to be much easier to deal with as a user, even in the cases it takes some effort to set up.

This was one of the places I think Pop!_OS is lacking, actually. When installing every other Linux system I've ever used, some variant of Grub was used. The install process and update process both search the system for other OSes and add a menu item for them. Choosing which OS to boot is as easy as hitting an arrow key at the right time while booting. Setting the defaul selection tends to be pretty easy too if you want to automatically boot to one OS or another after a short delay.

Pop!_OS is different and installs system-boot or something like that. There is no automatic search for other OSes. I had to manually copy EFI files from the Windows drive to get that working. Definitely not something I'd recommend to a Linux or dual-boot newbie. You can install something different like rEFInd, but that's bit of a pain to configure and the boot choices it generates are numerous enough to be confusing.
 

koala

Ars Tribunus Angusticlavius
7,579
Dual booting is always a last resort. If you want to play with a different OS, try a VM first (if you want to play with gaming, then it's not an option) or get a spare box (if you want to play with gaming, likely not an option either).

If both are impossible, then it will be more uphill. Resizing partitions or installing to external drives is a pain. Other OSes do not handle this well either. I understand people not wanting to deal with those if they do not have a huge interest on Linux. For casual exploration, VM or dedicated disposable hardware.
 
  • Like
Reactions: m0nckywrench

VividVerism

Ars Praefectus
6,728
Subscriptor
I guess somehow I lost sight of the OP's original idea which was to install to an external drive, which does make the boot problem a lot easier after it is successfully set up. Setting the boot priority of the external drive using the UEFI/BIOS menu to be higher than Windows gets you to a very easy solution: plug in drive, boot to Linux; otherwise, boot Windows.

But I've also found that using a second internal drive is not bad most of the time. It's a lot easier and harder to screw up than messing around with partitions, especially when trying to preserve content on a partition you need to resize to make room. Even if you hit the Ubuntu installer bug, it'll still work fine, you just might end up with remnants left behind if you decide it's not for you and remove the Linux installation.
 
Last edited:

malor

Ars Legatus Legionis
16,093
Drives are so cheap these days that, IMO, trying to use one drive to boot multiple OSes is too much of a risk to be worthwhile. Windows has been known to blow away Linux boot files, for instance, although I'm not sure if it still does that in the UEFI era. It's just too easy to get confused, wipe out the wrong partition, and lose your Windows install. And then installing Windows onto a drive with Linux is even more likely to blow things up.

Another Linux install method I just remembered is that you can pass a boot argument to the kernel to not recognize NVMe drives; if you then install to SATA or USB, you can't erase the wrong disk. But modifying an installer this way can be even more arcane than getting your partitions correct.

Using the BIOS as a switchable boot environment, IMO, is much better than using GRUB. You can just add or remove entire OS environments as you wish, simply by adding drives with correctly-configured EFI boot setups.

GRUB has no real boot-time autodetect. Everything has to be preset from the Linux command line, so while it's slightly easier with two fixed OS installs, it has zero flexibility and is a huge PITA to change. Having complete OS installs on drives, and then using the BIOS to choose which to boot, is slightly more complex from a UI perspective, but IMO comprehensively better in all other respects.
 
  • Like
Reactions: m0nckywrench

koala

Ars Tribunus Angusticlavius
7,579
Another Linux install method I just remembered is that you can pass a boot argument to the kernel to not recognize NVMe drives; if you then install to SATA or USB, you can't erase the wrong disk. But modifying an installer this way can be even more arcane than getting your partitions correct.
Actually, that might be easier to do than it looks.
 

Camelsmilk

Smack-Fu Master, in training
1
My GF decided to nuke Windows on her laptop and go with Pop!_OS. She's been happy, and she was able to set up Hogwarts Legacy on her own, and she says it performs like Windows, apparently.
Others have made great suggestions in this thread. Pop!_OS isn't for everyone, for sure: it has an unusual bootloader, it's software manager is terribly slow, but it has been incredibly stable for me and it keeps improving. I got tired of trying out new Linux flavors after 10 years, LOL. Cheers!
 

VividVerism

Ars Praefectus
6,728
Subscriptor
Others have made great suggestions in this thread. Pop!_OS isn't for everyone, for sure: it has an unusual bootloader, it's software manager is terribly slow, but it has been incredibly stable for me and it keeps improving. I got tired of trying out new Linux flavors after 10 years, LOL. Cheers!
The software manager is the #1 reason my next distro won't be Pop! OS. It's slow, it's buggy, it takes multiple "update all" clicks to actually update everything half the time, and it has no progress bar or update states to speak of. I've taken to turning off auto-update entirely and just manually running update/upgrade commands in the terminal every few days.
 

m0nckywrench

Ars Tribunus Angusticlavius
6,852
Drives are so cheap these days that, IMO, trying to use one drive to boot multiple OSes is too much of a risk to be worthwhile.
I stopped that after sampling dual booting twice in 1999. Absent desperate niche use cases I see no point. In 1999 I used IDE swap racks since my PC lacked enough bays for more than one rack. I bought two racks and swapped trays.

Today I use VMs which make distro sampling and comparison very low effort. VMs are the easy way to figure out "which distro" questions by running any or many without disturbing your host OS. You can download prebuilt VMs too (for example from https://www.osboxes.org/ )if you don't feel like building each one until you narrow your selection. VMs are wonderfully convenient as opposed to dual booting. You have both host and guest at hand on (if you wish) your fastest most-used machine so no need to install on another PC.

Zero worries about buggering a boot record and if you one day make Linux your host you can make a VM of your old Windows install to have that as a live backup. I had no problems using https://learn.microsoft.com/en-us/sysinternals/downloads/disk2vhd but there are probably more modern ways. Saving old OS installs as VMs makes rummaging through them natural and fast.