Skip to content

Instantly share code, notes, and snippets.

@b1-88er
Last active November 13, 2020 15:10
Show Gist options
  • Save b1-88er/4eab78dbc1c73ef58e0a9ace71709d15 to your computer and use it in GitHub Desktop.
Save b1-88er/4eab78dbc1c73ef58e0a9ace71709d15 to your computer and use it in GitHub Desktop.
# RESCUE BOOT
cryptsetup open /dev/nvme0n1p2 luks
mkdir /current
mount -o subvol=@,ssd,compress=lzo,noatime,nodiratime /dev/mapper/luks /current
manjaro-chroot /current /bin/bash
# INSTALL
# activate wifi
# done
timedatectl set-ntp true
vi /etc/pacman.d/mirrorlist ## select PL
pacman -Sy
pacman -S vim
vim /etc/pacman.d/mirrorlist
gdisk /dev/nvme0n1
#o (Create a new empty GUID partition table (GPT))
#Proceed? Y
#n (Add a new partition)
#Partition number 1
#First sector (default)
#Last sector +512M
#Hex code EF00
#n (Add a new partition)
#Partition number 2
#First sector (default)
#Last sector (press Enter to use remaining disk)
#Hex code 8300
#w
#Y
cryptsetup luksFormat /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 luks
mkfs.vfat -F32 /dev/nvme0n1p1
mkfs.btrfs /dev/mapper/luks
mount /dev/mapper/luks /mnt
btrfs subvolume create /mnt/@
umount /mnt
mount -o subvol=@,ssd,compress=lzo,noatime,nodiratime /dev/mapper/luks /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
pacman -S arch-install-scripts
pacstrap /mnt base base-devel btrfs-progs vim sudo bash bash-completion intel-ucode wpa_supplicant
genfstab -U /mnt >> /mnt/etc/fstab
vim /mnt/etc/fstab
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
manjaro-chroot /mnt /bin/bash
echo x270 > /etc/hostname
ln -sf /usr/share/zoneinfo/Europe/Warsaw /etc/localtime
hwclock --systohc
vim /etc/locale.gen #uncomment en_US.UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
passwd
pacman -S linux51
vim /etc/mkinitcpio.conf
# add encrypt and btrfs after block
mkinitcpio -p linux51
bootctl --path=/boot install
blkid | grep -i crypto_luks
cat <<EOF > /boot/loader/entries/arch.conf
title manjaro-x270
linux /vmlinuz-5.1-x86_64
initrd /intel-ucode.img
initrd /initramfs-5.1-x86_64.img
options cryptdevice=UUID={FROM_GREP}:luks:allow-discards root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options=discard rw mem_sleep_default=deep
EOF
# update everything
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
# keybase confi + ansible from now on.
pacman -Syu
# sudo without password
echo "ed ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# auto login, real protection is at the LUKS partition level
sudo mkdir -p /etc/systemd/system/[email protected]
sudo cat <<EOF > /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM
EOF
# clone dotfiles and run ansible playbook
@b1-88er
Copy link
Author

b1-88er commented Dec 23, 2019

Possibly missing firmware for module: aic94xx
Possibly missing firmware for module: wd719x

git clone https://aur.archlinux.org/aic94xx-firmware.git
cd aic94xx-firmware
makepkg -sri

git clone https://aur.archlinux.org/wd719x-firmware.git
cd wd719x-firmware
makepkg -sri

https://gist.github.com/imrvelj/c65cd5ca7f5505a65e59204f5a3f7a6d

@b1-88er
Copy link
Author

b1-88er commented Mar 20, 2020

xrandr --output eDP-1 --brightness 1.3
for screen brightness regulation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment