Saturday, January 26, 2013

How to: Install base ArchLinux, made simple

,

**I won't describe how to boot from usb/cd - just keep using another OS mate, :p

create partitions:
cfdisk /dev/sda
confirm partition:
fdisk -l /dev/sda
format partition:
mkfs.ext4 /dev/sda1 -L rootfs
mkswap /dev/sda2 -L swapfs
mount the first partition:
mount /dev/sda1 /mnt
check if you have internet connectivity using dhcp:
ip a
ip r
or else add static:
ip addr add 10.0.0.10/24 dev eth0
ip route add default via 10.0.0.200 dev eth0
confirm networking:
ip a
ip r
prepare rootfs:
mkdir -pv /mnt/var/lib/pacman
and install arch:
mkdir -pv /mnt//var/cache/pacman/pkg/
pacman -r /mnt --cachedir /mnt//var/cache/pacman/pkg/ -Sy base
sign keys:
rsync -rav /etc/pacman.d/gnupg/ /mnt/etc/pacman.d/gnupg/
bind mnt and change root:
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
chroot /mnt /bin/bash
edit fstab or use blkid:
nano /etc/fstab
/dev/sda1    /       ext4     defaults    0    1
/dev/sda2    none swap   defaults    0    1
change hostname:
echo ArchLinux > /etc/hostname
timezone and locale:
ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime
nano /etc/locale.gen and uncomment el_GR.UTF-8 etc...
locale-gen
create initramfs:
mkinitcpio -p linux
install grub:
grub-install --boot-directory=/mnt/boot /dev/sda
create grub.cfg:
grub-mkconfig -o /mnt/boot/grub/grub.cfg
add a menuentry:
nano /mnt/boot/grub/grub.cfg
eg:
menuentry "ArchLinux" {

    set root=(hd0,1)
    linux /boot/vmlinuz-linux root=/dev/sda1
    initrd /boot/initramfs-linux.img
}
reboot!
login and change root pwd:

passwd
---------
Up to here you should have a system running, if not please refer to Begginer's Guide.
---------
Some problems during installation:

  1. eth0 renames to some sort of enp2s1 or so - it's a bug (search tracker):
    You should rename enp2s1 to lan or something, how?
    nano /etc/udev/rules.d/10-network.rules
    then add:
     
    SUBSYSTEM=="net", ATTR{address}=="00:00:00:00:00:00", NAME="lan"
    then go at your network.service file to inform yor net svc to hold until it has been renamed:
    Requires=systemd-udev-settle.service
    After=systemd-udev-settle.service
    reboot - now you should see that eth0 dhpcd service failed to start:rm /etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service
    to remove eth0 svc from starting upon boot.
  2. Key signatures bypass:
    nano /etc/pacman.d/gnupg/gpg.conf
    change keyserver to:
    hkp://pgp.mit.edu:11371
    then hit this down to get keys:curl https://www.archlinux.org/{developers,trustedusers}/ |awk -F\" '(/pgp.mit.edu/) {sub(/.*search=0x/,"");print $1}' |xargs pacman-key --recv-keys
    after this:
    nano /etc/pacman.conf
    and change SigLevel to TrustAll or else untrusted source will occur.
---------
Up to here you should have a stable but somehow unsecure system running.
---------
Now install xorg:
pacman -Sy xorg
then kde:
pacman -Sy kde
reboot and start kde:
kdm

:) hf.

0 people replied to “How to: Install base ArchLinux, made simple”

Post a Comment