-
Notifications
You must be signed in to change notification settings - Fork 44
New Installer: Linuxrc Extend
With the extend command linuxrc can install and remove extensions in the installation system (inst-sys). The extensions can be in squashfs, CPIO or RPM format and must be available in the /boot// directory of the media.
In the file /etc/instsys.parts
linuxrc keeps information about installed
extensions.
CPIOs and RPMs are first unpacked and converted to a squashfs image. RPM scripts are not executed. The squashfs image is then mounted under /mounts/mp_. After mounting the squashfs file is deleted so that the memory is automatically freed during unmount.
Finally linuxrc creates symlinks for all files in the extension to the
installation system. It does not use the adddir
script but a C
implementation. Links already existing in the installation system are
overwritten.
The extension can include a script called .init
which is executed. E.g. the
gdb extension needs this.
The mount is removed but the symlinks are not. So far the broken links did not create problems.
Again, the extension can include a script called .done
which is executed.
If the user provides a DUD during startup and later the installer installs an extension, the extension can override the files from the DUD.
To remedy this problem symlinks from a non-DUD extension must not override links from a DUD extension. /etc/instsys.parts should be extended to store the type of an extension.
The current solution with symlinks is limited:
-
Some programs don't work when symlinked, e.g. gdb.
-
Most parts of the filesystem are read-only. Frequently causes bugs, e.g. bnc #799501.
-
Removing extensions leaves broken symlinks. Even removing these would not recreate the old state, this would require a history for every symlink.
The task here has a common solution: [union mounts] (http://en.wikipedia.org/wiki/Union_mount).
But union mounts in Linux have seen lots of changes in the last years. Check whether the particular implementation is stable and whether is can be used for this feature.