Skip to content

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).

6 points23 comments
Open on Reddit
About this post
Posted
Archived
Score
6 · 100% up
Kind
Text
ID
2k1673

Author

30
posts
91
comments
2
media
View profile

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.

6 points

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 base

  • arch-chroot

  • Create fstab (genfstab)

  • Install bootloader (syslinux-install-<TAB>) (does completion count?)

  • passwd

  • Reboot

  • 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.

3 points

You forgot mounting the newly created partitions!

3 points

Oh right. Another one I'd have noticed when installing, though.

2 points

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.

1 points
unknown author3 hidden

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?

0 points

It makes the kernel bootable... It is run every time you upgrade the linux package.

2 points

You must have performed it during all of your installations, because if you don't, GRUB gives an error and fails to boot.

1 points

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...

1 points

That should be it, except I know the fstab step is wrong...

genfstab -p /mnt >> /mnt/etc/fstab
You were just missing a flag, pretty close.

1 points

I have done it once without looking up info. God, took to long though. Try and error.

1 points

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.

1 points

I can almost do it from memory. The last time I tried I forgot to add lvm2 to my mkinitcpio.conf.

1 points

I tried, but I forgot to do something small and had to re-install my boot loader. I think i didn't build vmlinuz.

1 points

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.

1 points

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.

1 points

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!

1 points

Here's my process(purely from memory, use at own risk)

fdisk /dev/sda
mount /dev/sda1 /mnt
wifi-menu
pacstrap /mnt base base-devel wpa_supplicant dialog bash-completion vim syslinux xorg dmenu spectrwm rxvt-unicode openssh ntp
arch-chroot /mnt bash
vim /etc/locale.gen /etc/hostname
locale-gen
syslinux-<tab> -iam
vim /boot/syslinux/syslinux.cfg
passwd
useradd -m -g users -G audio,power,wheel,storage,video,lp username
passwd username
reboot
1 points

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/sdx

  • Boot 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/sda1
    mkfs.ext4 /dev/sda2 && mkfs.ext4 /dev/sda3

  • folders and mounting:
    mount /dev/sda2 /mnt && mkdir /mnt/{home,boot}
    mount /dev/sda1 /mnt/boot && mount /dev/sda3 /mnt/home

  • standard packages via pacstrap:
    pacstrap /mnt base base-devel xorg-server xorg-server-utils xorg-xinit
    I prefer installing the system specific stuff inside arch-chroot.

  • genfstab -p /mnt >> /mnt/etc/fstab && arch-chroot /mnt

  • locale: nano /etc/locale.gen && locale-gen and then locale > /etc/locale.conf
    export LANG=your_locale.UTF-8
    networking(wired): echo archhost > /etc/hostname
    systemctl enable dhcpcd.service
    clock: ln -s /usr/share/zoneinfo/foo /etc/localtime

  • grub bootloader (I need to learn UEFI):
    pacman -S grub
    grub-install --target=i386-pc --recheck --debug /dev/sda
    grub-config -o /boot/grub/grub.cfg

  • mkinitcpio -p linux, then passwd root, exit arch-chroot and umount -R /mnt before the reboot into the OS

  • localectl set-keymap --no-convert colemak && localectl set-x11-keymap --no-convert us pc104 colemak

  • useradd -m -s /bin/bash foouser && passwd foouser
    export EDITOR=nano
    visudo (I believe it's something like foouser archhost=/usr/bin/pacman)

  • Last touches to the audio/video stuff:
    pacman -S mesa xf86-video-vesa xf86-video-intel
    pacman -S alsa-utils alsa-plugins && alsamixer
    log into userland.

That's pretty much it. If desktops are a thing:

  • cinnamon for a quick and easy DE:
    sudo pacman -S cinnamon

  • LXQt for a preferred install:
    mkdir builds && cd builds
    curl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
    tar zxvf package-query.tar.gz && cd package-query
    makepkg -si && cd ..
    curl -O https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
    tar zxvf yaourt.tar.gz && cd yaourt
    makepkg -si && cd ~
    sudo pacman -S openbox oxygen-icons && yaourt -Sa lxqt-desktop-git pcmanfm-git

I 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-mkconfig not grub-config.
package mesa was already installed.
Cinnamon has a lot of dependencies, wow. Still worked correctly. Missing a newline for yaourt's curl.
Forgot about .xinitrc, shoot.

1 points

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.

1 points

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.

1 points

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.

1 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.