Skip to content

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.

8 points9 comments
Open on Reddit
About this post
Posted
Archived
Score
8 · 90% up
Kind
Text
ID
ssrwlf

Author

46
posts
40
comments
0
media
View profile

9 comments

you want to build a custom iso...

https://wiki.archlinux.org/title/Archiso

12 points

Seems a little overkill for the tweaks I want to make, HOWEVER it also looks like fun to dig into. Thank you.

4 points

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.

6 points

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.

5 points

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?

2 points

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/sdXX is 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:

3 points

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.

2 points

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.sh and 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/bin folder 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.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.