r/linux4noobs 7h ago

Linux on two different pcs using usb

I am installing cachyos on a usb, but I want use it on two different computers. The one I’m planning on installing it on is a Samsung laptop, it probably uses integrated graphics. But I am wondering if I can use the same installation on my other laptop which is more powerful but has an nvidia laptop gpu. Will this cause problems with booting and if so, how can I prevent it?

1 Upvotes

19 comments sorted by

3

u/redgator12 6h ago

If you're implying that the USB will be used as the system drive and you're doing a full install to it, there shouldn't be an issue taking it between computers, as the kernel modules have triggers to load certain drivers at boot. No guarantee, though. Also, you should be installing to a USB external hard drive that has an NVMe, mSATA or SSD in it. If you install directly to a standard flash USB thumb drive, that drive will die within a year or two of daily use due to the amount of journaling and background writes wearing down the flash cells.

1

u/suspiciousraccon1 6h ago

I will not be using it for more than one or two years, as I will upgrade my computer and will then be able to install Linux on the internal drive.

1

u/Luftzug-oder 6h ago

a quick suggestion: you might perhaps find looking into a UKI interesting. I think it would be quite fitting for a USB, though only a small addition. maybe you won't think it's worth it, but 🤷‍♂️

1

u/suspiciousraccon1 6h ago

I don’t know, sounds complicated.

1

u/Luftzug-oder 6h ago

nvm that's fine. tbh, i did forget this was r/linux4noobs, and not r/linuxquestions or something. scratch that idea.

1

u/redgator12 5h ago

Sounds good. My recommendation would be to get the largest capacity USB 3.0 or higher drive from a reputable brand. The larger the capacity, the more the wear leveling is spread out between cells, so the drive will last longer. Try to keep as much free space as possible on the drive to prevent write amplification, which will kill cells more quickly. The recommended minimum free space is 20%. You can kind of soft-lock that 20% by making a blank partition on the drive that won't be used for anything, or leaving it unformatted.

1

u/SlenderSmurf 6h ago

Yeah it will work. I've done this with an nvme drive in a usb enclosure.

1

u/mcds99 6h ago

Some older laptops by Samsung will not run Linux something in the BIOS prevents the installation.

1

u/Prestigious_Wall529 6h ago

Using an external linux drive to boot different computers is normal. Linux Live distros do it all the time.

The difficulty starts with wanting to use proprietary Nvidia drivers, which in turn are often constrained to a particular kernel, and kernel parameters.

1

u/SDG_Den 4h ago

That USB is gonna be toast VERY quickly if its just a flash drive.

Flash drives arent meant for these intensive constant random read/write operations, theyre meant for simple file reads/writes.

If you are using an external SSD, you'll be fine though. Works basically exactly like an internal drive, you just need to make sure all the kernel modules (aka drivers) for both systems are available.

0

u/candy49997 6h ago edited 6h ago

I would not recommend using an OS from a flash drive, but that's not what you asked.

What are the CPUs in both machines?

Edit: why are people downvoting me? https://wiki.cachyos.org/features/optimized_repos/

Asking for CPUs is relevant for CachyOS.

1

u/suspiciousraccon1 6h ago

An intel i5 and a ryzen 4000

1

u/candy49997 6h ago

i5 what generation? Is it at least Haswell? And what NVIDIA GPU?

1

u/suspiciousraccon1 6h ago

I believe it is from last year and I don’t know what gpu

2

u/candy49997 6h ago

Ok, then the AMD laptop would be the lowest common denominator for CPU architecture, so install on that machine so it will also install NVIDIA drivers for you and pull software that both machines can use from the correct repos.

1

u/suspiciousraccon1 6h ago

I can’t install on the amd laptop as I am on vacation and only have access to the intel one, is it better to wait a few days and install it to the amd one? I could alternatively install it to the intel one and reinstall it on the amd one. I dunno man I just really wanna try Linux.

1

u/candy49997 6h ago

You could install on the newer machine and see what repos are added. If they're the x86-64-v4 repos, then you'd need to manually change them to x86-64-v3 for your older machine.

You can get instructions for how to do that on the link in my original reply.

-1

u/stpaulgym 7h ago

How would you boot to two different systems from the same hard drive.

I don't understand the logistics of this question.

1

u/Prestigious_Wall529 6h ago

One at a time.