Advertisement
oddbox

Arch Linux Install Guide

Mar 21st, 2018
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.64 KB | None | 0 0
  1. Arch Linux Install Guide:
  2. Up-to-date as of March 2018
  3. https://wiki.archlinux.org/index.php/Installation_guide
  4. http://wideaperture.net/blog/?p=3851
  5.  
  6. For Dual boot
  7. Windows 10 info:
  8. cmd.exe /k echo %processor_architecture%
  9. Detecting Windows boot mode
  10. msinfo32
  11. In the System Information windows, select System Summary on the left and check the value of BIOS mode item on the right
  12. If the value is UEFI, Windows boots in UEFI/GPT mode. If the value is Legacy, Windows boots in BIOS/MBR mode.
  13.  
  14. vbox configurations:
  15. 4G RAM
  16. Dynamically allocated
  17. 40GB suggested
  18.  
  19. VirtualBox > Preferences > Input
  20. Set Host Key
  21.  
  22. Boot Arch Linux (x86_64)
  23.  
  24. Verify Boot mode:
  25. # ls /sys/firmware/efi/efivars
  26. If the directory does not exist, the system may be booted in BIOS or CSM mode. Refer to your motherboard's manual for details.
  27.  
  28. Connect to the Internet:
  29. # ping archlinux.org
  30. If no connection is available, stop the dhcpcd service with systemctl stop dhcpcd@ and pressing Tab.
  31. Proceed with Network configuration for wired devices or Wireless network configuration for wireless devices.
  32. https://wiki.archlinux.org/index.php/Network_configuration#Device_driver
  33. https://wiki.archlinux.org/index.php/Wireless_network_configuration
  34.  
  35. Update system clock
  36. # timedatectl set-ntp true
  37.  
  38. https://wiki.archlinux.org/index.php/Partitioning
  39. List block devices:
  40. # fdisk -l
  41.  
  42. Look for sda (SATA Drive A)
  43. # ls /dev
  44.  
  45. Format sda:
  46. # gdisk /dev/sda
  47. -press 'p' at prompt and press enter;
  48.  
  49. Create Partitions:
  50. Partition 1 - boot partition:
  51. -type 'n' and at enter prompt to create new partition
  52. -default partition number
  53. -first sector accept default, last sector type +250M
  54. -use 8300 and press enter
  55.  
  56. Partition 2 - swap partition:
  57. -type 'n' at propmt
  58. -default partition number
  59. -first sector default, last sector +2G
  60. -use 8200 and press enter
  61.  
  62. Partition 3 - root partition:
  63. -type 'n' and enter at prompt
  64. -default partition number
  65. -first sector default, last sector +15G
  66. -use 8300 and press enter
  67.  
  68. Partition 4 - home partition:
  69. -type 'n' and enter at prompt
  70. -default partition number
  71. -first and last sector default
  72. -default 8300 hex code
  73.  
  74. Format Disk Partitions:
  75. # mkfs -t ext4 /dev/sda1
  76. # mkfs -t ext4 /dev/sda3
  77. # mkfs -t ext4 /dev/sda4
  78. # mkswap /dev/sda2
  79.  
  80. // Used for configuration and system maintenence through install medium
  81. Mount Hard Drive Partitions:
  82. # swapon /dev/sda2
  83. # mount /dev/sda3 /mnt
  84. # cd /mnt
  85. create points and mount
  86. # mkdir boot home
  87. # mount /dev/sda1 boot
  88. # mount /dev/sda4 home
  89. # cd /
  90.  
  91. Put Arch Linux on our root partition
  92. # pacstrap /mnt base base-devel
  93.  
  94. Generate system's fstab file
  95. # genfstab -p /mnt >> /mnt/etc/fstab
  96. check fstab file
  97. # more /mnt/etc/fstab
  98.  
  99. Install boot loader:
  100. # pacstrap /mnt syslinux
  101.  
  102. Configure Linux Install:
  103. # arch-chroot /mnt
  104.  
  105. Set locale:
  106. # nano /etc/locale.conf
  107. LANG="en_US.UTF-8"
  108. # nano /etc/locale.gen
  109. #en_US.UTF-8 UTF-8
  110. #en_US ISO-8859-1
  111. Delete preceding '#' on two above lines in locale.gen file
  112.  
  113. Implement changes:
  114. # locale-gen
  115.  
  116. Give time zone:
  117. # ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
  118. To display all timezones:
  119. # ln -s /usr/share/zoneinfo/America/
  120. hit tab a couple times.
  121.  
  122. Set host name:
  123. # nano /etc/hostname
  124.  
  125. Configure bootloader:
  126. https://wiki.archlinux.org/index.php/Category:Boot_loaders
  127. # cd /boot/syslinux/
  128. # more syslinux.cfg
  129.  
  130. Arch wiki says to copy all
  131. # cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
  132.  
  133. # extlinux --install /boot/syslinux
  134.  
  135. # dd conv=notrunc bs=440 count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda
  136.  
  137. “Make an initial ramdisk environment (mkinitcpio)
  138. using presets (-p) suitable for Linux”.:
  139. # mkinitcpio -p linux
  140.  
  141. Set root password:
  142. # passwd
  143.  
  144. Transport back to install disk:
  145. # exit
  146.  
  147. Unmount all partitions
  148. # umount /mnt/boot
  149. # umount /mnt/home
  150. # swapoff /dev/sda2
  151. # umount /mnt
  152.  
  153. Optionally manually unmount all the partitions with
  154. # umount -R /mnt
  155. this allows noticing any "busy" partitions, and finding the cause with fuser(1).
  156.  
  157. Set boot disk to bootable.
  158. # sgdisk /dev/sda --attributes=1:set:2
  159.  
  160. #reboot
  161.  
  162. Remove .iso or installation medium
  163. On vBox:
  164. Devices > CD/DVD Devices > Remove disk from virtual drive
  165.  
  166. Boot into new Arch Linux install
  167.  
  168. https://wiki.archlinux.org/index.php/General_recommendations
  169.  
  170. Connect to the internet
  171. # dhcpcd
  172.  
  173. Add a new user
  174. https://wiki.archlinux.org/index.php/Users_and_groups#User_management
  175. # useradd -m -s /bin/bash yogi
  176. # passwd yogi
  177. to create a home dir for new user
  178. -d home-directory
  179. create the home directory
  180. -m
  181.  
  182. install sudo for super user priviledges outside of root
  183. # pacman -S sudo
  184. tell sudo that new user account has admin priviledges
  185. # nano /etc/sudoers
  186. find line that says the following and add user:
  187. ##
  188. ## User privilege specification
  189. ##
  190. root ALL=(ALL) ALL
  191. <username> ALL=(ALL)
  192.  
  193. to logout:
  194. # exit
  195.  
  196. Automating Internet Connection:
  197. $ ip addr or # ip a displays serial number to be used in place of eth0
  198. $ sudo systemctl enable dhcpcd@eth0.service
  199.  
  200. in my case we have enp0s3
  201. $ sudo systemctl enable dhcpcd@enp0s3.service
  202.  
  203. Now Arch will automatically connect to internet upon booting
  204.  
  205. (not required) Connect to network you want
  206. $ sudo dhcpcd
  207.  
  208. Install X window system
  209. According to https://wiki.archlinux.org/index.php/Xorg:
  210. $ sudo pacman -S xorg-server xorg-apps
  211.  
  212. Install appropriate driver for X:
  213. $ lspci | grep -e VGA -e 3D
  214. $ sudo pacman -Ss xf86-video
  215.  
  216. checking/enabling/disabling services (like DMs)
  217. $ sudo systemctl is-enabled target.service (gdm.service for example)
  218. $ sudo enable target.service
  219. $ sudo disable target.service
  220.  
  221. download GNOME
  222. https://wiki.archlinux.org/index.php/GNOME
  223. $ sudo pacman -S gnome
  224. $ sudo pacman -S gnome-extra
  225. Enable GNOME DM at boot
  226. $ sudo enable gdm.service
  227.  
  228. Reboot to enter GNOME
  229.  
  230. Once in GNOME:
  231. create a shortcut to terminal, use 'gnome-terminal' as input
  232. Changing terminal settings; in terminal:
  233. Edit -> Profile Preferences
  234.  
  235.  
  236. Install NetworkManager package (Though GNOME is telling me I already had it)
  237. $ sudo pacman -S networkmanager
  238.  
  239. if you run into error:
  240. failed to init transaction (unable to lock database)
  241. OS suggests something like: "you can remove /var/lib/pacman/db.lck"
  242. $ sudo rm /var/lib/pacman/db.lck
  243. Try reinstall
  244.  
  245. For Firefox:
  246. # sudo pacman -S firefox
  247. Installing Python
  248. $ sudo pacman -S python
  249. $ sudo pacman -S python-pip
  250.  
  251. i3wm Installation and Customization:
  252. https://i3wm.org/docs/userguide.html#configuring
  253. http://briancaffey.github.io/2017/10/17/moving-from-gnome-to-i3-on-arch-linux.html
  254. $ sudo pacman -S i3
  255. $ sudo pacman -Ss dmenu
  256. Cutomization and configuration:
  257. Config created upon booting up with i3 for the first time.
  258. ~/.config/i3/config
  259.  
  260. If using ~/.i3 scheme:
  261. $ cp -r /etc/i3 ~/.i3
  262.  
  263.  
  264. Background image; add following to ~/.config/i3/config:
  265. exec_always feh --bg-scale ~/Pictures/image.jpg
  266. To restart i3 in place:
  267. $ Mod+shift+r
  268.  
  269. Installing rxvt terminal (if using i3)
  270. $ sudo pacman -S rxvt-unicode
  271. Launch:
  272. $ urxvt
  273. Go back to gnome terminal:
  274. $ gnome-terminal
  275. rxvt config are made in ~/.Xresources, refresh with following:
  276. $ xrdb ~/.Xresources
  277.  
  278. Some aesthtic changes to .Xresources:
  279. Go to: (terminal.sexy a website for presets)
  280. URxvt.font: xft:Consolas:size=10
  281. URxvt.transparent:true
  282. reload urxvt using
  283. $ xrdb ~/.Xresources
  284. $ urxvt
  285.  
  286. Removing packages:
  287. https://wiki.archlinux.org/index.php/pacman#Removing_packages
  288. $ sudo pacman -R target_package
  289. Removing packages recursively without interfering with other installs:
  290. $ sudo pacman -Rs target_package
  291.  
  292. Debugging:
  293. $ sudo pacman gdb
  294. $ gdb appname
  295. (gdb) r
  296. ..wait for seg fault
  297. (gdb) bt full
  298. Post out to pastebin and include URL in bug report
  299.  
  300. Pywal Install (Still not working)
  301. $ sudo pacman -S python-pywal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement