os:archlinux:30l3-nosystemd
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| os:archlinux:30l3-nosystemd [2021/12/29 20:01] – ↷ Page moved from archlinux:30l3-nosystemd to os:archlinux:30l3-nosystemd warnaud | os:archlinux:30l3-nosystemd [2021/12/29 20:01] (current) – ↷ Links adapted because of a move operation warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== INTRODUCTION ====== | ||
| + | After some tests on opnBSD/ | ||
| + | I will use archlinux-2016.12.01-dual.iso, | ||
| + | Process is painful... an easier way would be to use archbang Linux... | ||
| + | |||
| + | ====== Hardware ====== | ||
| + | I enhanced the almighty Thinkpad with a Crucial M4 mSATA Drive of 256GB | ||
| + | I intend to put the system on this SSD and home, swap and /var on the spinning 500GB disk :) like so: | ||
| + | ====== Partition table ====== | ||
| + | ^Disk^Partition^Name^Label^Size^Format^Comment^ | ||
| + | |SSD|1|sdb1|ARCHROOT|256+GB|BTRF| / for Archlinux | | ||
| + | |HD|1|sda1|SWAP|32GB|Linux Swap|swap for Linux| | ||
| + | |HD|2|sda2|VAR|50GB|BTRFS|/ | ||
| + | |HD|3|sda3|HOME|389GB|NTRFS|/ | ||
| + | |||
| + | Simple :-) | ||
| + | ====== Base install ====== | ||
| + | ===== References ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== ssh root login ===== | ||
| + | ssh root login is already allowed | ||
| + | grab the ip | ||
| + | <code bash> | ||
| + | ip addr show | ||
| + | </ | ||
| + | Start sshd | ||
| + | <code bash> | ||
| + | systemctl start sshd | ||
| + | </ | ||
| + | change root passwd | ||
| + | <code bash> | ||
| + | passwd | ||
| + | </ | ||
| + | Now you can connect remotely from another host | ||
| + | set the partition using cfdisk like displayed in the table above | ||
| + | ==== Formatting ==== | ||
| + | Let's format all these partitions in btrfs/swap format with LABELS!!. | ||
| + | <code bash> | ||
| + | mkfs.btrfs -L ARCHROOT /dev/sdb1 | ||
| + | mkfs.btrfs -L ARCHVAR /dev/sda2 | ||
| + | mkfs.btrfs -L ARCHHOME /dev/sda3 | ||
| + | mkswap -L SWAP /dev/sda1 | ||
| + | </ | ||
| + | ===== Mount partitions===== | ||
| + | <code bash> | ||
| + | mkdir / | ||
| + | mount /dev/sdb1 /mnt | ||
| + | mount /dev/sda2 /mnt/var | ||
| + | mount /dev/sda3 /mnt/home | ||
| + | swapon /dev/sda1 | ||
| + | </ | ||
| + | |||
| + | Check all is fine: | ||
| + | <code bash> | ||
| + | mount | ||
| + | </ | ||
| + | Thank you systemd for this horrible output.... | ||
| + | ===== Base system ===== | ||
| + | Then install base packages plus base-devel packages | ||
| + | <code bash> | ||
| + | pacstrap /mnt base base-devel | ||
| + | </ | ||
| + | ===== Fstab ===== | ||
| + | For SSD tweaks and to make it shine: [[https:// | ||
| + | * generate fstab | ||
| + | <code bash> | ||
| + | </ | ||
| + | Yes I use Labels, UUID sucks | ||
| + | * check fstab for options and label in place (for me it did a good job) | ||
| + | |||
| + | ===== Bootloader ===== | ||
| + | I use Syslinux since it does its job well and didn't fall into useless overkill configuration files and tools! [[https:// | ||
| + | <code bash> | ||
| + | pacstrap /mnt syslinux | ||
| + | </ | ||
| + | ====== Configuration ====== | ||
| + | ===== Environment ===== | ||
| + | Let's go to our new system! | ||
| + | <code bash> | ||
| + | * / | ||
| + | <code bash> echo 30L3 > / | ||
| + | * / | ||
| + | I'll use en_US.utf-8/ | ||
| + | < | ||
| + | en_US.UTF-8 UTF-8 | ||
| + | en_US ISO-8859-1 | ||
| + | </ | ||
| + | The generate locales | ||
| + | <code bash> locale-gen </ | ||
| + | * / | ||
| + | <code bash> | ||
| + | LANG=" | ||
| + | |||
| + | # Keep the default sort order (e.g. files starting with a ' | ||
| + | # should appear at the start of a directory listing.) | ||
| + | LC_COLLATE=" | ||
| + | </ | ||
| + | * / | ||
| + | Default keyboard in console (US variant international ... with a different mapping than on X11! Well done) | ||
| + | <code bash> | ||
| + | * / | ||
| + | <code bash>ln -s / | ||
| + | * / | ||
| + | Double check the content, | ||
| + | then just regenerate it in case ... | ||
| + | <code bash> | ||
| + | got scary: | ||
| + | <code bash> | ||
| + | ==> ERROR: file not found: `fsck.btrfs' | ||
| + | ==> WARNING: No fsck helpers found. fsck will not be run on boot. | ||
| + | </ | ||
| + | * / | ||
| + | I left it by default (for now ;-) ) WARNING: No fsck helpers found. fsck will not be run on boot.\\ | ||
| + | :!: Check that Linux start from /dev/sdb1 not sdaX ... | ||
| + | Then the magic: | ||
| + | <code bash> / | ||
| + | output: | ||
| + | <code bash> | ||
| + | Syslinux BIOS install successful | ||
| + | Attribute Legacy Bios Bootable Set - /dev/sdb1 | ||
| + | Installed MBR (/ | ||
| + | </ | ||
| + | if errors, install gptfdisk package or what's required :) | ||
| + | * root password | ||
| + | <code bash> | ||
| + | ===== Reboot===== | ||
| + | ==== Umount stuff cleanly ==== | ||
| + | First use Ctrl+D to escape from the chroot\\ | ||
| + | then: | ||
| + | <code bash> | ||
| + | Now is the time to light a candle and type | ||
| + | <code bash> | ||
| + | |||
| + | ===== SSHd ===== | ||
| + | Access remotely: | ||
| + | <code bash> pacman -Sy openssh </ | ||
| + | Enable it at boot | ||
| + | ===== User ===== | ||
| + | <code bash> | ||
| + | useradd -g users -m -s /bin/bash warnaud | ||
| + | passwd warnaud | ||
| + | </ | ||
| + | use **visudo** to set appropriate rights for the user | ||
| + | ===== Install some X===== | ||
| + | | ||
| + | We have intel video card so we need to add some modules at boot for KMS | ||
| + | <code bash> | ||
| + | vi / | ||
| + | </ | ||
| + | < | ||
| + | ... | ||
| + | MODULES=" | ||
| + | ... | ||
| + | </ | ||
| + | Acceleration method | ||
| + | < | ||
| + | < | ||
| + | Section " | ||
| + | | ||
| + | | ||
| + | | ||
| + | EndSection | ||
| + | </ | ||
| + | < | ||
| + | <code bash> | ||
| + | Section " | ||
| + | Identifier "evdev keyboard catchall" | ||
| + | MatchIsKeyboard " | ||
| + | MatchDevicePath "/ | ||
| + | Driver " | ||
| + | Option " | ||
| + | Option " | ||
| + | EndSection | ||
| + | </ | ||
| + | ==== XDM ==== | ||
| + | Reference: [[https:// | ||
| + | <code bash> | ||
| + | Enable systemd service | ||
| + | <code bash> | ||
| + | |||
| + | |||
| + | ==== i915 ==== | ||
| + | Power consumption for Intel Graphics: | ||
| + | <code bash>vi / | ||
| + | <code bash> | ||
| + | Rebuild the kernel: | ||
| + | <code bash> | ||
| + | |||
| + | ===== Thinkpad ===== | ||
| + | ==== Wacom ==== | ||
| + | Reference: [[https:// | ||
| + | Install the driver: | ||
| + | <code bash> | ||
| + | FIXME la suite ... | ||
| + | ==== Disable Touchpad ==== | ||
| + | Deactivate the useless touchpad: | ||
| + | < | ||
| + | <code bash> | ||
| + | Section " | ||
| + | Identifier "evdev touchpad catchall" | ||
| + | MatchIsTouchpad " | ||
| + | MatchDevicePath "/ | ||
| + | Driver " | ||
| + | EndSection | ||
| + | </ | ||
| + | |||
| + | FIXME Check alternate solution: | ||
| + | ==== TrackNav enhancement ==== | ||
| + | This hack will enable scrolling using the middle button + the TrackPoint™®© | ||
| + | <code bash>vi / | ||
| + | <code bash> | ||
| + | Section " | ||
| + | Identifier " | ||
| + | MatchProduct | ||
| + | MatchDevicePath | ||
| + | Option | ||
| + | Option | ||
| + | Option | ||
| + | Option | ||
| + | Option | ||
| + | EndSection | ||
| + | </ | ||
| + | ===== Other software ===== | ||
| + | ==== Archlinuxfr repository ==== | ||
| + | We need yaourt to install a bunch of aur packages for openrc | ||
| + | <code bash>vi / | ||
| + | <code bash> | ||
| + | ... | ||
| + | [archlinuxfr] | ||
| + | SigLevel = Never | ||
| + | Server = http:// | ||
| + | </ | ||
| + | \o/ No signature | ||
| + | ==== Sudo ==== | ||
| + | <code bash> | ||
| + | <code bash> | ||
| + | <code bash> | ||
| + | ... | ||
| + | root ALL=(ALL) ALL | ||
| + | someuser ALL=(ALL) ALL</ | ||
| + | Just add the ' | ||
| + | |||
| + | ==== Compilation options ===== | ||
| + | :!: just for fun not really mandatory | ||
| + | Reference: [[https:// | ||
| + | <code bash>vi / | ||
| + | Modify CFLAGS/ | ||
| + | <code bash> | ||
| + | # -march=native also sets the correct -mtune= | ||
| + | CFLAGS=" | ||
| + | CXXFLAGS=" | ||
| + | </ | ||
| + | Modify MAKEFLAGS (4 = output of nproc) | ||
| + | <code bash> | ||
| + | : | ||
| + | ==== Switch to openrc ===== | ||
| + | bye bye systemd! | ||
| + | <code bash> | ||
| + | yaourt -S openrc-sysvinit | ||
| + | </ | ||
| + | This will install sysvinit also. | ||
| + | This will conflict with systemd crap, remove it: | ||
| + | <code bash> | ||
| + | Remove systemd-sysvcompat? | ||
| + | |||
| + | | ||
| + | </ | ||
| + | use openrc-git to be super bleeding edge :) | ||
| + | </ | ||
| + | Next, install some arch services + network service tools | ||
| + | <code bash> | ||
| + | | ||
| + | |||
| + | </ | ||
| + | ===== openrc & bootloader ===== | ||
| + | I use syslinux, the trick is to add init=/ | ||
| + | for me on **/ | ||
| + | < | ||
| + | LABEL arch-ck | ||
| + | MENU LABEL Arch Linux CK | ||
| + | LINUX ../ | ||
| + | APPEND root=/ | ||
| + | INITRD ../ | ||
| + | |||
| + | </ | ||
| + | After a reboot, systemd is gone LOL | ||
| + | |||
| + | ===== recommended services ===== | ||
| + | <code bash> | ||
| + | rc-update add udev sysinit | ||
| + | rc-update add dcron default | ||
| + | rc-update add dbus default | ||
| + | rc-update add alsa default | ||
| + | rc-update add syslog-ng default | ||
| + | </ | ||
| + | Then it is safe to reboot ;) | ||
| + | |||
| + | Nightmare after reboot, first xdm do not work/ | ||
| + | |||
| + | ====== References ====== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * [[os: | ||
| + | # rc-update add dcron default | ||
