Arch Linux on USB - Talk

I have always wanted a way to get an entire OS on a flash drive and then be able to boot it to anywhere I want.

Of course, something like this is already possible with persistent storage on liveUSB's, but that is not what I wanted. I want to have an entire system running on my USB stick, with custom programs and all (liveUSB's remove your software when you are finished as nothing gets stored permanently).

So, today I decided to make this dream come true. But, because I like a little bit of a challenge, I decided to do this with what is known as one of the more difficult OS's to set up: Arch Linux.

For those of you who don't know, Arch Linux is probably the barest you can make an OS, whilst still being able to call it an OS. It has no one-click installer, the entire installation is done through the command line and you will want to have some Linux experience before starting it.

To begin with, I ran this install from a LiveCD I had burned before I began. Although I used a LiveCD so that I could get max preformance on my PC, you can also create a minimal Virtualbox and attach the USB and the LiveCD to it. This is easier, because Virtualbox automatically handles the internet connection.

So after I booted into my LiveCD, I went through the usual steps of preparing Arch: I connected to the internet (using WiFi, because normal Arch doesn't function with my ethernet adapter), setted up the keyboard layouts and formatted my USB stick to ext4 (which was done without journaling to make the storage last longer).

At this point, the primary difference between this USB install and a normal OS install is this: Rather than mounting /dev/sda1 (which is the primary partition on my OS) to /mnt, I mounted /dev/sdb1 to /mnt.

After that, the steps continue as usual, until I finished setting up an fstab (default drive mounting list). Unlike a normal Arch install, where I can just leave the settings be, this time I had to check and ensure that rather than using the drive path (which is /dev/sdb1), Arch used the UUID.

So I continued setting it up as usual, until I got to the point of installing the GRUB bootloader. I installed it to /dev/sdb1, but immediatley ran into an issue: The config file generator also generated an entry for every single system on my main hard drive, along with the system on my USB. After searching on how to fix this, I found out that I had to narrow the results in the config generator using grep (search utility) to only include my USB stick.

I finished setitng up Arch and rebooted on my USB stick this time... and it worked! :toot:

I now have a fully functioning USB stick with Arch Linux on it and it only took me ~6 hours of reading docs and setting it up. Perfect way to spend my time. But hey, I enjoyed it.

The OS is a little bit slower than my normal Ubuntu install, but it works. I haven't tried putting a desktop enviroment on it, but to be honest, I see very little reason to do it. The standard tty sign in has color support, and the only game I play on the go is Dwarf Fortress. For mail and the internet, curses apps exist. Hm... curses programs, maybe I will talk about those next time....
  • Like
Reactions: 2 people

Comments

Oooo, it reminds me of the days when I would boot tails and Kali Linux on a Purple cheap USB. It died after a month xD
 
  • Like
Reactions: 1 person
"For those of you who don't know, Arch Linux is probably the barest you can make an OS, whilst still being able to call it an OS."

Gelex would like to have a word with you cough Gentoo cough
 
  • Like
Reactions: 2 people

Blog entry information

Author
Ev1l0rd
Views
197
Comments
8
Last update

More entries in Personal Blogs

  • 4: Reddit
    Finally, number 4! Never thought this day would come, did you? Uhh...
  • books
    1. I am cool as hell, have one million dollars 2. I am banned from...
  • Syncthing is fun!
    Having been kinda active in an Android forum I quickly got sick about...
  • Feeling at home here
    Not much to say this time. I'm depressed. Like almost always. Trying to...
  • I'll start, rate mine 1-10
    It's a very mixed bag, some rock, some rap, some video game music, a...

More entries from Ev1l0rd

Share this entry

General chit-chat
Help Users
    T @ to0fresh: i downloaded everyfile but the cheats are in chinese anyway i can change it?