Last active
October 15, 2015 20:38
-
-
Save GuillaumeLebeau/354699c62af9e031fa86 to your computer and use it in GitHub Desktop.
ArchLinux install
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
# Boot into the Arch Live CD and find the current ip address, load a keymap and start sshd. | |
# Setup can now continue via SSH with the abilty to copy and paste commands. | |
loadkeys fr-pc | |
wifi-menu | |
ip addr | |
ping -c 3 www.google.com | |
passwd | |
systemctl start sshd | |
# Build a btrfs filesystem on the entire SSD and create subvolumes | |
mkfs.btrfs -L arch_linux -m raid0 -d raid0 /dev/sda /dev/sdb /dev/sdc /dev/sdd -f | |
mount -t btrfs -L arch_linux -o defaults,relatime,compress=lzo,ssd,discard,space_cache /mnt | |
cd /mnt | |
btrfs subvolume create __active | |
btrfs subvolume create __active/root | |
btrfs subvolume create __active/home | |
btrfs subvolume create __snapshots | |
# Mount the subvolumes | |
cd | |
umount /mnt | |
mount -t btrfs -L arch_linux -o defaults,relatime,compress=lzo,ssd,discard,space_cache,subvol=__active/root /mnt | |
mkdir /mnt/home | |
mount -t btrfs -L arch_linux -o defaults,relatime,compress=lzo,ssd,discard,space_cache,subvol=__active/home /mnt/home | |
# Choose mirror | |
nano /etc/pacman.d/mirrorlist | |
# Install the base packages | |
pacstrap -i /mnt base base-devel | |
# Configure fstab | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
nano /mnt/etc/fstab | |
# chroot | |
arch-chroot /mnt | |
# Language and location settings | |
nano /etc/locale.gen | |
locale-gen | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
export LANG=en_US.UTF-8 | |
# Set keymap | |
echo "KEYMAP=fr-pc" > /etc/vconsole.conf | |
echo "FONT=lat9w-16" >> /etc/vconsole.conf | |
# Set the timezone | |
ln -sf /usr/share/zoneinfo/Europe/Paris > /etc/localtime | |
hwclock --systohc --utc | |
# Set hostname | |
echo archlinux > /etc/hostname | |
# Configure repositories, add AUR repository | |
nano /etc/pacman.conf | |
#[archlinuxfr] | |
#SigLevel = Never | |
#Server = http://repo.archlinux.fr/$arch | |
pacman -Sy | |
# Create users | |
passwd | |
useradd -m -g users -G wheel,storage,power -s /bin/bash guillaume | |
chfn guillaume | |
passwd guillaume | |
pacman -S sudo | |
EDITOR=nano visudo | |
# Uncomment the line '%wheel ALL=(ALL) ALL' | |
pacman -S bash-completion | |
# Install grub | |
pacman -S grub btrfs-progs | |
nano /etc/mkinitcpio.conf | |
# At the HOOKS line remove fsck. | |
mkinitcpio -p linux | |
grub-install --target=i386-pc --recheck /dev/sda | |
grub-install --target=i386-pc --recheck /dev/sdb | |
grub-install --target=i386-pc --recheck /dev/sdc | |
grub-install --target=i386-pc --recheck /dev/sdd | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# Wired | |
systemctl enable dhcpcd@NAME-OF-THE-NETWORK.service | |
# Wireless | |
pacman -S iw wpa_supplicant dialog | |
# Install OpenSSH | |
pacman -S openssh | |
systemctl enable sshd | |
nano /etc/ssh/sshd_config | |
# Add the line AllowUsers [YOUR USER] to sshd_config | |
# Reboot into the new system | |
exit | |
umount -R /mnt | |
reboot | |
# Log as 'guillaume' | |
sudo wifi-menu -o | |
sudo netctl enable WIFI_PROFILE | |
sudo pacman -S yaourt | |
# Install zsh, oh-my-zsh | |
sudo pacman -Sy zsh zsh-completions | |
chsh -s /bin/zsh | |
sudo pacman -S git | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
nano ~/.zshrc | |
# Edit line: ZSH_THEME="ys" | |
source ~/.zshrc | |
# Install X | |
sudo pacman -S xorg-server xorg-server-utils xorg-xinit | |
sudo pacman -S xf86-video-intel | |
sudo pacman -S xf86-input-synaptics | |
# Install bspwm | |
sudo pacman -Sy bspwm sxhkd | |
cp /etc/X11/xinit/xinitrc ~/.xinitrc | |
nano ~/.xinitrc | |
mkdir ~/.config/bspwm | |
cp /usr/share/doc/bspwm/examples/bspwmrc ~/.config/bspwm/ | |
mkdir ~/.config/sxhkd | |
cp /usr/share/doc/bspwm/examples/sxhkdrc ~/.config/sxhkd/ | |
chmod +x ~/.config/bspwm/bspwmrc | |
# https://www.reddit.com/r/unixporn/comments/3ngwcg/bspwm_gruvbox/ | |
# https://github.com/inject3d/dotfiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment