gptformat, withUEFIboot system and encrypted root
This will work for SD card instalaition as well as a standard install. To install on an SD card the boot and efi partitions must remain on the main hard drive. Replace
/dev/sdXwith/dev/mmcblk0for the root partition using/dev/mmcblk0p1in place of/dev/sdX3.
- use rufus for writing iso to usb
wifi-menu
setterm -blength 0
- List all disk partitions
fdisk -l - make sure to check disk file type for
gpt - (Optional) clear disk drive
shred --verbose --random-source=/dev/urandom --iterations=3 /dev/sdX - Edit disk partition of choice
cfdisk /dev/sdX
| Partition | Size | Type | Use |
|---|---|---|---|
| /dev/sdX1 | 256MB | EFI System Partition | /boot/efi |
| /dev/sdX2 | 512MB | Linux filesystem | /boot |
| /dev/sdX3 | 8GB+ | Linux filesystem | / |
- load dm-crypt
modprobe dm-crypt - load dm-mod
modprobe dm-mod - encrypt root
cryptsetup luksFormat -v -s 512 -h sha512 /dev/sdX3- ... enter password x2
- open root as alias (luks_root)
cryptsetup open /dev/sdX3 luks_root - root now at
/dev/mapper/luks_root
- format /boot/efi
mkfs.vfat -n "EFI System Partition" /dev/sdX1 - format /boot
mkfs.ext4 -L boot /dev/sdX2 - format / (root)
mkfs.ext4 -L root /dev/mapper/luks_root
- mount root to /mnt
mount /dev/mapper/luks_root /mnt - create /boot and mount
mkdir /mnt/bootmount /dev/sdX2 /mnt/boot
- create and mount efi partition in /boot
mkdir /mnt/boot/efimount /dev/sdX1 /mnt/boot/efi
- install to /mnt
pacstrap -i /mnt base base-devel efibootmgr grub
genfstab -U /mnt > /mnt/etc/fstab
- chroot in
arch-chroot /mnt - set password
passwd - add real user
useradd -m -g users -G wheel MYUSERNAMEpasswd MYUSERNAME
- add sudo privaleges group wheel
nano /etc/sudoers- uncomment
%wheel ALL=(ALL) ALL
- edit local
nano /etc/locale.gen - remove
#from language (en_US.UTF-8)- ...save
- set locale, run:
locale-genecho LANG=YOUR_LOCALE > /etc/locale.conf-->echo LANG=en_US.UTF-8 > /etc/locale.confexport LANG=YOUR_LOCALE-->export LANG=en_US.UTF-8
- set timezone
ln -sf /usr/share/zoneinfo/YOUR_REGION/YOUR_CIT /etc/localtime-->ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime - set clock
hwclock --systohc --utc - set hostname
echo YOUR_HOSTNAME > /etc/hostname - edit hosts
nano /etc/hosts - add to file:
127.0.0.1 localhost your_hostname
::1 localhost your_hostname
- ...save
- update Pacman
pacman -Syu - install dialog so you can access wifi-menu after booting into OS
pacman -S dialog - install os-prober and ntfs-3g so grub will automatically identify other OS's on your system wen generating a boot menu
pacman -S os-prober ntfs-3gos-prober
- edit grub
nano /etc/default/grub- set
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sdx3:luks_root" - uncomment (
#)GRUB_ENABLE_CRYPTODISK=y - ..save
- set
- Now edit /etc/mkinitcpio.conf
nano /etc/mkinitcpio.conf- add ext4 mmc_core mmc_block sdhci sdhci-pci to
MODULES - In the
HOOKSsection, add encrypt and lvm2 after block - ...save
- add ext4 mmc_core mmc_block sdhci sdhci-pci to
- generate initramfs
mkinitcpio -p linux - install GRUB
grub-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id=ArchLinux - generate GRUB configuration
grub-mkconfig -o /boot/grub/grub.cfgandgrub-mkconfig -o /boot/efi/EFI/ArchLinux/grub.cfg
- and then exit
exit - unmount all
umount -R /mnt - and reboot
reboot
- log back in as
rootuser - connect to internet with
wifi-menu- For VM:
systemctl enable [email protected]
- For VM:
- Install GUI
- I like GNOME, so:
pacman -S gnome
- I like GNOME, so:
- update repo database & install Pakku
- get git
pacman -S git - open to Downloads (or anywere really)
- run
git clone https://aur.archlinux.org/pakku.git - open pakku foled
cd pakku - install pakku
makepkg -si - you can delete the pakku repo now
cd ..and thenrm -rf pakku
- get git
- Optional gnome install
- gnome-extra has a buch of packages I don't like
- these are individual packages from gnome-extra I do like
pacman -S gnome-nettool gnome-tweaks gnome-usage gnome-weather nautilus-sendto pacman-contrib
- Applications I like to have
pacman -S atom gimp vlc libreoffice-fresh firefox thunderbird pidgin
- Start/enable system applications
systemctl enable NetworkManager.servicesystemctl enable paccache.timersystemctl enable gdm.service
- restart system with
reboot