My personal operating system, based on Archlinux. Maybe it suits your needs
Expressions between <> should contain your settings! |
# means: execute as root, $ means: execute as <user> |
Step 1: Download Archlinux latest
Download Archlinux latest torrent from https://www.archlinux.org/
Step 2: Copy disk image to sd card or cd/dvd
Copy the image to your sd card or USB key. Or burn on cd/dvd
Step 3: Insert media into target device
Insert media into device you want Archlinux to be installed
Step 4: BIOS set boot from USB/CD or SD
Configure device to boot from media (BIOS setup or Boot menu)
Step 5: Root prompt
Archlinux will start with root prompt
Step 6: Check internetconnection
Ping to check internet connection
# ping -c 3 google.com &
Step 7: Check partitions on target device
Check disks, decide where you want to install Arch
# lsblk
Step 8: Create partitions
Open cgdisk
or cfdisk
to create partitions
All data on /dev/<sdX> will be lost after write command!
|
# cgdisk /dev/<sdX>
or # cfdisk /dev/<sdX>
Step 9: Create mountpoints
Create root (/), a home (/home) and swap mountpoints. Create filesystem on partitions, repeat for every partition, except swap
# mkfs.ext4 /dev/<sdX(n)>
Step 10: Swap
Enable and activate swap
# mkswap /dev/<sdX(n)>
# swapon /dev/<sdX(n)>
Step 11: Filesystem check
Check filesystems
# lsblk /dev/<sdX>
Step 12: Install base system and mount established partitions
Install base system and respect sequence in mounting. First mount root then boot and then other mountpoints
Root partition:
# mount /dev/<sdX(n)> /mnt
Boot partition:
# mkdir -p /mnt/boot && mount /dev/<sdX(n)> /mnt/boot
Home partition:
# mkdir -p /mnt/home && mount /dev/<sdX(n)> /mnt/home
Step 13: Choose Archlinux mirror
Choose mirror. Place nearest location at top of mirrorlist
# nano /etc/pacman.d/mirrorlist
Step 14: Install base packages
Install base packages
# pacstrap -i /mnt base base-devel
Step 15: Fstab
Configure fstab
# genfstab -U -p /mnt >> /mnt/etc/fstab
Step 16: Become Chroot
Become chroot
# arch-chroot /mnt
Step 17: Language and location settings
# nano /etc/locale.gen
Step 18: Uncomment en_US.UTF8
Step 19: Parse locale list
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8
Step 20: Create symlink to localtime
# ln -s /usr/share/zoneinfo/Europe/Amsterdam > /etc/localtime
Step 21: Configure clock (Use UTC instead of localtime)
# hwclock --systohc --utc
Step 22: Set Hostname
# echo <myhostname> > /etc/hostname
Step 23: Configure repositories
# nano /etc/pacman.conf
Uncomment `[multilib]`in pacman.conf if your system is 64 bit, and it likely will be these days..
Step 24: Update repo’s
# pacman -Sy
Step 25: First set root password
# passwd
Step 26: Configure /etc/mkinitcpio.conf if additional features are needed. Creat a new initial RAM disk with:
# mkinitcpio -p linux
Step 27: Auto complete bash commands
# pacman -S bash-completion
Step 28: Install boot loader
# pacman -S grub
# grub-install --target=i386-pc --recheck /dev/<sdX>
Step 29: Add other OS’s to grub bootloader
# grub-mkconfig -o /boot/grub/grub.cfg
Step 30: Probe already installed OS’s on your system (Optional. When installing as dualboot for instance)
# pacman -S os-prober
Step 31: Exit chroot
# exit
Step 32: Unmount sdx volume
# umount -R /mnt
Step 33: Reboot
# reboot
Step 34: Test if link is up after reboot
# ip a
Step 35: Enable/start network
*Find card identifier (= <aliasnetwork>) with ip link
*
Enable network on boot
# systemctl enable dhcpcd@<aliasnetwork>.service
Enable network from now
# systemctl start dhcpcd@<aliasnetwork>.service
Step 36: Create new users
Repeat the command as often as users you want to create.
# useradd -m -g users -G wheel,storage,power -s /bin/bash <username>
Step 37: Install ssh server
pacman -S openssh
Step 38: Allow users to access administrative tasks with sudo
# pacman -S sudo
# EDITOR=nano visudo
-Uncomment %wheel ALL=(ALL) ALL
Step 39: Desktop and window manager (optional)
Proceed to next steps if you need or want a desktop or window manager. If not, go ahead, you can deploy this setup sofar as server already! |
Step 40: Install X after reboot
# pacman -S xorg-server xorg-server-utils xorg-xinit
Step 41: Install X common video drivers
# pacman -S xf86-video-fbdev xf86-video-vesa
Step 42: Install mesa for 3D support
# pacman -S mesa
Step 43: Install Nvidia (Suppose you have nvidia hardware. Use lspci -vnn to find out or lshw -nmeric -C display
# pacman -S nvidia lib32-nvidia-utils
Step 44: Install SiS (Suppose you have sis hardware. Use lspci -vnn to find out or lshw -nmeric -C display
# pacman -S xf86-video-sis (AUR) xf86-video-sisimedia (AUR) xf86-video-sisusb sisctrl (GUI tool setting video modes)
Step 45: Touch-pad
If laptop install touch-pad drivers
# pacman -S xf86-input-synaptics
Step 46: Openbox, Firefox, Terminator and Conky
Install openbox environment, before installing wm
# pacman -S openbox conky firefox terminator
Step 47: Openbox config
Copy openbox config dir to .config directory
$ mkdir /home/<user>/.config
# cp -av /etc/X11/xdg/openbox /home/<user>/.config/
Step 48: Test X
$ startx
Step 49: Audio support
Install audio support (optional if you need audio)
# pacman -S alsa-utils pulseaudio pavucontrol
Step 50: .xinitrc
Copy system xinitrc to user home dir and edit:
# cp -av /etc/X11/xinit/xinitrc /home/<user>/.xinitrc
Step 51: Openbox-session
Now uncomment xterm lines and add exec openbox-session at the end
# echo "exec openbox-session" >> ~/.xinitrc
Step 52: Auto user login on boot
# mkdir -p /etc/systemd/system/[email protected]
# nano /etc/systemd/system/[email protected]/override.conf
Step 53: Auto login config
Add the lines
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin <username> --noclear %I 38400 linux
Step 54: Auto start xorg after boot
$ nano ~/.bash_profile
Step 55: Add line
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Useful commands:
-
Update repo’s:
# pacman -Sy
-
Update system:
# pacman -Syu
-
Remove packages:
# pacman -R
-
Update AUR packages:
# yaourt -Syu