{"id":31880771,"url":"https://github.com/antoniovazquezblanco/arch-install-documentation","last_synced_at":"2026-07-03T16:03:22.587Z","repository":{"id":246027797,"uuid":"819871436","full_name":"antoniovazquezblanco/Arch-Install-Documentation","owner":"antoniovazquezblanco","description":"My Archlinux install instructions","archived":false,"fork":false,"pushed_at":"2025-09-07T19:24:51.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T00:58:03.292Z","etag":null,"topics":["archlinux","archlinux-dotfiles"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoniovazquezblanco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-25T10:48:17.000Z","updated_at":"2025-09-07T19:24:55.000Z","dependencies_parsed_at":"2024-06-25T12:59:15.706Z","dependency_job_id":"e7851891-d0c2-4594-8711-f797ce1d236d","html_url":"https://github.com/antoniovazquezblanco/Arch-Install-Documentation","commit_stats":null,"previous_names":["antoniovazquezblanco/arch-install-documentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antoniovazquezblanco/Arch-Install-Documentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniovazquezblanco%2FArch-Install-Documentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniovazquezblanco%2FArch-Install-Documentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniovazquezblanco%2FArch-Install-Documentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniovazquezblanco%2FArch-Install-Documentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniovazquezblanco","download_url":"https://codeload.github.com/antoniovazquezblanco/Arch-Install-Documentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniovazquezblanco%2FArch-Install-Documentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013899,"owners_count":26085326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archlinux","archlinux-dotfiles"],"created_at":"2025-10-13T01:30:57.607Z","updated_at":"2026-07-03T16:03:22.572Z","avatar_url":"https://github.com/antoniovazquezblanco.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arch Install Documentation\n\nMy Archlinux install instructions, scripts and config files.\n\nDescription of the different uses of my machines:\n* Virtualbox Guest: Use via SSH in a graphical detached state.\n* Surface: Gnome, disk encryption, secure boot.\n* X1 Carbon (3rd Gen): Gnome, disk encryption, secure boot.\n\n\n## Prepare a boot medium\n\nDownload an up to date ISO from \u003chttps://archlinux.org/download/\u003e.\nYou can either use the ISO or prepare a [boot USB](https://wiki.archlinux.org/title/USB_flash_installation_medium).\n\n\n## Target preparation\n\n\n\u003cdetails\u003e\n\u003csummary\u003eVirtualbox Guest\u003c/summary\u003e\n\nCreate a VM with the following settings:\n\n```\nGeneral\n ├─ Advanced\n │   ├─ Shared clipboard: Bidirectional\n │   └─ Drag and drop: Bidirectional\n ├─ System\n │   ├─ Motherboard\n │   │   ├─ Base memory: As desired...\n │   │   ├─ Floppy: Disable\n │   │   └─ Enable EFI: Enable\n │   └─ Processor\n │       └─ Processors: As desired...\n ├─ Display\n │   └─ Screen\n │       ├─ Video memory: As desired...\n │       ├─ Graphics controller: VMSVGA\n │       └─ Enable 3D accel: Disable\n ├─ Network\n │   ├─ Adapter 1: Will be used for network access\n │   │   └─ Attached to: NAT\n │   └─ Adapter 2: Host only SSH access\n │       └─ Attached to: Host-only Adapter\n ├─ USB\n │   ├─ Enable USB: Enable\n │   └─ Mode: USB 3.0 xHCI\n └─ Shared Folders\n     └─ Add as desired with access full and automount.\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSurface\u003c/summary\u003e\n\nSurface devices do not have a good upstreamed support. It is advisable to be up to date by following the linux-surface project: \u003chttps://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup\u003e.\n\n1. Boot Windows and update all the firmwares if there are any pending updates.\n2. Power off the surface, press volume up + power, release power to boot into UEFI.\n3. Security \u003e Change SecureBoot \u003e Disable SecureBoot.\n4. Boot configuration \u003e Enable boot from USB devices.\n5. Swipe left on USB storage to boot from USB.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eX1 Carbon (3rd Gen)\u003c/summary\u003e\n\n1. Reboot into BIOS by pressing F1.\n2. Set UEFI boot mode.\n3. Enable secureboot and delete secureboot keys.\n4. Reboot into Boot Menu by pressing F12.\n5. Boot into Arch install medium.\n\n\u003c/details\u003e\n\n\n## Initial target setup\n\nCommon setup would be to setup a network connection and enable ssh.\nIt is faster to copy commands to an ssh window than typing on the target.\n\n```bash\n# Set keyboard locale\nloadkeys es\n\n# (Optional) Configure wireless connection...\necho '[General]'                        \u003e /etc/iwd/main.conf\necho 'EnableNetworkConfiguration=true' \u003e\u003e /etc/iwd/main.conf\nsystemctl restart iwd\niwctl --passphrase $passphrase station wlan0 connect $essid\n\n# Set a password and start ssh\npasswd\nsystemctl start sshd\nip a\n```\n\n\n## Setup\n\nConnect to the target machine via ssh.\n\n```bash\nssh root@archiso\n```\n\nStart the setup process.\n\n```bash\n# Configure your options...\n\n# Select a drive, lsblk command may help you\nDRIVE=\"/dev/sda\"\n#DRIVE=\"/dev/nvme0n1\"\n\n# Select a kernel\nKENRELNAME=\"linux\"\n#KENRELNAME=\"linux-surface\"\n\n# Select firmware packaes\nPKGFW=\"intel-ucode linux-firmware-intel\"\n\n# Hostname\n#HOSTNAME=\"VirtualArch\"\n#HOSTNAME=\"SurfaceArch\"\n#HOSTNAME=\"X1Arch\"\nHOSTNAME=\"VaultArch\"\n\n# User\nUSER=\"dummy\"\n\n\n# Now installation begins...\n\n# Sync time via NTP\ntimedatectl set-ntp true\n\n# Update database and keyring\npacman -Sy --noconfirm archlinux-keyring\n\n# (Optional) Add linux-surface repo\ncurl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | sudo pacman-key --add -\nsudo pacman-key --lsign-key 56C464BAAC421453\necho \"\"                                             \u003e\u003e /etc/pacman.conf\necho \"[linux-surface]\"                              \u003e\u003e /etc/pacman.conf\necho \"Server = https://pkg.surfacelinux.com/arch/\"  \u003e\u003e /etc/pacman.conf\npacman -Sy --noconfirm\n\n# (Optional) Secure wipe the drive\ncryptsetup open --type plain $DRIVE container --key-file /dev/urandom\ndd if=/dev/zero of=/dev/mapper/container status=progress bs=1M\ncryptsetup close container\n\n# Create partitions\n# boot - EFI partition 512MiB\n# arch - The remaining space\nsgdisk --clear \\\n       --new=1:0:+512MiB --typecode=1:ef00 --change-name=1:boot \\\n       --new=2:0:0       --typecode=2:8300 --change-name=2:arch \\\n       $DRIVE\n\n# Format boot partition\nmkfs.fat -F32 -n boot /dev/disk/by-partlabel/boot\n\n# Format OS partition without encryption\nmkfs.btrfs --label arch /dev/disk/by-partlabel/arch -f\n# Format OS partition with encryption\ncryptsetup luksFormat --align-payload=8192 -s 256 -c aes-xts-plain64 /dev/disk/by-partlabel/arch\ncryptsetup open /dev/disk/by-partlabel/arch arch\nmkfs.btrfs --label arch /dev/mapper/arch -f\n\n# Create subvolumes\nmount -t btrfs LABEL=arch /mnt\nbtrfs subvolume create /mnt/@\nbtrfs subvolume create /mnt/@home\nbtrfs subvolume create /mnt/@log\nbtrfs subvolume create /mnt/@pkg\nbtrfs subvolume create /mnt/@.snapshots\numount -R /mnt\n\n# Mount partitions\nmount -t btrfs -o subvol=@,defaults,compress=zstd:1,noatime LABEL=arch /mnt\nmkdir -p /mnt/{boot,home,var/log,var/cache/pacman/pkg,.snapshots}\nmount -t btrfs -o subvol=@home,noatime,compress=zstd:1 LABEL=arch /mnt/home\nmount -t btrfs -o subvol=@log,noatime,compress=zstd:1 LABEL=arch /mnt/var/log\nmount -t btrfs -o subvol=@pkg,noatime,compress=zstd:1 LABEL=arch /mnt/var/cache/pacman/pkg/\nmount -t btrfs -o subvol=@.snapshots,noatime,compress=zstd:1 LABEL=arch /mnt/.snapshots\nmount LABEL=boot /mnt/boot\n\n# System package strapping\npacstrap -K /mnt base ${KENRELNAME} ${KENRELNAME}-headers ${PKGFW} btrfs-progs sudo networkmanager wget usbutils less htop\n\n# Generate fstab\ngenfstab -L -p /mnt \u003e\u003e /mnt/etc/fstab\n\n# Chroot into the new system\narch-chroot /mnt\n\n# Set timezone\nln -sf /usr/share/zoneinfo/Europe/Madrid /etc/localtime\nhwclock --systohc\n\n# Locale\necho \"en_US.UTF-8 UTF-8\" \u003e\u003e /etc/locale.gen\necho \"es_ES.UTF-8 UTF-8\" \u003e\u003e /etc/locale.gen\nlocale-gen\necho \"KEYMAP=es\" \u003e\u003e /etc/vconsole.conf\necho \"FONT=Lat2-Terminus16\" \u003e\u003e /etc/vconsole.conf\necho \"LANG=en_US.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_ADDRESS=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_MONETARY=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_MEASUREMENT=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_NUMERIC=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_PAPER=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_TELEPHONE=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\necho \"LC_TIME=es_ES.UTF-8\" \u003e\u003e /etc/locale.conf\n\n# Set hostname\necho \"${HOSTNAME}\" \u003e /etc/hostname\necho \"127.0.0.1 ${HOSTNAME}.localdomain ${HOSTNAME}\" \u003e\u003e /etc/hosts\n\n# Initramfs\nmkinitcpio -p ${KERNELNAME}\n\n# Bootloader\nbootctl --path=/boot install --no-variables\nmkdir -p /boot/loader\necho \"default ArchOS\" \u003e /boot/loader/loader.conf\necho \"timeout 0\" \u003e\u003e /boot/loader/loader.conf\nmkdir -p /boot/loader/entries\necho \"title Arch Linux\" \u003e /boot/loader/entries/arch.conf\necho \"linux /vmlinuz-${KERNELNAME}\" \u003e\u003e /boot/loader/entries/arch.conf\necho \"initrd /intel-ucode.img\" \u003e\u003e /boot/loader/entries/arch.conf\necho \"initrd /initramfs-${KERNELNAME}.img\" \u003e\u003e /boot/loader/entries/arch.conf\n# Without encryption\necho \"options root=LABEL=arch rw rootflags=subvol=/@\" \u003e\u003e /boot/loader/entries/arch.conf\n# With encryption\nroot_uuid=\"$(blkid -L arch -o export | grep -oP '^UUID=\\K.+')\"\necho \"options rd.luks.name=${root_uuid}=arch root=LABEL=arch rw rootflags=subvol=/@\" \u003e\u003e /boot/loader/entries/arch.conf\necho \"title Arch Linux Fallback\" \u003e /boot/loader/entries/arch-fallback.conf\necho \"linux /vmlinuz-${KERNELNAME}\" \u003e\u003e /boot/loader/entries/arch-fallback.conf\necho \"initrd /intel-ucode.img\" \u003e\u003e /boot/loader/entries/arch.conf\necho \"initrd /initramfs-${KERNELNAME}-fallback.img\" \u003e\u003e /boot/loader/entries/arch-fallback.conf\n# Without encryption\necho \"options root=LABEL=arch rw rootflags=subvol=/@\" \u003e\u003e /boot/loader/entries/arch.conf\n# With encryption\necho \"options rd.luks.name=${root_uuid}=arch root=LABEL=arch rw rootflags=subvol=/@\" \u003e\u003e /boot/loader/entries/arch.conf\n\n# User management\npasswd\nuseradd -m -G users,wheel,audio,video,input -s /usr/bin/zsh $USER\npasswd $USER\n\n# Sudoers\ncp /etc/sudoers /tmp/sudoers.bak\nsed -i '/%wheel ALL=(ALL:ALL) ALL/s/^# //g' /tmp/sudoers.bak\nvisudo -cf /tmp/sudoers.bak\nif [ $? -eq 0 ]; then\n  sudo cp /tmp/sudoers.bak /etc/sudoers\nelse\n  echo \"Could not modify /etc/sudoers file. Please do this manually.\"\nfi\nrm /tmp/sudoers.bak\n\n# (Optional) Add linux-surface repo\npacman -Sy --noconfirm archlinux-keyring\ncurl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | sudo pacman-key --add -\nsudo pacman-key --lsign-key 56C464BAAC421453\necho \"\"                                             \u003e\u003e /etc/pacman.conf\necho \"[linux-surface]\"                              \u003e\u003e /etc/pacman.conf\necho \"Server = https://pkg.surfacelinux.com/arch/\"  \u003e\u003e /etc/pacman.conf\npacman -Sy --noconfirm\n\n# Networking\npacman -S networkmanager wpa_supplicant\nsystemctl enable NetworkManager\nsystemctl enable bluetooth\n\n# Zsh\npacman -S zsh zsh-completions grml-zsh-config\nchsh -s /usr/bin/zsh\n\n# TPM and secureboot\npacman -S tpm2-tools sbctl\n\n# Fingerprint reader\npacman -S fprintd imagemagick\n\n# SSH\npacman -S openssh\n# Configure network\n# Set a fixed address in the host only adapter and mark as never use for routing\nsudo nmtui\n# Configure ssh\necho \"ListenAddress 192.168.56.102\" \u003e\u003e /etc/ssh/sshd_config\nsystemctl enable sshd\n\n# Development\npacman -S base-devel vim neovim git \n\n# Graphic drivers\npacman -S mesa vulkan-intel\n\n# Desktop\npacman -S gdm wayland gnome-shell gnome-calculator gnome-control-center gnome-disk-utility gnome-keyring gnome-logs gnome-settings-daemon gnome-system-monitor gnome-tweaks ghostty firefox \nsystemctl enable gdm\n\n# Install fonts\npacman -S ttf-dejavu gnu-free-fonts ttf-droid ttf-liberation ttf-roboto ttf-cascadia-code ttf-hack ttf-roboto-mono\n\n# Install the AUR helper\ncd /tmp\nsu $USER -P -c \"wget https://aur.archlinux.org/cgit/aur.git/snapshot/pikaur.tar.gz \u0026\u0026 tar -xf pikaur.tar.gz \u0026\u0026 rm *.tar.gz \u0026\u0026 cd pikaur \u0026\u0026 makepkg -s\"\npacman -U /tmp/pikaur/*.zst\ncd ~\nrm -rf /tmp/pikaur\n\n# (Optional) Surface drivers\npacman -S iptsd\npikaur -S libwacom-surface surface-control\n\n# (Optional) For VMs configure SSH daemon\n# Set a fixed address in the host only adapter and mark as never use for routing\nsudo nmtui\necho \"ListenAddress 192.168.56.102\" \u003e\u003e /etc/ssh/sshd_config\nsystemctl enable sshd\n\n# Exit chroot\nexit\n\n# Umount, close and reboot\numount -R /mnt\nreboot\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniovazquezblanco%2Farch-install-documentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniovazquezblanco%2Farch-install-documentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniovazquezblanco%2Farch-install-documentation/lists"}