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 13.01.2023
created 22.06.2020
[+] 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   
- 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.


the greater struggle via serocell - media feed March 30, 2024

Screenshot: New Device via Detritus March 18, 2024

Idiot's guide to resource migration in Terraform via Archive Fever by Edwin Wenink March 15, 2024
Sometimes we need to migrate resources that are managed in Terraform. Terraform is a declarative language to manage cloud infrastructure from code, which allows you to reliably automate your deployments and put your infrastructure configuration under versi…

Generated by openring from webring