Difference between revisions of "Installation guide"

From ArchWiki
Jump to: navigation, search
(Mount the partitions)
m (Mount the partitions)
Line 44: Line 44:
  
 
== Mount the partitions ==
 
== Mount the partitions ==
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ..) if you want them to be detected by {{ic|genfstab}}.
+
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) if you want them to be detected by {{ic|genfstab}}.
  
 
== Connect to the internet ==
 
== Connect to the internet ==

Revision as of 20:28, 23 July 2012

The Arch Install Scripts are a set of Bash scripts that simplify Arch installation. This article summarizes a basic install process using these scripts.

Minimal knowledge requirements for a new user

To install Arch Linux on your system requires knowledge and application of a few skills on Linux. The list itself is not comprehensive but it gives an idea.

1. Working knowledge of shell, e.g. bash

2. Configuring network in shell.

3. Working knowledge on utilities like fdisk, mkfs, nano/vi/vim, chroot, locale-gen, passwd, etc.

4. Pacman mirrorlist.

5. Basic knowledge about /etc/fstab.

6. The purpose of running mkinitcpio.

7. Configuring GRUB/Syslinux.

In addition, it's a good idea to read the wiki articles on these subjects.

Keyboard layout

For many countries and keyboard types appropriate keymaps are available already, and a command like loadkeys uk might do what you want. More available keymap files can be found in /usr/share/kbd/keymaps/ (you can omit the keymap path and file extension when using loadkeys).

To make these changes permanent, edit /etc/vconsole.conf.

Partition disks

See partitioning for details.

Remember to create any stacked block devices like LVM, LUKS, or RAID.

Format partitions

See here for details.

If you are using (U)EFI you will most probably need another partition to host the UEFI System partition. Read this article.

Mount the partitions

We now must mount the root partition on /mnt. You should also create directories for and mount any other partitions (/mnt/boot, /mnt/home, ...) if you want them to be detected by genfstab.

Connect to the internet

Assuming a wired connection, running dhclient is sufficient to get a lease. For more info visit configuring network. For Eg. you can try ip link set eth0 up and dhclient eth0.

Wireless

If on a wireless connection, see Wireless Setup to determine if you need to load extra firmware for your device. Assuming your device is correctly loaded and working, you will need to establish a connection to your router. This can be done using wifi-menu or manually as outlined below.

If you have a WPA protected router, run wpa_passphrase "Your Router SSID" "Your WPA Key" > /etc/wpa_supplicant.conf followed by wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf. Either run this command with & >/dev/null, switch to another tty and run dhcpcd wlan0, or simply use the -B switch to daemonize wpa-supplicant.

Install the base system

Before installing, you may want to edit /etc/pacman.d/mirrorlist such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by pacstrap as well, so it's worth getting it right.

Using the pacstrap script we install the base system. The base-devel package group should also be installed if you plan on compiling software from the AUR or using ABS.

# pacstrap /mnt base base-devel

Other packages can be installed by appending their names to the above command (space seperated), including the bootloader if you want.

Install a bootloader

GRUB

  • For BIOS:
# pacstrap /mnt grub-bios
  • For EFI (in rare cases you will need grub-efi-i386 instead):
# pacstrap /mnt grub-efi-x86_64

Syslinux

# pacstrap /mnt syslinux

Configure system

Generate an fstab with the following command (if you prefer to use UUIDs or labels, add the -U or -L option, respectively):

# genfstab -p /mnt >> /mnt/etc/fstab

Next we chroot into our newly installed system:

# arch-chroot /mnt
  • Write your hostname to /etc/hostname.
  • Symlink /etc/localtime to /usr/share/zoneinfo/Zone/SubZone. Replace Zone and Subzone to your liking. For example:
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime
  • Set locale preferences in /etc/locale.conf.
  • Uncomment the selected locale in /etc/locale.gen and generate it with locale-gen.
  • Configure /etc/mkinitcpio.conf as needed (see mkinitcpio) and create an initial RAM disk with:
# mkinitcpio -p linux
  • Configure the bootloader.
  • For syslinux, edit the /boot/syslinux/syslinux.cfg to point to the right / (root) partition. Then type the following command to install (-i), set boot flag (-a) and install the MBR (-m):
# syslinux-install_update -iam
  • For GRUB, refer to the GRUB article.
  • Install GRUB to the hard drive containing your boot partition:
# grub-install /dev/sda
  • Create the grub.cfg:
 # grub-mkconfig -o /boot/grub/grub.cfg
  • Set a root password with passwd.

Unmount leftovers

If you are still in the chroot environment type exit or press Template:Keypress in order to exit. Earlier we mounted the partitions under /mnt. In this step we will unmount them:

# umount /mnt/{boot,home,}

Finally reboot and configure your system as explained in Beginners' Guide/Post-Installation.