I'm writing this as a set of notes for future Arch Linux installations. I decided to revisit Arch Linux after hearing that their ncurses menu-based installer was long gone and how they have started using install scripts. I came upon this while reading the systemd vs SysV initialization method debate that everyone is raging about. I haven't installed Arch in years as my current machines still happily run on the old installs which are up to date since Arch is a rolling release distribution. I figured now would be a good time to check it out (along with a growing interest in tiling window managers such as i3 or ratpoison).
Download and boot off of the LiveCD.
Make sure the internet works from the LiveCD (it should if you have DHCP and/or set VirtualBox networking to "Bridge" mode. [code]ping google.com[/code]
Let's view the partition layout and build some partition that will be the base of our system. We will be using LVM for actual system partitions. [code] fdisk -l fdisk /dev/sda [/code]
Create /dev/sda1, set type as 83 Linux boot, press "a" to set a bootable flag, create /dev/sda2, set type as 82 Linux Swap/Solaris, create /dev/sda3, set type as 8e LVM, and then write changes by pressing "w"
Create the LVM partitioning scheme by first creating the physical volume. [code] pvcreate /dev/sda3 pvdisplay [/code]
Create a virtual group of drives [code] vgcreate vg_arch_01 /dev/sda3 vdisplay [/code]
Create logical volumes [code] lvcreate -C y -L 5120 vg_arch_01 -n lv_root lvcreate -C y -L 2048 vg_arch_01 -n lv_home [/code]
- Verify everything by running vgs and lvs. They both should display the following:vgs:[code]VG #PV #LV #SN Attr VSize VFreevg_arch_01 1 2 0 wz--n- 7.40g 408.00m[/code]lvs:[code]LV VG Attr LSize Pool Origin Data% Move Log Copy% Convertlv_home vg_arch_01 -wc-ao-- 2.00glv_root vg_arch_01 -wc-ao-- 5.00g
[/code]
Let's make some filesystems on our partitions. [code] mkfs.ext2 /dev/sda1 e2label /dev/sda1 /boot mkswap /dev/sda2 && /swapon /dev/sda2 mkfs.ext4 /dev/vg_arch_01/lv_root [/code]
Let's mount our filesystems. [code] mount /dev/vg_root_01/lv_root /mnt mkdir /mnt/{boot,home} mount /dev/sda1 /mnt/boot mount /dev/vg_root_01/lv_home /mnt/home [/code]
Generate the fstab file. [code] genfstab -p /mnt >> /mnt/etc/fstab [/code]
Chroot into Arch. [code] arch-chroot /mnt [/code]
Install the packages. [code] pacstrap /mnt base base-devel [/code]
Make system changes such as networking, time zones, etc. [code] echo "hostname" >> /etc/hostname [/code] Edit /etc/hosts and append the hostname: [code] 127.0.0.1 localhost.localdomain localhost hostname [/code] Edit /etc/hosts and append "hostname" to the end of the "127.0.0.1 localhost.localdomain localhost "hostname" line. Set the timezone and the locale: [code] ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime [/code] Edit /etc/locale.gen and uncomment #en_US.UTF-8 UTF-8, then run locale-gen. Edit /etc/rc.conf, uncomment network information, set "interface" as "interface=eth0" for dhcpd
Make necessary changes to permit mounting/booting from LVM. Edit /etc/rc.conf and change # USELVM="no" to USELVM="yes" Add "lvm2" to /etc/mkinitcpio.conf HOOKS section before "filesystems" [code]HOOKS="base udev autodetect pata scsi sata lvm2 filesystems usbinput fsck"[/code] Regenerate the kernel image [code] cd /boot mkinitcpio -p linux [/code]
Install the Syslinux bootloader. [code] pacman -S syslinux [/code] Change /boot/syslinux/syslinux.cfg /dev/sda3 to /dev/mapper/vg_arch_01-lv_root [code] # (0) Arch Linux LABEL arch MENU LABEL Arch Linux LINUX ../vmlinuz-linux APPEND root=/dev/mapper/vg_arch_01-lv_root ro INITRD ../initramfs-linux.img [/code] Install the bootloader in MBR [code] syslinux-install_update -iam [/code]
Set root password. [code]passwd root [/code]
Umount the system partitions and reboot. [code] exit umount /mnt/{boot,home,} [/code]
Comments
comments powered by Disqus