Making permanent tweaks to arch install media?
I have been installing arch a lot lately for the school I work for, and there are a couple things I would like to tweak that I have to do every time I do an install. The main one that comes to mind is enabling colors and parallel downloads in /etc/pacman.conf
It would also be nice to have set -o vi on
Is there a way to do this on the installation media? This is the method I used for creating the install media.
About this post
- Posted
- Archived
- Score
- 8 · 90% up
- Kind
- Text
- ID
- ssrwlf
9 comments
you want to build a custom iso...
https://wiki.archlinux.org/title/Archiso
Seems a little overkill for the tweaks I want to make, HOWEVER it also looks like fun to dig into. Thank you.
You need to follow some of the steps there in order to modify the ISO. You don't need to follow the entire wiki. Just the steps you need for what you want to do.
The alternate to building a custom ISO is to just install Arch to a USB stick. Then you boot a "real" system and use that.
That's an interesting idea, so I could install it onto external media, no need for a desktop environment, and boot to that.
I assume I'd need to do it with a boot partition and bootloader, same as a normal install?
Basically yes.
I'd install it with a desktop, because it makes reading the ArchWiki and setting up wifi so much easier, but you could do a terminal-only install.
After that, you *need* to install the package "arch-install-scripts" which lets you chroot from your persistent system.
Here is the tutorial I used, but there are some newer ones:
https://web.archive.org/web/20210225074102/https://magyar.urown.cloud/arch-usb.html
The special ext4 format command from the arch wiki page for removable media
mkfs.ext4 -O "^has_journal" /dev/sdXXis nice, and install both amd&intel microcode in the same step as you install Grub. Installing them after you've set grub up just means you have to reset it :facepalm:If you install the same arch image with same settings everywhere, you can configure everything once, then use clonezilla to clone your build and unpack it everywhere you want.
If you want to run post-installation changes that are same for all arch instances - just write a shell script and run it right after the installation. You can also automate the entire installation as well. Your script can be downloadable from the web or you can put it on the same HDD/USB that you use as a live image.
Make your own install script with all the tweaks you want applied.
I made mine downloadable from a short subdomain.
Then you launch your installation, and on prompt you download it with
curl -L me.com/installscript.shand you start it.For my use case, I made 2 scripts. The first one installs a pretty basic archlinux (base linux linux-firmware git...), a bootloader, a user. Then I clone my dotfiles from git and on my user
.local/binfolder I have a script to install and configure all my user environment.Updating install media would be a repetitive task (one new install Iso each month). Scripts don't change unless you want to update tweaks.