Page 1 of 1

Installation, booting and kernel upgrades: let's share scripts and plans with friends

Posted: 6. May 2019, 20:29
by DidierSpaier

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 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-, 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,


Re: Installation, booting and kernel upgrades: let's share scripts and plans with friends

Posted: 7. May 2019, 07:14
by djemos
Hi, Didier. You have done a great work.

I just like to suggest to increase the size of ESP to 300MB or 500MB. I did the same (300MB) in Slackel a couple of years before so initrd could fit in this partition. This reported in a Slackel review in Distrowatch if i remember well.
As for installation of the iso. I decided to use the gui installer in Slackel, which is now complete. It is more friendly as users reported.
Also you can look at instonusb and multibootusb gui tools for usb installation that can be used in Salix and slint too. I have ckecked multibootusb with salix and slackel. Not Slint.
I have created a live usb 32GB with salix, slackel 32 and 64 bit iso versions in it, having always with me.
I will look more carefully in your scripts as soon i find the time and see which or how i can use in gui tools.
Of cource i know Slint is for blind users too where is very useful. Slint friendly distro serve different purposes which is very good.

Re: Installation, booting and kernel upgrades: let's share scripts and plans with friends

Posted: 8. May 2019, 16:46
by DidierSpaier
Hi Djemos,

I will try the tools you mentioned, thanks for the links.

About the size of the initrd, well, I beg to differ.

First, as an example, the initrd in the Slint64- ISO is really huge (81M compressed) because it includes all compressed kernel modules, but it still fits in 100M. Which doesn't matter actually, as it is in /isolinux in the ISO, not in /EFI: it doesn't need to be in /EFI as we do not use elilo any more.

So, be it in the ISO or in the installed system, we do not need much room in the ESP (in the installed system we store there just a small EFI image there for GRUB)

Granted, in case of multiboot there could be other stuff in the ESP of the installed system, but there is some room left anyway. Currently the initrd.gz I have in /boot weighs 8.3M, so I guess I could store in the ESP several of the same size, for the few distributions still using elilo.

Now there is also the possibility of multiboot with Windows, that IIRC requests more space, but probably in this case Windows is already installed, so we will use another drive. We could allow the user to choose to use the same ESP as Windows though, but then it would be big enough already.

Do I miss something?



Re: Installation, booting and kernel upgrades: let's share scripts and plans with friends

Posted: 8. May 2019, 23:56
by djemos
Hi, Didier.
I had this problem when installing the 64bit iso in a ext3 formatted usb as you can see here and because maybe i use elilo and grub so initrd exists twice there.

Re: Installation, booting and kernel upgrades: let's share scripts and plans with friends

Posted: 9. May 2019, 12:06
by DidierSpaier
Hi Dimitris,
So we're not in the same context.

As an aside, this command safely lists the removable devices with their sizes:

Code: Select all

lsblk -o name,size,type,rm|grep disk|grep 1$|sed 's/  */ /g'|cut -d' '  -f 1-2
We can't assume that only /dev/sda is a hard disk. Here /dev/sdb/ is an SSD attached to the computer and /dev/sdc/ an USB attached SSD, /dev/sdd an USB stick:

Code: Select all

didier[~]$ lsblk -o name,size,type,rm|grep disk|grep 1$|sed 's/  */ /g'|cut -d' '  -f 1-2
sdd 123,5M
Just my 0.02€.