Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If repairing a virtual machine:
- 0. If settings are greyed out then start virtual machine and perform [$ sudo shutdown now].
- 1. Settings > Storage:
- Controller: IDE
- Click CD icon > select archlinux iso.
- 2. Disable EFI boot: <-- The Arch ISO won't boot in UEFI mode for whatever reason. No issue on computer but this affects virtual machines i think.
- Settings > System:
- [ ] Enable EFI (special OSes only) <-- The CD won't boot with EFI enabled.
- 3. Start virtual machine.
- -----
- 0. Boot with Arch usb plugged in.
- 1. Select "Arch Linux install medium (x86_64, BIOS)
- 2. Connect to the internet from the Arch main-menu: <-- Needed if using wi-fi to get online because [$ nmtui] won't work after arch-chroot for whatever reason.
- For wireless and WWAN, make sure the card is not blocked with rfkill.
- 1. Connect to the network:
- Ethernet:
- Plug in the cable.
- --------------------------------------------------------------------------------
- Wi-Fi:
- Start the interactive prompt:
- $ iwctl <-- NOTE: Use $ exit or Ctrl + D to quit the interactive prompt.
- NOTE: You can use all commands as command line arguments without entering an interactive prompt, e.g. [$ iwctl device wlan0 show].
- NOTE: To list all available commands use [$ help].
- Connect to a network:
- 1. List all Wi-Fi devices:
- $ device list
- 2. If the device or its corresponding adapter is turned off, turn it on:
- $ device <device> set-property Powered on
- $ adapter <adapter> set-property Powered on
- 3. Scan for networks:
- $ station <device> scan
- $ station <device> get-networks
- 4. Connect to a network:
- $ station <device> connect "Case-Sensitive SSID"
- NOTE: The command line equivalent: [$ iwctl --passphrase <pw> station <device> connect SSID]
- NOTE: iwd automatically stores network passphrases in /var/lib/iwd/ and uses them to auto-connect in the future.
- iwd only supports PSK pass-phrases from 8 to 63 ASCII-encoded characters. The following error message will be given if the requirements are not met: PMK generation failed. Ensure Crypto Engine is properly configured.
- NOTE: For automatic IP and DNS configuration via DHCP, you have to manually enable the built-in DHCP client or configure a standalone DHCP client.
- NOTE: The user interface supports autocomplete. Typing station or connect and Tab Tab, the available devices or networks are displayed,
- Type the first letters of the device or network and Tab to complete.
- Connect to a network using WPS/WSC:
- If your network is configured such that you can connect to it by pressing a button:
- $ wsc list
- If your device appeared in the above list:
- $ wsc <device> push-button
- And push the button on your router. The procedure works also if the button was pushed beforehand, less than 2 minutes earlier.
- If your network requires to validate a PIN number to connect that way, check the $ help command output to see how to provide the right options to the wsc command.
- --------------------------------------------------------------------------------
- 1. Disconnect from a network:
- $ station <device> disconnect
- 2. Show device and connection information:
- $ device <device> show
- 3. Display the connection state:
- $ station <device> show
- 4. Manage known networks:
- $ known-networks list
- 5. Forget a known network:
- $ known-networks "SSID" forget
- --------------------------------------------------------------------------------
- 2. Ensure your network interface is listed and enabled:
- $ ip link
- 3. The connection may be verified with ping:
- $ ping -c 3 archlinux.org
- -----
- 1. Get drive names:
- WARNING: If you are here and did not get online first, then read from the top of this file again.
- If you arch-chroot before iwctl then you are not getting online (with wi-fi) because iwctl will not work after arch-chroot for some reason.
- $ lsblk <-- Or [$ df -Th] [$ mount] [$ fdisk -l]
- Or
- $ lsblk -o NAME,MOUNTPOINT,LABEL,FSTYPE,SIZE,UUID <-- Displays more drive info.
- 2. Mount the file systems:
- EXT4 Notes:
- Mount the root partition to "/":
- $ mount /dev/<root partition> /mnt/
- Mount the home partition to "/home":
- $ mount /dev/<home partition> /mnt/home
- Mount the EFI partition to "/efi":
- If using "/efi" location:
- $ mkdir -p /mnt/efi
- $ mount /dev/<efi partition> /mnt/efi
- Or if using "/boot/efi" location:
- $ mkdir -p /mnt/boot/efi
- $ mount /dev/<efi partition> /mnt/boot/efi
- BTRFS Notes: <-- WARNING: Untested AI generated notes.
- 1. Identify partitions:
- lsblk -f
- Example layout:
- sda1 btrfs root
- sda2 btrfs home
- sda3 vfat EFI
- 2. Create mount points:
- mkdir -p /mnt
- mkdir -p /mnt/home
- mkdir -p /mnt/efi
- 3. Check for existing subvolumes:
- btrfs subvolume list /dev/sda1
- btrfs subvolume list /dev/sda2
- 4. Mount root and home:
- NOTE: Adjust the subvolume names in the mount commands to match what [$ btrfs subvolume list] shows.
- mount -o subvol=@ /dev/sda1 /mnt # root
- mount -o subvol=@home /dev/sda2 /mnt/home # home, if separate partition with @ subvolume
- 5. Mount EFI partition:
- mount /dev/sda3 /mnt/efi
- 6. Verify mounts:
- lsblk -f
- 3. Check the file system is mounted correctly:
- $ lsblk <-- Or [$ df -Th] [$ mount] [$ fdisk -l]
- Or
- $ lsblk -o NAME,MOUNTPOINT,LABEL,FSTYPE,SIZE,UUID <-- Displays more drive info.
- NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
- sda 8:0 0 50G 0 disk
- └─sda1 8:1 0 50G 0 part /mnt
- sdb 8:16 0 8G 0 disk
- └─sdb1 8:17 0 7G 0 part /mnt/home
- └─sdb2 8:18 0 1022M 0 part /mnt/efi
- 4. Change-root into the new system:
- $ arch-chroot /mnt/
- -----
- 1. Update pacman mirrors:
- $ sudo reflector --verbose --country "United States" --protocol https --sort rate --age 6 --save /etc/pacman.d/mirrorlist
- 2. Use pacman to update or fix package issues:
- Refresh package databases and ensure keyring is up-to-date: https://www.reddit.com/r/archlinux/comments/1leg9ds/why_doesnt_pacman_just_install_archlinuxkeyring/
- $ pacman -Syy --noconfirm --needed archlinux-keyring <-- Pacman 7.1.0+ should auto-refresh keys so in theory this is unnecessary: https://www.reddit.com/r/archlinux/comments/1olm2hc/pacman710_released
- $ pacman -Syyu <-- If this gives errors then you might need to do step 3 first.
- $ pacman -S <install missing packages to fix issue>
- $ pacman -Qkk <-- Check integrity of packages.
- 3. Reinstalling kernel:
- Untested new way since udev was merged into systemd:
- 1. $ pacman -S systemd linux mkinitcpio
- 2. $ mkinitcpio -P <-- Might be able to skip if step 1 performs this via the kernel's pacman hook.
- Or old udev notes <-- Might be useful if repairing an outdated arch.
- SOURCE: https://bbs.archlinux.org/viewtopic.php?id=148037
- 1. $ pacman -S udev linux mkinitcpio
- 2. $ mkinitcpio -P <-- Might be able to skip if step 1 performs this via the kernel's pacman hook.
- 4. Reinstalling bootloader: <-- I use grub btw.
- NOTE: This might be needed to recreate the NVRAM entry for Arch so the BIOS knows what partition will boot Linux.
- 1. Installation:
- WARNING: I use the new /efi path. If using /boot/efi then use this --efi-directory=/boot/efi
- $ grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=Arch --removable
- 2. Generate the main configuration file:
- NOTE: If you're experiencing black screen nvidia driver issues then you might need to first edit GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
- $ grub-mkconfig -o /boot/grub/grub.cfg <-- Some distros have a $ update-grub script that does this.
- -----
- 1. Exiting chroot and shutting down machine:
- $ exit or Ctrl+d
- $ umount -lR /mnt/ <-- Unmount all partitions.
- $ shutdown now <-- NOTE: On a non-root account use [$ sudo shutdown now].
- Remove installation media.
- 2. If repairing a virtual machine:
- 1. Settings > Storage:
- Controller: IDE
- Eject iso if still mounted.
- 2. Enable EFI boot:
- Settings > System:
- [x] Enable EFI (special OSes only)
Advertisement
Add Comment
Please, Sign In to add comment