Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ## Pre-installation
- # Format the partitions
- lsblk -f
- mkfs.f2fs -f -w 4096 -l Linux /dev/sdc6
- cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --use-random --verify-passphrase --type luks2 --integrity hmac-sha512 --sector-size 4096 --label Home --pbkdf argon2id --pbkdf-force-iterations 16 --pbkdf-memory 1048576 --pbkdf-parallel 1 --timeout 60 luksFormat /dev/sdc7
- cryptsetup open --type luks2 /dev/sdc7 arch
- sudo mount -t f2fs -o rw,noatime,lazytime,relatime,background_gc=on,data_flush,no_heap,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6 /dev/sdc6 /mnt
- sudo mkdir /mnt/{boot,home,root,var}
- sudo mount -t vfat -o rw,noatime,lazytime,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro /dev/sdc2 /mnt/boot
- sudo mkfs.brfs -f -L Home -n 16k /dev/mapper/arch /tmp/arch
- mkdir /tmp/arch
- sudo mount -t btrfs -o autodefrag,noatime,lazytime,relatime,space_cache=v2,datasum,ssd_spread,subvol=home /dev/mapper/arch /tmp/arch
- # BTRFS subvolumes
- sudo btrfs subvolume create /tmp/arch/root
- sudo btrfs subvolume create /tmp/arch/home
- sudo btrfs subvolume create /tmp/arch/var
- sudo btrfs subvolume list /tmp/arch
- sudo umount /tmp/arch
- # Mount the file systems
- sudo mount -t btrfs -o autodefrag,relatime,noatime,lazytime,relatime,space_cache=v2,datasum,ssd_spread,subvol=root /dev/mapper/arch /tmp/root
- sudo mount -t btrfs -o autodefrag,relatime,noatime,lazytime,relatime,space_cache=v2,datasum,ssd_spread,subvol=home /dev/mapper/arch /tmp/home
- sudo mount -t btrfs -o autodefrag,relatime,noatime,lazytime,relatime,space_cache=v2,datasum,ssd_spread,subvol=var /dev/mapper/arch /tmp/var
- # Update the system clock
- timedatectl set-local-rtc false
- timedatectl set-ntp true
- timedatectl set-timezone Europe/Brussels
- # Swap
- dd if=/dev/zero of=/mnt/swapfile bs=8M count=1024
- chmod 600 /mnt/swapfile
- mkswap /mnt/swapfile
- swapon /mnt/swapfile
- ## Installation
- # Select the mirrors
- sed -i -e "s/^#Server = http:\/\/archlinux.cu.be\/\$repo\/os\/\$arch/Server = http:\/\/archlinux.cu.be\/\$repo\/os\/\$arch/" /etc/pacman.d/mirrorlist
- # Install the base packages
- pacstrap /mnt base base-devel bash-completion btrfs-progs dnscrypt-proxy etckeeper efivar efibootmgr elinks f2fs-tools intel-ucode mc ntfs-3g rsync sudo zsh zsh-completions |& tee -a /tmp/pacstrap.log
- :: There are 2 providers available for resolvconf:
- :: Repository core
- 1) openresolv 2) systemd-resolvconf
- Enter a number (default=1):
- warning: directory permissions differ on /mnt/root/
- filesystem: 755 package: 750
- Optional dependencies for bash
- bash-completion: for tab completion
- Optional dependencies for util-linux
- python: python bindings to libmount
- Initializing machine ID from random generator.
- :: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
- bootloader to replace sysvinit with systemd, or install systemd-sysvcompat
- Optional dependencies for systemd
- libmicrohttpd: remote journald capabilities
- quota-tools: kernel-level quota management
- systemd-sysvcompat: symlink package to provide sysvinit binaries [pending]
- polkit: allow administration as unprivileged user
- curl: machinectl pull-tar and pull-raw [pending]
- Optional dependencies for glib2
- python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report
- libelf: gresource inspection tool [installed]
- Optional dependencies for gettext
- git: for autopoint infrastructure updates
- Optional dependencies for iproute2
- linux-atm: ATM support
- Optional dependencies for iputils
- xinetd: for tftpd
- Optional dependencies for mkinitcpio
- xz: Use lzma or xz compression for the initramfs image [installed]
- bzip2: Use bzip2 compression for the initramfs image [installed]
- lzop: Use lzo compression for the initramfs image
- lz4: Use lz4 compression for the initramfs image [installed]
- mkinitcpio-nfs-utils: Support for root filesystem on NFS
- Optional dependencies for linux
- crda: to set the correct wireless channels of your country
- Optional dependencies for groff
- netpbm: for use together with man -H command interaction in browsers
- psutils: for use together with man -H command interaction in browsers
- libxaw: for gxditview
- Optional dependencies for man-db
- gzip [installed]
- Optional dependencies for netctl
- dialog: for the menu based wifi assistant
- dhclient: for DHCP support (or dhcpcd)
- dhcpcd: for DHCP support (or dhclient) [installed]
- wpa_supplicant: for wireless networking support
- ifplugd: for automatic wired connections through netctl-ifplugd
- wpa_actiond: for automatic wireless connections through netctl-auto
- ppp: for PPP connections
- openvswitch: for Open vSwitch connections
- Optional dependencies for libsecret
- gnome-keyring: key storage service (or use any other service implementing org.freedesktop.secrets)
- Optional dependencies for pinentry
- gtk2: gtk2 backend
- qt5-base: qt backend
- gcr: gnome3 backend
- Optional dependencies for gnutls
- guile: for use with Guile bindings
- Optional dependencies for gnupg
- libldap: gpg2keys_ldap [installed]
- libusb-compat: scdaemon
- pcsclite: scdaemon
- Optional dependencies for pacman
- perl-locale-gettext: translation support in makepkg-template
- Optional dependencies for s-nail
- smtp-forwarder: for sending mail
- Optional dependencies for usbutils
- python: for lsusb.py usage
- coreutils: for lsusb.py usage [installed]
- Optional dependencies for vi
- s-nail: used by the preserve command for notification [installed]
- perl: warning: Setting locale failed.
- perl: warning: Please check that your locale settings:
- LANGUAGE = (unset),
- LC_ALL = (unset),
- LANG = "en_US.UTF-8"
- are supported and installed on your system.
- perl: warning: Falling back to the standard locale ("C").
- Optional dependencies for gcc
- lib32-gcc-libs: for generating code for 32-bit ABI
- Optional dependencies for patch
- ed: for patch -e functionality
- Optional dependencies for git
- tk: gitk and git gui
- perl-libwww: git svn
- perl-term-readkey: git svn
- perl-mime-tools: git send-email
- perl-net-smtp-ssl: git send-email TLS support
- perl-authen-sasl: git send-email TLS support
- perl-mediawiki-api: git mediawiki support
- perl-datetime-format-iso8601: git mediawiki support
- perl-lwp-protocol-https: git mediawiki https support
- perl-cgi: gitweb (web interface) support
- python2: various helper scripts
- subversion: git svn
- gnome-keyring: GNOME keyring credential helper
- Optional dependencies for etckeeper
- mercurial: use mercurial for version control
- bzr: use bazaar for version control
- Optional dependencies for mc
- aspell: spelling corrections
- cabextract: ucab extfs
- cdparanoia: audio extfs
- cdrkit: iso9660 extfs
- cvs: CVS support
- gawk: hp48+ extfs [installed]
- mtools: a+ extfs
- p7zip: support for 7zip archives
- perl: needed by several extfs scripts [installed]
- python2-boto: s3+ extfs
- python2-pytz: s3+ extfs
- samba: VFS support
- unace: uace extfs
- unarj: uarj extfs
- unrar: urar extfs
- zip: uzip extfs
- ## Configure the system
- # Fstab
- sudo genfstab -U /mnt >> /mnt/etc/fstab
- read -p "Press key to continue.. " -n1 -s
- # Chroot
- sudo arch-chroot /mnt
- bootctl --path=/boot install
- efibootmgr -a -b 0001
- # Time zone
- hwclock --systohc
- timedatectl set-local-rtc false
- timedatectl set-timezone Europe/Brussels
- timedatectl set-ntp true
- sed -i -e "s/^#Server = http:\/\/archlinux.cu.be\/\$repo\/os\/\$arch/Server = http:\/\/archlinux.cu.be\/\$repo\/os\/\$arch/" /etc/pacman.d/mirrorlist
- sed -i -e "s/^#NTP=/NTP=ntp.belbone.be/" "s/^#FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org/FallbackNTP=be.pool.ntp.org,europe.pool.ntp.org/" /etc/systemd/timesyncd.conf
- # Localization
- sed -i -e "s/^#en_us.UTF-8/en_us.UTF-8/" "s/^#nl_BE.UTF-8/nl_BE.UTF-8/" "s/^#ru_RU.UTF-8/ru_RU.UTF-8/" /etc/locale.gen
- locale-gen
- localectl set-locale LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
- cat > /etc/vconsole.conf << EOF
- FONT=Lat2-Terminus16
- EOF
- # Network configuration
- hostnamectl set-hostname inode
- cat > /etc/hosts << EOF
- # <header>
- 127.0.0.1 localhost
- 127.0.1.1 inode.localdomain inode
- ::1 localhost
- # </header>
- EOF
- systemctl enable --now systemd-networkd dnscrypt-proxy
- # Configure dnscrypt-proxy
- read -p "Press key to continue.. " -n1 -s
- # Initramfs
- sed -i -e "s/^HOOKS=(.*)$/HOOKS=(base systemd autodetect modconf block filesystems keyboard sd-vconsole fsck)/" mkinitcpio.conf
- mkinitcpio -p linux
- # Root password
- passwd
- usermod -s /bin/zsh
- # User management
- useradd -m -g users -G wheel -s /bin/zsh blitz
- passwd blitz
- visudo
- zsh <(curl meta.sh/aur) -Ccsir yay
- # Configure yay config
- read -p "Press key to continue.. " -n1 -s
- yay -Syu xorg-init xorg-server xterm xorg-twm |& tee -a /tmp/pacstrap.log
- yay -Syu xf86-video-intel libva-intel-driver libva-mesa-driver |& tee -a /tmp/pacstrap.log
- yay -Syu gtk3 cinnamon |& tee -a /tmp/pacstrap.log
- yay -Syu cairo-infinality-ultimate fontconfig-infinality-ultimate freetype2-infinality |& tee -a /tmp/pacstrap.log
Advertisement
Add Comment
Please, Sign In to add comment