Arch Fresh Install from Memory?
I'm mildly curious how many Arch Linux users are able to just blast through a fresh installation of Arch Linux via memory? I've installed Arch x3 in my life and each of them required me to have the Beginners Guide up as I follow the screen. I usually take a mental break after I install the core packages the guide suggest for ~30 and pick up where I left off. Install takes me about an hour. I've never used the Installation Guide versus the Beginners Guide but I don't think I'm missing much as I have a very basic/minimal configuration and hardware requirements (no wireless adapters, no RAID, basic traditional x86 PC setup and no mouse even).
About this post
- Posted
- Archived
- Score
- 6 · 100% up
- Kind
- Text
- ID
- 2k1673
23 comments
I've installed Arch 4 or 5 times now, but I haven't made any particular effort to memorize the installation process so I still have to consult the wiki. I prefer to do so anyways to ensure that I don't miss an important step, and also to take into account any changes that may have occurred since the last installation.
Let me try, I promise I'm doing this from memory:
Partition the drive (
cfdisk)Create filesystems (
mkfs)Install packages (
pacstrap) - yes, this can do more than just basearch-chrootCreate fstab (
genfstab)Install bootloader (
syslinux-install-<TAB>) (does completion count?)passwdReboot
Create user
Enable services (e.g. a DM, networking stuff)
Profit
I think I've done it twice before. Now let me check how I've done.
Edit:
So, I missed (from the installation guide):
Setting keyboard layout
Connecting to the internet
Choosing a mirror
hostname
timezone
locale
Editing mkinitcpio.conf
I think I'd have noticed the internet connection and mirrorlist, and I guess I'd have gotten a booting system.
You forgot mounting the newly created partitions!
Oh right. Another one I'd have noticed when installing, though.
When I first installed Arch, the Beginner's Guide was like a complete thing that told me everything I needed to know. Soon after, it was edited down to what it looks like now, and now I absolutely have to read both the Beginner's Guide AND the Installation Guide to not forget something super important, usually mkinitcpio. I don't know if each page is missing stuff or if each page just has it be typed in a way that I miss, like very briefly in one line without its own header or something, but it's quite shameful. To compensate, I just made a text file that lists all the steps with the default commands I would run. It goes well with my shell script that completely sets up my system for me, including installing packages (including built AUR packages) from a cache that I would get from my last backup.
I never quite understood the purpose for mkinitcpio and I never really performend it for any of my major installations. How does it affect the system in any way?
It makes the kernel bootable... It is run every time you upgrade the linux package.
You must have performed it during all of your installations, because if you don't, GRUB gives an error and fails to boot.
I might have cheated by reading few answers, but here is what I can remember:
Set up the install media (internet, locale, keymap...)
Partition drives with GNU Parted
Format partitions with mkfs (mkfs.ext4)
Format swap partitions with mkswap
Mount partitionstuff (mount /dev/partition /mnt/mountpoint)
mkfstab /mnt >> /mnt/etc/fstab
nano /mnt/etc/fstab
pacstrap /mnt base (base-devel grub os-prober)
arch-chroot
nano /etc/locale.gen
Uncomment needed locales
locale-gen
echo LANG=locale > /etc/locale.conf
export LANG=locale
Configure keymap
passwd
mkinitcpio -p linux
grub-install
grub-mkconfig -o /boot/grub/grub.conf
exit
umount -R /mnt
reboot
That should be it, except I know the fstab step is wrong...
genfstab -p /mnt >> /mnt/etc/fstabYou were just missing a flag, pretty close.
I have done it once without looking up info. God, took to long though. Try and error.
I've installed about 8 times over the past four years (only once on my computer and many times on others' computers). At this point I know how to do each of the steps, but I still look at the install guide to make sure I don't skip any of them. Takes me about 40 minutes.
I can almost do it from memory. The last time I tried I forgot to add lvm2 to my mkinitcpio.conf.
I tried, but I forgot to do something small and had to re-install my boot loader. I think i didn't build vmlinuz.
I wouldn't try to do it from memory. I definitely wouldn't try to do it without internet on another computer (which is what I did the first time I installed it; luckily there weren't any problems). I keep basic notes for order. Installing on a computer I've installed it on before (or as long as there aren't any problems or too many differences in the setup) can take less than 20 minutes for me now.
I probably could but I use the guide to make sure I don't miss any steps. The key components are Formatting, pacstrapping and setting up the bootloader. Other than that, there's a few little commands like mkinitcpio, etc.
The thing is, how long does one mistake in doing it from memory take? 1000x longer than consulting the guide that comes on the liveCD.
A few months ago, I went through this phase where I'd get frustrated with my current setup and reinstall Arch just for fun every week so. I could install it in about 15 minutes, downloading time included, with my eyes closed--well not exactly closed, but squinted at least. Silly me thought it would be fun to switch to Ubuntu Gnome for a bit, and by the time I got around to putting Arch back on, it was off to the installation guide for me!
Here's my process(purely from memory, use at own risk)
The first time I installed arch I made a lot of notes. Ever since then I've been documenting my system's changes, so I have a rolling set of install notes that I end up looking at rather frequently. I'm probably going to have to check AUR urls, but I'm not looking at anything else:
dd if=~/$user/path/to/arch-ISO of=/dev/sdxBoot from installation media
loadkeys colemak(I love that colemak is present, it's so convenient)MBR partitioning:
fdisk /dev/sda(+256M sda1, +21G sda2, the rest to sda3)Make the filesystems:
mkfs.ext2 /dev/sda1mkfs.ext4 /dev/sda2 && mkfs.ext4 /dev/sda3folders and mounting:
mount /dev/sda2 /mnt && mkdir /mnt/{home,boot}mount /dev/sda1 /mnt/boot && mount /dev/sda3 /mnt/homestandard packages via pacstrap:
pacstrap /mnt base base-devel xorg-server xorg-server-utils xorg-xinitI prefer installing the system specific stuff inside arch-chroot.
genfstab -p /mnt >> /mnt/etc/fstab && arch-chroot /mntlocale:
nano /etc/locale.gen && locale-genand thenlocale > /etc/locale.confexport LANG=your_locale.UTF-8
networking(wired):
echo archhost > /etc/hostnamesystemctl enable dhcpcd.serviceclock:
ln -s /usr/share/zoneinfo/foo /etc/localtimegrub bootloader (I need to learn UEFI):
pacman -S grubgrub-install --target=i386-pc --recheck --debug /dev/sdagrub-config -o /boot/grub/grub.cfgmkinitcpio -p linux, thenpasswdroot,exitarch-chroot andumount -R /mntbefore therebootinto the OSlocalectl set-keymap --no-convert colemak && localectl set-x11-keymap --no-convert us pc104 colemakuseradd -m -s /bin/bash foouser && passwd foouserexport EDITOR=nanovisudo(I believe it's something likefoouser archhost=/usr/bin/pacman)Last touches to the audio/video stuff:
pacman -S mesa xf86-video-vesa xf86-video-intelpacman -S alsa-utils alsa-plugins && alsamixerlog into userland.
That's pretty much it. If desktops are a thing:
cinnamon for a quick and easy DE:
sudo pacman -S cinnamonLXQt for a preferred install:
mkdir builds && cd buildscurl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gztar zxvf package-query.tar.gz && cd package-querymakepkg -si && cd ..curl -O https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gztar zxvf yaourt.tar.gz && cd yaourtmakepkg -si && cd ~sudo pacman -S openbox oxygen-icons && yaourt -Sa lxqt-desktop-git pcmanfm-gitI can never remember anything past this point, I'm not crazy enough to memorize my post-install customizations, that's what notes are for. I'll test this in a VM and see what I missed.
grub-mkconfignotgrub-config.package
mesawas already installed.Cinnamon has a lot of dependencies, wow. Still worked correctly. Missing a newline for yaourt's
curl.Forgot about .xinitrc, shoot.
I've installed twice because I was doing that on two machine, but it's pretty robust ! I've never had to reinstall the whole thing, even when breaking my system pretty badly.
I have never tried without the installation guide, but there are also docs on the iso (if no internet). Also, why the beginner guide? I feel it isn't needed if you have done it even once before.
I probably could if I was me from my high school days where I ran Slackware. We didn't have package managers back then. You had to just download the entire distro onto a cd and have a 3.5" floppy boot disk. I used to have to configure and compile my own kernel at that time.
It's been close to 15 years since I was last in high school / using Slackware and I've been using Windows ever since (gaming reasons). Just recently got back into linux and the Arch install was a breeze to understand (following the steps ofc). I'm pretty sure once I've spent some more time in "full-time linux", I could get my chops back and do fresh installs from memory.