Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Arch Linux recipe
- ### Keyboard
- If the keyboard is not American layout, load the target keyboard layout by
- running the following command:
- ```bash
- loadkeys br-abnt2
- ```
- ### Internet
- Make sure you are connected to internet and your PC has a configured IP.
- ```bash
- ip addr show
- # or
- wifi-menu
- ping google.com
- ```
- ### Partitioning
- Check the available storage units and do the partitioning.
- ```bash
- fdisk -l
- cfdisk /dev/nvme0n1
- ```
- Create the following partitions:
- | Partition | Location | Size | Type |
- | --------- | -------------- | ---- | ---------------- |
- | Boot | /dev/nvme0n1p1 | 512M | BIOS Boot |
- | / | /dev/nvme0n1p2 | 25G | Linux Filesystem |
- | /home | /dev/nvme0n1p3 | \* | Linux Filesystem |
- Check if the partitions were created:
- ```bash
- fdisk -l /dev/nvme0n1
- ```
- ### Formatting and making the filesystems
- Run the following commands to format the partitions:
- ```bash
- mkfs.vfat -F32 -n EFI /dev/nvme0n1p1
- mkfs.ext4 /dev/nvme0n1p2
- mkfs.ext4 /dev/nvme0n1p3
- ```
- And then mount them:
- ```bash
- mount /dev/nvme0n1p2 /mnt
- mkdir /mnt/boot
- mkdir /mnt/boot/EFI
- mount /dev/nvme0n1p1 /mnt/boot
- mkdir /mnt/home
- mount /dev/nvme0n1p3 /mnt/home
- ls /mnt
- ```
- ### Base install
- Run the following commands to install the base:
- ```bash
- pacstrap /mnt base base-devel
- ```
- ### Create fstab
- Run the following command to generate the `fstab` file.
- ```bash
- genfstab -U -p /mnt >> /mnt/etc/fstab
- cat /mnt/etc/fstab
- ```
- Make sure your `fstab` file has all previously created partitions.
- ### Go to the new system
- ```bash
- arch-chroot /mnt
- ```
- ### Sync time
- Run the following command:
- ```bash
- ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/timezone
- hwclock --systohc
- ```
- ## Locale
- Uncomment `en_US.UTF-8 UTF-8` and other needed locales in `/etc/locale.gen`, and generate them with:
- ```bash
- locale-gen
- ```
- ### Creating the user
- Define your root user password:
- ```bash
- passwd
- ```
- And run the following command to create your user:
- ```bash
- useradd -m -G wheel -s /bin/bash YOUR_USER_NAME
- ls /home/
- ```
- Use the following command to set the user password if needed:
- ```bash
- passwd YOUR_USER_NAME
- ```
- Install some useful programs, including `sudo` and add that user to `sudoers`:
- ```bash
- pacman -S dosfstools os-prober mtools network-manager-applet \
- networkmanager wpa_supplicant wireless_tools dialog sudo
- nano /etc/sudoers
- ```
- Add `YOUR_USER_NAME ALL=(ALL) ALL` in the and of `sudoers` file.
- ### Configure localhost
- Run the following commands to define your hostname:
- ```bash
- echo YOUR_USER_NAME > /etc/hostname
- cat /etc/hostname
- ```
- Edit and add following to `hosts`:
- ```
- 127.0.0.1 localhost.localdomain localhost
- ::1 localhost.localdomain localhost
- 127.0.1.1 YOUR_USER_NAME.localdomain YOUR_USER_NAME
- ```
- To:
- ```bash
- nano /etc/hosts
- ```
- ## Install linux-zen
- Run the following commands:
- ```bash
- pacman -S linux-zen linux-zen-headers
- mkinitcpio -p linux-zen
- uname -r
- ```
- ### Install Grub
- Run the following commands to setup Grub using UEFI:
- ```bash
- pacman -S grub-efi-x86_64 efibootmgr os-prober
- os-prober
- grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch --recheck
- grub-mkconfig -o /boot/grub/grub.cfg
- mkdir /boot/grub/locale
- cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement