Skip to content

Instantly share code, notes, and snippets.

@Nimdis
Created November 19, 2015 17:17
Show Gist options
  • Save Nimdis/c6f26f5eab50f27572a7 to your computer and use it in GitHub Desktop.
Save Nimdis/c6f26f5eab50f27572a7 to your computer and use it in GitHub Desktop.
Arch installing
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Create partitions
gdisk /dev/sda
1 100MB EFI partition # Hex code ef00
2 250MB Boot partition # Hex code 8300
3 100% size partiton # Hex code 8300
mkfs.vfat -F32 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext4 /dev/sda3
# Mount the new system
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/home
mount /dev/sda4 /mnt/home
mkdir /mnt/var
mount /dev/sda5 /mnt/var
# Unless vim and zsh are desired these can be removed from the command
pacstrap /mnt base base-devel grub-efi-x86_64 zsh vim git efibootmgr dialog
# 'install' fstab
genfstab -pU /mnt >> /mnt/etc/fstab
# Enter the new system
arch-chroot /mnt /bin/bash
# Setup system clock
ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
hwclock --systohc --utc
# Set the hostname
echo MYHOSTNAME > /etc/hostname
# Update locale
echo LANG=en_US.UTF-8 > /etc/locale.conf
echo LANGUAGE=en_US > /etc/locale.conf
echo LC_ALL=C > /etc/locale.conf
# Set password for root
passwd
# Add real user remove -s flag if you don't whish to use zsh
# useradd -m -g users -G wheel,storage,power -s /bin/zsh MYUSERNAME
# passwd MYUSERNAME
# Configure mkinitcpio with modules needed for the initrd image
vim /etc/mkinitcpio.conf
# Add 'ext4' to MODULES
# Regenerate initrd image
mkinitcpio -p linux
# Setup grub
grub-install
grub-mkconfig -o /boot/grub/grub.cfg
# Exit new system and go into the cd shell
exit
# Unmount all partitions
umount -R /mnt
# Reboot into the new system, don't forget to remove the cd/usb
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment