Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
How to install arch linux plus most used packages
License
JosephLucas/archlinux_installation
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Download a list of ignored folders and files
wget https://raw.githubusercontent.com/JosephLucas/archlinux_installation/master/ignored_during_backup
Start with a dry run with the option —dry-run to see what rsync plans to do.
rsync --dry-run -av --delete --stats --info=progress2 --exclude="/path/to/backup/folder/*"> --exclude-from=ignored_during_backup / /path/to/backup/folder
NB: this will do backup the /boot, /etc and /home
Backup a former windows partition
Tools to list disks on the machine
lsblk lsblk -f lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL lskid
ntfsresize can resize windows partition (shrink or extend) without any previous defragmentation. ntfsclone copies ntfs partitions fast.
Get how much space is really used before resizing the partition
If exception is raised, like:
disk has been scheduled for *chkdsk*
you may need to relaunch windows. This will launch the chkdsk tool to repare some errors in the ntfs partition.
Finally, edit the ntfs partition, for instance
ntfsresize -s -o /mnt/depot_jo/Backup/windows.sepcial.img /dev/sdX ntfsresize --no-action --size 100G /dev/sdaX ntfsresize -v --size 100G /dev/sdaX
Installation of Arch Linux
The installation process is for UEFI computers, we do not cover BIOS installation process.
Many steps are relative to a ASUS Zenbook Prime UX32VD machine.
https://wiki.archlinux.org/index.php/installation_guide https://wiki.archlinux.org/index.php/General_recommendations https://wiki.archlinux.fr/installation https://wiki.archlinux.org/index.php/ASUS_Zenbook_Prime_UX31A
Download the last iso of Arch Linux
Create an Arch Linux live USB
Format your usb stick in fat32 (this will destroy your data)
mkfs.vfat -n name_for_your_pendrive> -I /dev/sdc
With sdX the USB stick device
dd bs=4M if=arch.iso of=/dev/sdX status=progress
Boot from the USB stick in EFI mod
After booting, Enter root as login.
At any time you can switch to another console by pressing Alt + a lateral arrow .
This can be useful to read a documentation while installing Arch Linux.
Read offline documentation
Set keyboard layout into french AZERTY
Verify that computer has booted in efi
(first option is usually easier).
- Plug a 4G phone with USB tethering
- exec dhcpcd to start a dhcp (Dynamic Host Configuration Protocol) client.
Using wifi-menu and netctl
Give a (name) to the config and enter a password if needed. This writes a file in /etc/netctl/ .
Using iw (if previous method is not working)
Get the name of your wireless interface
To check link status, use following command
You can get statistic information, such as the amount of tx/rx bytes, signal strength etc., with following command
iw dev interface station dump
Some cards require that the kernel interface be activated before you can use iw or wireless_tools
To see what access points are available
iw dev interface scan | less
Connect to an access point
iw dev interface connect "your_essid"
iw dev interface connect "" key 0:your_key>
Use elinks to browse the internet in CLI (Command Line Interface), for instance to read arch linux intallation guide.
elink https://github.com/JosephLucas/archlinux_installation
set timezone (it seems needed for pacman)
timedatectl set-timezone Europe/Paris
Use parted to edit partitions
(parted) rm X (parted) mkpart primary ntfs 0% 100GB (parted) mkpart primary ext4 100GB 100%
mkfs.ntfs -f /dev/sda1 -L windows fatlabel .
(By experience, I advice you to avoid LVM, you will avoid losing a lot of time for not much help. If you really want to, read following section.)
pvcreate . vgcreate . lvcreate . -L 50GB -n lv_debian lvcreate . -l 100%FREE -n lv_arch_home
Instead of /dev/sdXX , a lvm partition looks like /dev/mapper/vg_ssd-lv-root
If you plan to resize some logival volumes, do not forget to:
- shrink the file system before shrinking the logical volume
- extend the logical volume before extending the file system)
If LVM partitions are used, the ESP is mounted at /boot; contrary to the standard mountpoint of the ESP. Cause, rEFInd doesn’t seem to read LVM partitions whereas Arch installs bootloader and iniramfs into /boot with pacstrap and mkinitcpio. Another solution would be to move the images and the refind_linux.conf from /boot/ (into LVM/ext4) to /boot/efi (into the ESP) each time they are upgraded :
do not launch ! (mv) /boot/initramfs-linux.img /boot/initramfs-linux-fallback.img /boot/refind_linux.conf /boot/vmlinuz-linux /boot/refind_linux.conf /boot/efi
Just before creating an initial ramdisk environment (mkinitcpio), add ‘lvm2″ in the HOOKS of /etc/mkinitcpio.conf.
HOOKS="base udev . block lvm2 filesystems"
The order seems important.
Do not make a swap partition
Do not make a swap, use instead a swap file, it is more flexible.
mount /dev/sdXX /mnt mkdir /mnt/home mount /dev/sdYY /mnt/home
Mount the EFI System Partition (ESP)
mkdir -p /mnt/boot/efi mount /dev/sdb1 /mnt/boot/efi
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup rankmirrors -n 20 /etc/pacman.d/mirrorlist.backup > /etc/mirrolist
pacstrap /mnt base base-devel pacstrap /mnt vim
Install Wifi; wpa_supplicant is for wpa/wep support
pacstrap /mnt iw wpa_supplicant
(You could also install dialog for a wifi-menu)
Install a desktop environment
pacstrap /mnt xfce4 xfce4-goodies xorg-server
Install Firefox (and elinks, just in case you cannot start the graphic server)
pacstrap /mnt firefox elinks
Generate the table of file system and mount points
genfstab -U /mnt >> /mnt/etc/fstab
Chroot into the newly installed arch
Give a name to the machine (for instance asus_ux32vd)
echo '127.0.0.1 asus_ux32vd.localdomain asus_ux32vd' >> /etc/hosts ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
Then uncomment the line en_US-UTF-8 UTF-8
locale-gen echo LANG="en_US.UTF-8" > /etc/locale.conf export LANG=en_US.UTF-8 echo KEYMAP=fr-latin1 > /etc/vconsole.conf
- uncomment Color
- add line ILoveCandy for a funny animation when installing packages with pacman
- uncomment multilib repo if you want to enable running and building 32-bit applications on 64-bit installations of Arch Linux.
Create an initial ramdisk environment
Install the boot loader rEFInd
By default, rEFInd scans all disks and locates all EFI bootloaders that can be launched with the UEFI. An easy way to configure a linux bootloader is to add a refind_linux.conf next to it, e.g. A more exhaustive configuration can be made through a manual «stanza» in /boot/efi/EFI/refind/refind.conf
pacman -S refind-efi refind-install
refind-install automatically generates the refind_linux.conf next to the linux image. It can be edited with
You might need to remove the 2 first lines that may correspond to the Arch Linux Live USB.
Otherwise, edit the arch linux stanza in /boot/efi/EFI/refind/refind.conf to get
- «EFI/refind/icons/os_arch.png» is the path from the root of the ESP disk to the icon file
- «arch_root» is the disk label. (this line corresponds to change the working directory)
- «/boot/vmlinuz-linux» is the path to the linux kernel (on the «arch_root» volume)
- «/boot/initramfs-linux.img» is the path to the linux initialisation RAM file system image The UUID of the linux OS disk (UUID=57203de9-12fc-419c-a358-7b880da80e38) can be found with lsblk -f .
NB: The «fallback» image utilizes the same configuration file as the default image, except the autodetect hook is skipped during creation, thus including a full range of modules. The autodetect hook detects required modules and tailors the image for specific hardware, shrinking the initramfs.
On the rEFInd boot screen:
- press F10 to make screenshots. Images are saved at the main dir of refind «ESP/refind/».
- on a bootloader entrypoint press DEL to hide an entry. You cann restore it with the «configuration of hidden tags» icon afterwards.
Set a password for the root