Linux live core changes

written by Tomas M. 276 days ago

The last version of Linux Live scripts dates back to the year 2009. A lot of time passed since then and the core concepts should be reconsidered.

Current approach is following:
- maintain a fixed size initrd image
- use busybox for everything
- use huge kernel (in order to support as much hardware out of the box as possible without loading modules)
- when done with booting, keep initrd in memory

The current approach has several disadvantages.

First of all, the fixed-size initrd is a filesystem (currently ext2) which needs to be decompressed and loop-mounted in memory. As long as the initrd stays available (which is forever in Slax), it consumes the same amount of memory all the time (currently 4MB). For that reason, there is a pressure to make the initrd small, which contradicts the need to include lots of useful stuff there (eg. network card drivers).

Being an ext2 filesystem in general, it is more complicated to create and maintain. If initrd is replaced by initramfs, it wouldn't be even necessary to include ext2 directly in kernel, and furthermore it would be much easier to cleanup the parts of it from memory which are no longer needed (eg. drivers). One can simply 'rm' the stuff and memory can be reused.

The 'huge' kernel (as Slackware calls it) is great for general purpose booting, but it boots much slower than the base kernel without all unnecessary drivers.

Busybox is also great for embeded systems, but it usually cares about memory usage and binary size, which is not our point of interest any longer. The most important factor today is SPEED, and FEATURES. Several parts of linux live scripts are coded especially for busybox's ash usage, it makes the coding more complicated. I would prefer to use bash instead of busybox's ash. And if bash is added (including its dependencies), there is nothing easier to even add the other linux utilities like mkdir, touch, and so on.

While thinking about it, it may be even more interesting to include full core of the operating system in initramfs, maybe even including udev and linux drivers. This needs further investigation.

So the key modifications which I would like to happen could be sumarized as:
- replace initrd by initramfs
- include more stuff in initramfs, and delete it when it's no longer needed
- possibly include full-featured bash
- use smaller kernel for faster booting
- investigate the possibility to use minimal Slackware install even in initramfs, take into consideration how to attach the other filesystem parts (how to setup aufs union and add squashfs modules)

Tomas M.

User comments

[1] 6ary wrote 275 days ago:

If ASH is replaced by BASH, I could do optimizing scripts.

[2] Viktor wrote 261 days ago:

Any ideas about GUI for Linux live Script? all modern tools for creating live Linux distributions has GUI...

[3] Ivan wrote 258 days ago:

Viktor, you are very lazy. Use brain, you didn't need GUI.

[4] Viktor wrote 245 days ago:

It's not about laziness Ivan , it is about making slax more appealing to people who aren't linux enthusiasts. I want Slax to become popular like android managed to kick other mobile OS' arsses :)

[5] gluni wrote 234 days ago:

there already is agui for Linux Live, its called LiveClone and has been developped for Salix.org.

Find it here:

http://www.simplynux.fr/index.php/en/software/liveclone.html

[6] hoanglong1712 wrote 218 days ago:

I do not think a GUI is a good choice
we need something simple and usable
if you need some GUI, you can go to unbuntu or opensuse or fedora, there is a lot of gui for you
You know, gui means plump, and none likes being plump either

You can't add your comment any longer since the post is too old.

(c) 2012, Tomas M; rss