Skip to content

Instantly share code, notes, and snippets.

@u9E9F
Last active May 10, 2019 22:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u9E9F/373d8788f34a6d3c61ad to your computer and use it in GitHub Desktop.
Save u9E9F/373d8788f34a6d3c61ad to your computer and use it in GitHub Desktop.

prevent myself from ball rippings by archlinux installation guide

TODO: efibootmgr TODO: gpt

step1

# use this to find your installation medium
fdisk -l

# launches fdisk pointed at your drive
fdisk /dev/sdX  

Command (m for help): o  <--- new MBR
Command: n  <--- new parititon
Select: default
Partition no: default
First sector: default
Last sector: +25G  #change this accordingly
 
Command (m for help): t
Hex code: 8e      #changes partition type to LVM
 
Command (m for help): a  #****make sure its bootable (depend on hardware)
Command (m for help): w  #writes changes, so make sure you're sure it's the right drive!

step2

pvcreate /dev/sdXX # mine was /dev/sda1
pvcreate --dataalignment 1m /dev/sdXX    #this step for SSDs ONLY

pvdisplay

vgcreate vgName /dev/sda1
vgdisplay

lvcreate -L 15G vgName -n lvName   <--- creates an LV of 15G
lvcreate -l +100%FREE vgName -n lvName <--- fills all free space with an LV

modprobe dm-mod
vgscan
vgchange -ay


mkfs.ext4 /dev/mapper/vgName-lvName
mount /dev/mapper/vgName-lvName /mnt

step3

# select /etc/pacman.d/mirrorlist

pacstrap -i /mnt base base-devel 

genfstab -U /mnt > /mnt/etc/fstab

arch-chroot /mnt /bin/bash

# change /etc/locale.gen
locale-gen

echo "LANG=en_US.UTF-8" > /etc/locale.conf

ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime

hwclock --systohc --utc

step3.1

vi /etc/mkinitcpio.conf
# HOOKS="base udev ... block lvm2 filesystems"
# MODULES="dm-mod" 

mkinitcpio -p linux 

step3.2

# you might need do this

vi /etc/lvm/lvm.conf
# change use_lvmetad = 0  <---- change this from 1 to 0

step4

pacman -S grub os-prober

vi /etc/default/grub
# GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm" 
# GRUB_CMDLINE_LINUX="root=/dev/mapper/...."

grub-install --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

step4.1

# you might need do this

vi /etc/lvm/lvm.conf
# change use_lvmetad = 1  

package-query

wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=package-query 

mv ... PKGBUILD

makepkg -s

pacman -U ....tar.xz

https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=yaourt

mv ... PKGBUILD

makepkg -s

pacman -U ....tar.xz
@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

yaourt -S net-tools

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

xorg
awesome

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

sound
brightness

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

alsa-utils
alsamxier

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

urxvt
urxvt-perls

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

ibus
ibus-rime
F4

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

awesome wm
feh

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

ethernet system-networkd

@u9E9F
Copy link
Author

u9E9F commented Dec 18, 2016

install

systemctl restart dhpcd.service
timedatectl set-ntp true
lvremove vg_vol1/lv_vol1

@u9E9F
Copy link
Author

u9E9F commented Jan 14, 2017

use bumblebee https://wiki.archlinux.org/index.php/Bumblebee

mesa - An open-source implementation of the OpenGL specification.
xf86-video-intel - Intel driver.
nvidia - for discrete graphic card

https://wiki.archlinux.org/index.php/xorg
Intel Open source xf86-video-intel mesa-libgl lib32-mesa-libgl
Nvidia Open source xf86-video-nouveau mesa-libgl lib32-mesa-libgl
Nvidia Proprietary nvidia nvidia-libgl lib32-nvidia-libgl

change some settings in bumblebee configurations
then
intel-virtual-output -f
arandr

@u9E9F
Copy link
Author

u9E9F commented May 27, 2017

pacman -S --needed base-devel

@u9E9F
Copy link
Author

u9E9F commented May 27, 2017

https://www.ostechnix.com/install-arch-linux-latest-version/

cfdisk
// primary, bootable, ext4 (linux), write
// primary, (linux), write


fdisk -l
mkfs.ext4 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2

mount /dev/sda1 /mnt
mkdir /mnt/home

pacstrap /mnt base base-devel
genfstab /mnt >> /mnt/etc/fstab

arch-chroot /mnt /bin/bash
vi /etc/locale.gen
locale-gen
vi /etc/locale.conf
LANG=en_US.UTF-8

ls /usr/share/zoneinfo/
ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

hwclock --systohc --utc
passwd

/etc/hostname
systemctl enable dhcpcd


pacman -S grub os-prober
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

exit
umount /mnt
umount /mnt/home

reboot

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