Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/85063/virtual/www/domains/waldauf.org/lib/plugins/color/syntax.php:1) in /data/web/virtuals/85063/virtual/www/domains/waldauf.org/inc/actions.php on line 180
linux:arch:installation - WiKi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:arch:installation [2017/11/09 09:56]
waldauf [DOS Boot]
linux:arch:installation [2017/11/09 10:06] (current)
waldauf [UEFI]
Line 3: Line 3:
 ===== UEFI ===== ===== UEFI =====
  
-Install ARCH Linux with encrypted file-system and UEFI +Install ARCH Linux with encrypted file-system and UEFI.
-# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.+
  
-# Download the archiso image from https://www.archlinux.org/ +The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains more verbose description.
-# Copy to usb-drive +
-dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux+
  
-# Boot from the usbIf the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.+Download the archiso image from https://www.archlinux.org/.
  
-# Set swedish keymap +Copy to a usb-drive. 
-loadkeys sv-latin1+<code> 
 +dd if=archlinux.img of=/dev/sdX bs=16M && sync 
 +</code>
  
-This assumes a wifi only system...+Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. 
 + 
 + 
 +==== Wifi ==== 
 + 
 +This assumes a wifi only system... 
 +<code>
 wifi-menu wifi-menu
 +</code>
 +
 +
 +==== Create partitions ====
  
-Create partitions+Create partitions 
 +<code>
 cgdisk /dev/sdX cgdisk /dev/sdX
 1 100MB EFI partition # Hex code ef00 1 100MB EFI partition # Hex code ef00
 2 250MB Boot partition # Hex code 8300 2 250MB Boot partition # Hex code 8300
 3 100% size partiton # (to be encrypted) Hex code 8300 3 100% size partiton # (to be encrypted) Hex code 8300
 +</code>
  
 +Format to your FS
 +<code>
 mkfs.vfat -F32 /dev/sdX1 mkfs.vfat -F32 /dev/sdX1
 mkfs.ext2 /dev/sdX2 mkfs.ext2 /dev/sdX2
 +</code>
  
-Setup the encryption of the system+Setup the encryption of the system 
 +<code>
 cryptsetup -c aes-xts-plain64 -y --use-random luksFormat /dev/sdX3 cryptsetup -c aes-xts-plain64 -y --use-random luksFormat /dev/sdX3
 cryptsetup luksOpen /dev/sdX3 luks cryptsetup luksOpen /dev/sdX3 luks
 +</code>
  
-Create encrypted partitions +Create encrypted partitions
-This creates one partions for root, modify if /home or other partitions should be on separate partitions+ 
 +This creates one partions for root, modify if /home or other partitions should be on separate partitions 
 +<code>
 pvcreate /dev/mapper/luks pvcreate /dev/mapper/luks
 vgcreate vg0 /dev/mapper/luks vgcreate vg0 /dev/mapper/luks
 lvcreate --size 8G vg0 --name swap lvcreate --size 8G vg0 --name swap
 lvcreate -l +100%FREE vg0 --name root lvcreate -l +100%FREE vg0 --name root
 +</code>
  
-Create filesystems on encrypted partitions+Create filesystems on encrypted partitions 
 +<code>
 mkfs.ext4 /dev/mapper/vg0-root mkfs.ext4 /dev/mapper/vg0-root
-mkswap /dev/mapper/vg0-swap+</code>
  
-Mount the new system +Mount the new system  
 +<code>
 mount /dev/mapper/vg0-root /mnt # /mnt is the installed system mount /dev/mapper/vg0-root /mnt # /mnt is the installed system
-swapon /dev/mapper/vg0-swap # Not needed but a good thing to test 
 mkdir /mnt/boot mkdir /mnt/boot
 mount /dev/sdX2 /mnt/boot mount /dev/sdX2 /mnt/boot
 mkdir /mnt/boot/efi mkdir /mnt/boot/efi
 mount /dev/sdX1 /mnt/boot/efi mount /dev/sdX1 /mnt/boot/efi
 +</code>
  
-Install the system also includes stuff needed for starting wifi when first booting into the newly installed system +==== Installation ==== 
-Unless vim and zsh are desired these can be removed from the command+ 
 +Install the system also includes stuff needed for starting wifi when first booting into the newly installed system
 + 
 +Unless vim and zsh are desired these can be removed from the command
 +<code>
 pacstrap /mnt base base-devel grub-efi-x86_64 zsh vim git efibootmgr dialog wpa_supplicant pacstrap /mnt base base-devel grub-efi-x86_64 zsh vim git efibootmgr dialog wpa_supplicant
 +</code>
  
-'install' fstab+'install' fstab 
 +<code>
 genfstab -pU /mnt >> /mnt/etc/fstab genfstab -pU /mnt >> /mnt/etc/fstab
-Make /tmp a ramdisk (add the following line to /mnt/etc/fstab)+</code> 
 + 
 +Make /tmp a ramdisk (add the following line to /mnt/etc/fstab) 
 +<code>
 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
-Change relatime on all non-boot partitions to noatime (reduces wear if using an SSD)+</code> 
 + 
 +Change relatime on all non-boot partitions to noatime (reduces wear if using an SSD) 
  
-Enter the new system+Enter the new system 
 +<code>
 arch-chroot /mnt /bin/bash arch-chroot /mnt /bin/bash
 +</code>
  
-Setup system clock+Setup system clock 
 +<code>
 ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime
 hwclock --systohc --utc hwclock --systohc --utc
 +</code>
  
-Set the hostname+Set the hostname 
 +<code>
 echo MYHOSTNAME > /etc/hostname echo MYHOSTNAME > /etc/hostname
 +</code>
  
-Update locale+Update locale 
 +<code>
 echo LANG=en_US.UTF-8 >> /etc/locale.conf echo LANG=en_US.UTF-8 >> /etc/locale.conf
 echo LANGUAGE=en_US >> /etc/locale.conf echo LANGUAGE=en_US >> /etc/locale.conf
 echo LC_ALL=C >> /etc/locale.conf echo LC_ALL=C >> /etc/locale.conf
 +</code>
  
-Set password for root+Set password for root 
 +<code>
 passwd passwd
 +</code>
  
-Add real user remove -s flag if you don't whish to use zsh +Add real user remove -s flag if you don't whish to use zsh 
-useradd -m -g users -G wheel -s /bin/zsh MYUSERNAME +<code> 
-passwd MYUSERNAME+useradd -m -g users -G wheel -s /bin/zsh MYUSERNAME 
 +passwd MYUSERNAME 
 +</code>
  
-Configure mkinitcpio with modules needed for the initrd image+Configure mkinitcpio with modules needed for the initrd image 
 +<code>
 vim /etc/mkinitcpio.conf vim /etc/mkinitcpio.conf
-Add 'ext4' to MODULES +</code> 
-Add 'encrypt' and 'lvm2' to HOOKS before filesystems+  * Add 'ext4' to MODULES 
 +  * Add 'encrypt' and 'lvm2' to HOOKS before filesystems
  
-Regenerate initrd image+Regenerate initrd image 
 +<code>
 mkinitcpio -p linux mkinitcpio -p linux
 +</code>
  
-Setup grub+Setup grub 
 +<code>
 grub-install grub-install
 +</code>
 +
 In /etc/default/grub edit the line GRUB_CMDLINE_LINUX to GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdX3:luks:allow-discards" then run: In /etc/default/grub edit the line GRUB_CMDLINE_LINUX to GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdX3:luks:allow-discards" then run:
 +<code>
 grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
 +</code>
  
-Exit new system and go into the cd shell+Exit new system and go into the cd shell 
 +<code>
 exit exit
 +</code>
  
-Unmount all partitions+Unmount all partitions 
 +<code>
 umount -R /mnt umount -R /mnt
 swapoff -a swapoff -a
 +</code>
  
-Reboot into the new system, don't forget to remove the cd/usb+Reboot into the new system, don't forget to remove the cd/usb 
 +<code>
 reboot reboot
 +</code>
  
  
Navigation
Print/export
Toolbox