Installation, booting and kernel upgrades: let's share scripts and plans with friends
Posted: 6. May 2019, 20:29
Hello,
I want to share some scripts and plans for Slint with friend distributions, namely Salix and Slackel. Maybe some Slackware users could be interested too.
The scripts are here. They are shipped either in the installer's initrd or in packages available in http://slackware.uk/slint/x86_64/slint-testing/ that you can add to your slapt-getrc to try them.
I won't mention here the changes specifically intended to make the installer accessible to blind users, but am ready to answer questions about them.
At the beginning of installation, the script auto is optionally used before running setup. It looks for not mounted devices with a size > 30G, and writes a GPT on the one chosen by the user, including a Bios Boot partition (4M, for GRUB in Legacy mode), an ESP (100M) and a Linux partition (30G). The user can tune this partition table before running setup. This could help users not acquainted with manual partitioning.
The DOS partitions detection is based on their file system type (i.e., vfat but the ESP, msdos or ntfs), instead of the partition type. Rationale: only populate /etc/fstab with partitions of which mount can handle the file system.
In /etc/fstab, the lines for Linux, DOS, swap and EFI partitions are labeled by UUID instead of name, to allow finding them even if the device is renamed.
GRUB is used as boot loader and manager for both Legacy and UEFI booting. This is done running the grubconfig script just installed, shipped in grub-extra, modified from Salix/Slackel to install GRUB in both Legacy and EFI modes if possible, and to make writing a boot entry in the EFI firmware optional.
A portable installation mode is provided using the script install-portable shipped in slint-misc.
As it is not yet shipped in the ISO for Slint64-14.2.1.2, there is a specific procedure to use it. The idea is to allow installing Slint in a removable device in such a way that it can boot on many if not any machines, using a generic kernel and an initrd with modules able to handle various hardware and writing a custom grub.conf. This script is also needed to install on an USB attached drive even if used on only one machine. Limitation: the f2fs file system is not yet supported, which practically precludes installing on a flash drive.
Also in the slint-misc package the script update-portable allows to redo an initrd and rewrite grub.conf after a change in the generic kernel(s) installed. This script also allows to bring portability to a Slint that was not portable initially. This can be reverted just running update-grub.
The script upgrade-kernel, also in slint-misc, automatizes the installation of upgraded kernels provided by Slint: it downloads the new kernels, remove the old ones and install the new ones, then rebuild an initrd supporting all installed generic kernels, and update grub. A portable system will stay so.
To make the initrd we use the scripts shipped in the mkinitrd package for Slackware-current, with a modification of the script setup.01.mkinitrd to ship in the initrd modules for all installed generic kernels, including custom ones.
Enhancements planned, or at least considered
Make the script 'auto' more versatile: Instead of providing just one layout for a dedicated device, allow various layouts depending on the answers to questions asked to the user, in a similar fashion as what does the Debian text installer, as suggested by several users, cf. this thread. Also, if the installation occurs in Legacy mode, prefer to set up a DOS partition table as some machines are unhappy with a GPT one if booted in Legacy mode, or ask the user which one to set up.
Allow to choose between a fixed or portable system during installation
Allow to install a f2fs file system, to benefit flash drives. This will wait until grub 2.04 be released or close, as it supports this file system and brings other enhancements.
Provide only generic kernels, but keep the previous one in case of upgrade, as do other distributions. Then, dedicate an initrd to each one instead of an unique initrd "catch all".
Include in the boot menus a boot entry allowing to boot almost any installed system. Also linked to the release of grub 2.04, as will use scripts shipped in SuperGrub2 from Adrián Gibanel Lopez (currently version 2.04rc1s1-beta4).
Include an i386EFI image in the ESP, that could help users using some machines that have an x86_64 architecture but a 32-bit only EFI firmware
So, what?
Comments, questions, suggestions are welcome.
I am willing to help adapt these tools to friend distributions.
Best regards,
Didier
I want to share some scripts and plans for Slint with friend distributions, namely Salix and Slackel. Maybe some Slackware users could be interested too.
The scripts are here. They are shipped either in the installer's initrd or in packages available in http://slackware.uk/slint/x86_64/slint-testing/ that you can add to your slapt-getrc to try them.
I won't mention here the changes specifically intended to make the installer accessible to blind users, but am ready to answer questions about them.
At the beginning of installation, the script auto is optionally used before running setup. It looks for not mounted devices with a size > 30G, and writes a GPT on the one chosen by the user, including a Bios Boot partition (4M, for GRUB in Legacy mode), an ESP (100M) and a Linux partition (30G). The user can tune this partition table before running setup. This could help users not acquainted with manual partitioning.
The DOS partitions detection is based on their file system type (i.e., vfat but the ESP, msdos or ntfs), instead of the partition type. Rationale: only populate /etc/fstab with partitions of which mount can handle the file system.
In /etc/fstab, the lines for Linux, DOS, swap and EFI partitions are labeled by UUID instead of name, to allow finding them even if the device is renamed.
GRUB is used as boot loader and manager for both Legacy and UEFI booting. This is done running the grubconfig script just installed, shipped in grub-extra, modified from Salix/Slackel to install GRUB in both Legacy and EFI modes if possible, and to make writing a boot entry in the EFI firmware optional.
A portable installation mode is provided using the script install-portable shipped in slint-misc.
As it is not yet shipped in the ISO for Slint64-14.2.1.2, there is a specific procedure to use it. The idea is to allow installing Slint in a removable device in such a way that it can boot on many if not any machines, using a generic kernel and an initrd with modules able to handle various hardware and writing a custom grub.conf. This script is also needed to install on an USB attached drive even if used on only one machine. Limitation: the f2fs file system is not yet supported, which practically precludes installing on a flash drive.
Also in the slint-misc package the script update-portable allows to redo an initrd and rewrite grub.conf after a change in the generic kernel(s) installed. This script also allows to bring portability to a Slint that was not portable initially. This can be reverted just running update-grub.
The script upgrade-kernel, also in slint-misc, automatizes the installation of upgraded kernels provided by Slint: it downloads the new kernels, remove the old ones and install the new ones, then rebuild an initrd supporting all installed generic kernels, and update grub. A portable system will stay so.
To make the initrd we use the scripts shipped in the mkinitrd package for Slackware-current, with a modification of the script setup.01.mkinitrd to ship in the initrd modules for all installed generic kernels, including custom ones.
Enhancements planned, or at least considered
Make the script 'auto' more versatile: Instead of providing just one layout for a dedicated device, allow various layouts depending on the answers to questions asked to the user, in a similar fashion as what does the Debian text installer, as suggested by several users, cf. this thread. Also, if the installation occurs in Legacy mode, prefer to set up a DOS partition table as some machines are unhappy with a GPT one if booted in Legacy mode, or ask the user which one to set up.
Allow to choose between a fixed or portable system during installation
Allow to install a f2fs file system, to benefit flash drives. This will wait until grub 2.04 be released or close, as it supports this file system and brings other enhancements.
Provide only generic kernels, but keep the previous one in case of upgrade, as do other distributions. Then, dedicate an initrd to each one instead of an unique initrd "catch all".
Include in the boot menus a boot entry allowing to boot almost any installed system. Also linked to the release of grub 2.04, as will use scripts shipped in SuperGrub2 from Adrián Gibanel Lopez (currently version 2.04rc1s1-beta4).
Include an i386EFI image in the ESP, that could help users using some machines that have an x86_64 architecture but a 32-bit only EFI firmware
So, what?
Comments, questions, suggestions are welcome.
I am willing to help adapt these tools to friend distributions.
Best regards,
Didier