SHARE
TWEET

Untitled

a guest Sep 11th, 2019 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Arch Linux recipe
  2.  
  3. ### Keyboard
  4.  
  5. If the keyboard is not American layout, load the target keyboard layout by
  6. running the following command:
  7.  
  8. ```bash
  9. loadkeys br-abnt2
  10. ```
  11.  
  12. ### Internet
  13.  
  14. Make sure you are connected to internet and your PC has a configured IP.
  15.  
  16. ```bash
  17. ip addr show
  18. # or
  19. wifi-menu
  20. ping google.com
  21. ```
  22.  
  23. ### Partitioning
  24.  
  25. Check the available storage units and do the partitioning.
  26.  
  27. ```bash
  28. fdisk -l
  29. cfdisk /dev/nvme0n1
  30. ```
  31.  
  32. Create the following partitions:
  33.  
  34. | Partition | Location       | Size | Type             |
  35. | --------- | -------------- | ---- | ---------------- |
  36. | Boot      | /dev/nvme0n1p1 | 512M | BIOS Boot        |
  37. | /         | /dev/nvme0n1p2 | 25G  | Linux Filesystem |
  38. | /home     | /dev/nvme0n1p3 | \*   | Linux Filesystem |
  39.  
  40. Check if the partitions were created:
  41.  
  42. ```bash
  43. fdisk -l /dev/nvme0n1
  44. ```
  45.  
  46. ### Formatting and making the filesystems
  47.  
  48. Run the following commands to format the partitions:
  49.  
  50. ```bash
  51. mkfs.vfat -F32 -n EFI /dev/nvme0n1p1
  52. mkfs.ext4 /dev/nvme0n1p2
  53. mkfs.ext4 /dev/nvme0n1p3
  54. ```
  55.  
  56. And then mount them:
  57.  
  58. ```bash
  59. mount /dev/nvme0n1p2 /mnt
  60. mkdir /mnt/boot
  61. mkdir /mnt/boot/EFI
  62. mount /dev/nvme0n1p1 /mnt/boot
  63. mkdir /mnt/home
  64. mount /dev/nvme0n1p3 /mnt/home
  65. ls /mnt
  66. ```
  67.  
  68. ### Base install
  69.  
  70. Run the following commands to install the base:
  71.  
  72. ```bash
  73. pacstrap /mnt base base-devel
  74. ```
  75.  
  76. ### Create fstab
  77.  
  78. Run the following command to generate the `fstab` file.
  79.  
  80. ```bash
  81. genfstab -U -p /mnt >> /mnt/etc/fstab
  82. cat /mnt/etc/fstab
  83. ```
  84.  
  85. Make sure your `fstab` file has all previously created partitions.
  86.  
  87. ### Go to the new system
  88.  
  89. ```bash
  90. arch-chroot /mnt
  91. ```
  92.  
  93. ### Sync time
  94.  
  95. Run the following command:
  96.  
  97. ```bash
  98. ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/timezone
  99. hwclock --systohc
  100. ```
  101.  
  102. ## Locale
  103.  
  104. Uncomment `en_US.UTF-8 UTF-8` and other needed locales in `/etc/locale.gen`, and generate them with:
  105.  
  106. ```bash
  107. locale-gen
  108. ```
  109.  
  110. ### Creating the user
  111.  
  112. Define your root user password:
  113.  
  114. ```bash
  115. passwd
  116. ```
  117.  
  118. And run the following command to create your user:
  119.  
  120. ```bash
  121. useradd -m -G wheel -s /bin/bash YOUR_USER_NAME
  122. ls /home/
  123. ```
  124.  
  125. Use the following command to set the user password if needed:
  126.  
  127. ```bash
  128. passwd YOUR_USER_NAME
  129. ```
  130.  
  131. Install some useful programs, including `sudo` and add that user to `sudoers`:
  132.  
  133. ```bash
  134. pacman -S dosfstools os-prober mtools network-manager-applet \
  135.           networkmanager wpa_supplicant wireless_tools dialog sudo
  136.  
  137. nano /etc/sudoers
  138. ```
  139.  
  140. Add `YOUR_USER_NAME ALL=(ALL) ALL` in the and of `sudoers` file.
  141.  
  142. ### Configure localhost
  143.  
  144. Run the following commands to define your hostname:
  145.  
  146. ```bash
  147. echo YOUR_USER_NAME > /etc/hostname
  148. cat /etc/hostname
  149. ```
  150.  
  151. Edit and add following to `hosts`:
  152.  
  153. ```
  154. 127.0.0.1  localhost.localdomain  localhost
  155. ::1  localhost.localdomain  localhost
  156. 127.0.1.1  YOUR_USER_NAME.localdomain  YOUR_USER_NAME
  157. ```
  158.  
  159. To:
  160.  
  161. ```bash
  162. nano /etc/hosts
  163. ```
  164.  
  165. ## Install linux-zen
  166.  
  167. Run the following commands:
  168.  
  169. ```bash
  170. pacman -S linux-zen linux-zen-headers
  171. mkinitcpio -p linux-zen
  172. uname -r
  173. ```
  174.  
  175. ### Install Grub
  176.  
  177. Run the following commands to setup Grub using UEFI:
  178.  
  179. ```bash
  180. pacman -S grub-efi-x86_64 efibootmgr os-prober
  181. os-prober
  182. grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch --recheck
  183. grub-mkconfig -o /boot/grub/grub.cfg
  184. mkdir /boot/grub/locale
  185. cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
  186. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top