Is it possible to install arch linux to usb stick and without any hdd attached to the machine?
My laptop's hdd is dead, and I have an old windows 7 machine that I use as an alternative to my laptop. All I have is only 16 gb usb stick. Is there any way to install arch linux to usb drive without any hdd?
About this post
- Posted
- Archived
- Score
- 2 · 67% up
- Kind
- Text
- ID
- 1925i24
7 comments
Yes. Wiki article on installing to a removable medium. 16GB is a little small but it is possible.
16GB is small? By what standards?
It will be slower than a live system but small large can go from 1.5GB to infinity, even with less than 1GB you can have a bootable system that you can do formating fsck and possible repairs or to transfer data out to another disk or other machine.
Removable disks can vary as well, especially usb2-3 makes huge difference in speed. A machine with w7 may not even have a usb3 and usb2 may make it feel as sticking and not responding, taking so long to read and write in between commands.
If you can make a system that loads entirely to ram then most of the speed and responsiveness comes from RAM availability and speed. If you have a second usb port you can use a 2nd usb as swap.
zram/zswap>>swap
Even more so on a USB installation.
I agree 16gb is not small, I have an installation on EXT4 (no file compression) with XFCE, firefox, and some other tools on a 16gb stick, with 8gb free.
I'd be most concerned with how painfully slow 16gb USB sticks tend to be. If OP can afford it, an external SSD (or an SSD in a USB enclosure) is soooo much nicer.
Do yourself a favour and spend 20 bucks on a new ssd.
Just throwing this out there: a 120gb sata ssd costs less than 20 dollars
Linux doesn't see USB sticks any differently from hard disk drives in regards to how it stores data to it. It just uses USB attached SCSI (UAS) to communicate with it instead of SATA ATA/AHCI. Go for it. Just be sure to use UUIDs in fstab and if you're installing a a UEFI bootloader to it and using grub, make sure to include the --removable option.
Arch has a whole wiki article with recommended tweaks for extending hardware compatibility regarding running on a multitude of machines, and also for extending the lifespan of the USB stick: https://wiki.archlinux.org/title/Install_Arch_Linux_on_a_removable_medium
Virtualbox even with a .vdi inserted, it just doesn't work. "ERROR: 'UUID-2023-12-01-15-40-55-00' device did not show up after 30 seconds"
My plan was to install arch on usb stick for one machine, since the hard drive is dead.