Installing Archlinux on removable media

this is actually…a log of how i fucked up.

so, the other day i picked up a cheap usb stick when shopping, and i thought it would be cool to have a fully functional and bootable system image on it.

Since I already have archlinux as my daily os, i installed arch-install-scripts and started installing archlinux to the usb stick from my existing os.

I consider myself quite experienced in setting up archlinux, so i followed my instinct without reading an instruction. I partitioned the drive, made filesystem, mounted the partitions, install the base packages with pacstrap. Then chroot into it, made some basic configs to the system e.g. locale, timedate, users etc.

It was not until i ran grub-install and rebooted that i realized, i fucked up.

The command i ran was:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/grub/grub.cfg

exactly the same as what i did for my previous fresh install.

But this broke my hosting machines’s EFI. (Arch wiki said this would happen, but i was too confident to read it)

So, the correct ways of doing this is to add --removable argument to the grub-install command. This keeps grub-install within the new installed system and it’s media, so that it won’t consider the media as “part of the hosting machine” and mess with existing efi system of the hosting machine.

This is a reminder: always RTFM.

edited 20.04.2024
created 22.06.2020
EOF
[+] click to leave a comment [+]
the comment system on this blog works via email. The button
below will generate a mailto: link based on this page's url 
and invoke your email client - please edit the comment there!

[optional] even better, encrypt the email with my public key

- don't modify the subject field
- specify a nickname, otherwise your comment will be shown as   
  anonymous
- your email address will not be disclosed
- you agree that the comment is to be made public.
- to take down a comment, send the request via email.

>> SEND COMMENT <<