Created
October 9, 2017 12:51
-
-
Save starkers/65247ff67d7fa6c02bc63f0166e0c5ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## tips on coming to "pacman" or "yaourt" from "apt" world.. | |
# | |
# pacman does official standard "arch" packages.. | |
# yaourt will do that AND anything installed from the "Arch User Repo" | |
# | |
# run pacman with sudo (I alias "pacman" -> "sudo pacman" ) | |
# run yaourt as yourself (it installs stuff locally to your profile and uses sudo if needed) | |
# | |
# apt-get update == pacman -Sy or yaourt -Sy | |
# apt-get search foo == pacman -Ss foo or yaourt -Ss foo | |
# apt-get upgrade == pacman -Syu or yaourt -Syu | |
# apt-get remove foo == pacman -R foo or yaourt -R foo | |
#prep boot disk | |
dd if=archlinux.img of=/dev/sdX bs=16M | |
### boot USB | |
# | |
# | |
### Note partitioning and grub assumes NOT EFI | |
loadkeys uk | |
#get on internet | |
wifi-menu | |
#enable ssh so I can do this remotely | |
systemctl start ssh | |
# set a passwd for root (on boot disk) | |
passwd | |
# determine your IP | |
ip a | |
# ssh in from another PC | |
ssh -l root 10.3.0.X | |
# Create partitions | |
fdisk /dev/sdX | |
1 +250M Boot partitions | |
2 100% size partiton everything else(for luks) | |
mkfs.ext2 /dev/sda1 -L boot -m 0 | |
# Setup the encryption of the system | |
cryptsetup -c aes-xts-plain64 -y --use-random luksFormat /dev/sda2 | |
cryptsetup luksOpen /dev/sda2 luks | |
# Create encrypted partitions | |
# This creates one partions for root, modify if /home or other partitions should be on separate partitions | |
pvcreate /dev/mapper/luks | |
vgcreate vg0 /dev/mapper/luks | |
lvcreate --size 8G vg0 --name swap | |
lvcreate -l +100%FREE vg0 --name root | |
# Create filesystems on encrypted partitions | |
mkfs.ext4 -m 0 -L root /dev/mapper/vg0-root | |
mkswap /dev/mapper/vg0-swap | |
# Mount the new system | |
mount /dev/mapper/vg0-root /mnt | |
swapon /dev/mapper/vg0-swap | |
mkdir /mnt/boot | |
mount /dev/sda1 /mnt/boot | |
pacstrap /mnt base base-devel vim git efibootmgr dialog wpa_supplicant grub | |
mkdir /mnt/hostrun | |
genfstab -pU /mnt >> /mnt/etc/fstab | |
mount --bind /run /mnt/hostrun | |
arch-chroot /mnt /bin/bash | |
mkdir /run/lvm | |
mount --bind /hostrun/lvm /run/lvm | |
sed -i "s+relatime+noatime+g" /etc/fstab | |
ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime | |
hwclock --systohc --utc | |
echo finn-the-human > /etc/hostname | |
echo "en_GB ISO-8859-1" >> /etc/locale.gen | |
echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen | |
locale-gen | |
echo LANG=en_GB.UTF-8 > /etc/locale.conf | |
passwd | |
useradd -m -g users -G wheel -s /bin/bash starkers | |
passwd starkers | |
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
sed -i "s+block filesystems+block encrypt lvm2 filesystems+g" /etc/mkinitcpio.conf | |
mkinitcpio -p linux | |
# In /etc/default/grub edit the line GRUB_CMDLINE_LINUX to GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:luks:allow-discards" then run: | |
grub-mkconfig -o /boot/grub/grub.cfg | |
grub-install /dev/sda | |
pacman -S openssh | |
systemctl enable sshd | |
exit | |
umount -R /mnt | |
reboot | |
# #blacklisting a specific hardware device on my laptop | |
# echo "blacklist snd_hda_codec_realtek" >> /etc/modprobe.d/blacklist.conf | |
# I'm not sure if you need to install this anymore.... | |
# I think gnome-shell is on wayland now | |
pacman -S libglvnd xorg xorg-server xf86-input-libinput xorg-xbacklight | |
# terminator is the best terminal app ever... no others quite as good as it yet | |
# - Ctrl+Shift+"e" or "o" for splits | |
# - Ctrl+Shift+Arrowkey for resizing slits | |
pacman -S terminator | |
pacman -S gnome-shell gnome-tweak-tool gnome-control-center libx264 gdm chromium firefox wireless_tools networkmanager networkmanager-openvpn dhclient network-manager-applet | |
systemctl enable gdm | |
systemctl start gdm | |
# as un-priv user | |
sudo pacman -S base-devel rsync | |
git clone https://aur.archlinux.org/package-query.git /tmp/package-query | |
cd /tmp/package-query | |
makepkg -si | |
# yaourt allows you to install community maintained stuff easily on arch | |
## its super easy to maintain and create your own packages with arch | |
git clone https://aur.archlinux.org/yaourt.git /tmp/yaourt | |
cd /tmp/yaourt | |
makepkg -si | |
pacman -S gnome-tweak-tool | |
pacman -S community/arc-gtk-theme community/arc-solid-gtk-theme community/numix-gtk-theme extra/gnome-icon-theme-extras extra/gnome-icon-theme gtk-engine-murrine arc-icon-theme elementary-icon-theme seahorse | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment