2018-02-12

Slackware

Slackware is the most UNIX-like of Linux distributions. Alpine is also a good option. Here is how the basics are installed without X for simultaneous booting with both BIOS and UEFI.

Boot the installer from
http://www.slackware.com/~alien/slackboot/mini/
or
ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/usb-and-pxe-installers/usbboot.img

Partitioning (these sector sizes are for a 20 GiB virtual disk)
# parted
unit s
mklabel msdos
mkpart primary fat32 2048s 204799s
mkpart primary linux-swap 204800s 2097151s
mkpart primary ext2 2097152s 41943039s
toggle 1 boot
toggle 1 esp
quit
# setup
Install from FTP
ftp://ftp.slackware.com/pub/slackware/slackware64-14.2/

Select following package series:
A - Base system
AP - Additional utilities
D - Compilers
L - Libraries
N - Networking utilities

Install LILO to MBR

Uncomment a mirror from /etc/slackpkg/mirrors
# slackpkg update
# slackpkg upgrade-all


Fetch the Latest Stable Kernel from https://www.kernel.org/
Make use of ccache
ccache-swig -M 5G
ln -s /usr/bin/ccache-swig /usr/local/bin/cc
ln -s /usr/bin/ccache-swig /usr/local/bin/c++
ln -s /usr/bin/ccache-swig /usr/local/bin/c89
ln -s /usr/bin/ccache-swig /usr/local/bin/c99
ln -s /usr/bin/ccache-swig /usr/local/bin/gcc
ln -s /usr/bin/ccache-swig /usr/local/bin/g++
ln -s /usr/bin/ccache-swig /usr/local/bin/clang
ln -s /usr/bin/ccache-swig /usr/local/bin/clang++
ln -s /usr/bin/ccache-swig /usr/local/bin/swig
watch -d ccache-swig -s
Build the new kernel with
make defconfig
make menuconfig
#CONFIG_HAVE_KERNEL_XZ=y
#CONFIG_KERNEL_XZ=y
#CONFIG_MODULE_COMPRESS=y
#CONFIG_MODULE_COMPRESS_XZ=y
#CONFIG_EFI_STUB=y
#CONFIG_EFI_STUB_MIXED=y
#CONFIG_CMDLINE_BOOL=y
#CONFIG_CMDLINE="root=/dev/sda3"
#CONFIG_LOGO=n # not set
time make bzImage
Build kernel modules when neccessary

Install the new kernel allowing both UEFI or BIOS booting on same system

mkfs.fat -F32 /dev/sda1 # ESP
mount /dev/sda1 /boot
echo "/dev/sda1 /boot fat defaults 0 2" >> /etc/fstab
cp arch/x86/boot/bzImage /boot/vmlinuz
mkdir -p /boot/efi/boot
cp /boot/vmlinuz /boot/efi/boot/bootx64.efi
lilo -v # update lilo from /etc/lilo.conf to boot the new kernel


Virtual console autologin /etc/inittab

c1:12345:respawn:/sbin/agetty --noclear 38400 -a root tty1 linux
Disable screen blanking with /etc/rc.d/rc.local
# Disable screen blanking
/bin/setterm -blank 0 -powersave off -powerdown 0

Faster reboot / shutdown procedure /etc/rc.d/rc.6
Search for sleep and adjust to a smaller value where necessary.

No comments:

Post a Comment