From 3f37034fec9bd5ab8816c8b38ae43b2158f438af Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 18 Feb 2016 08:31:57 +0100 Subject: [PATCH] Create 0_install_system.md --- 0_install_system.md | 129 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 0_install_system.md diff --git a/0_install_system.md b/0_install_system.md new file mode 100644 index 0000000..3ad9f4d --- /dev/null +++ b/0_install_system.md @@ -0,0 +1,129 @@ +My install and configuration script for Archlinux. + +Archlinux Install +================= + +Create USB +---------- +``` +dd if=*.iso of=/dev/sdb +``` + +Init +---- +``` +loadkeys fr-latin9 +wifi-menu +``` + +Prepare the storage devices +--------------------------- +``` +fdisk /dev/sda +``` +d ==> delete +p ==> print table +n ==> new (+128M to define 128 MO) +a ==> set partition bootable (for sda1) + +| Name | Boot | Size | Format | Mount | +| ---- | :---: | -----: | :--------: | ----- | +| sda1 | * | 128M | mkfs.ext2 | /boot | +| sda2 | | 8G | mkswap | | +| sda3 | | 32G | mkfs.ext4 | / | +| sda4 | | ALL | mkfs.ext4 | /home | + +mkfs all... +``` +mkfs.ext4 /dev/sda1 +mkswap /dev/sda2 +mkfs.ext4 /dev/sda3 +mkfs.ext4 /dev/sda4 + +``` + +mount all... +``` +mount /dev/sda3 /mnt +mkdir /mnt/{boot,home} +mount /dev/sda1 /mnt/boot +mount /dev/sda4 /mnt/home +swapon /dev/sda2 +``` +Install the base system +----------------------- +Replace \ by what you want... +``` +pacstrap /mnt base base-devel syslinux vim git +genfstab -L -p /mnt >> /mnt/etc/fstab +arch-chroot /mnt +echo > /etc/hostname +ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime +vim /etc/locale.gen (en_us, fr, ja & utf-8) +locale-gen +echo "LANG=\"en_US.UTF-8\"" > /etc/locale.conf +echo "KEYMAP=" > /etc/vconsole.conf + +mkinitcpio -p linux +syslinux-install_update -iam +``` +then edit /boot/syslinux/syslinux.cfg if /dev/sda3 is not correct + +Pacman... +activate Color and multilib in /etc/pacman.conf + +Wireless network configuration +------------------------------ +``` +pacman -S networkmanager +systemctl enable NetworkManager.service +``` +list network: nmcli con show +connect to network: nmcli dev wifi connect password [iface wlan1] +or use the ncurse ui tool "nmtui" + +Archlinux package config +------------------------ + +install all package you want + +User Configuration +================== + +Adding User +----------- +``` +useradd -g users -m -s /bin/bash +``` +Adding user to a group: +``` +usermod -a -G +``` + +Misc +==== + + +X Server multi-user +------------------- +Edit /etc/pam.d/su su-l and add: +``` +session optional pam_xauth.so +``` + +Printer Management +------------------ +``` +pacman -S --needed cups ghostscript hplip +systemctl enable cups +systemctl start cups +``` +Then add printer HP PhotoSmart 6520 using http://localhost:631/ discover network +note use hpcups over hpijs to get border printed + +Disable laptop lid switch handle (usefull when using external screen) +--------------------------------------------------------------------- +Edit /etc/systemd/logind.conf and enable: +``` +LidSwitchIgnoreInhibited=yes +```