Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
/ SaLT Public archive

(Obsolete) SaLT (Salix Live Technology) is a set of tools to create an initrd for using in a live environnement under Slackware/Salix Linux distribution.

License

Notifications You must be signed in to change notification settings

Salix-OS/SaLT

Repository files navigation

/-----------------------------\
| SaLT: Salix Live Technology |
\-----------------------------/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Authors:
  - Cyrille Pontvieux <[email protected]>
Contributors:
  - Andreas Born <[email protected]>
Licence: GPLv3+
Version: 0.2.1

Logo: http://www.openclipart.org/detail/58609
This one could be ok too: http://www.tutsking.com/vectors/kitchen-appliances-silhouettes

INFORMATION:
------------
Set of tools to create a full live environnement for Slackware/Salix using:
  - a custom Live Linux kernel using Aufs2 and Squashfs patches
  - a special initrd template
  - some tools to exploit Live environment

These scripts is a base to help you built a Slackware Live.
It will not build the modules for you or organize the final architecture: it focuses on the initrd.
It could possibly be modified to run other distro than Slackware based.

Based on ideas from LLS (ftp://ftp.slax.org/Linux-Live/) and SLS (http://slackware-live.tuxfamily.org/-Home-).
Why a new project? Because LLS is not compatible with 64 bits and not maintained and SaLT doesn't have the same purpose as SLS.

These scripts could be used for Salix or any other Slackware-compatible distribution, in 32 or 64 bits.
These scripts will not handle all possibilities of LLS or SLS at first. Things will be added further, in a proper way.

Features:
  - boot from initrd.
  - detect partition filesystems:
    * ext4
    * ext3
    * ext2
    * reiserfs
    * xfs
    * fat(16,32)
    * ntfs
    * squashfs
  - mount filesystems.
  - detect the distro partition.
  - detect the save file (ext?, xfs, reiserfs, fat or ntfs)
  - create union and add branches.
  - xino (for aufs2) files in tmpfs.
  - hooks installed in writable branch of union, thus no modification of the targetting distro is required.
  - initrd accessible in /mnt/salt
  - can halt/reboot/powerdown the system.
  - eject CD if needed.
  - can use Isolinux or Grub2 bootloader.
  - kernel cmdline parameters to tweak the boot/distro:
    * debug
    * 1-5: runlevel
    * lang=: language to use as locale, like fr-FR.utf8 (default: en_US)
    * keyb=: keyboard to use, like fr-latin9 (default: us)
    * numlock=: could be 'on' or 'off' (default: off)
    * scim=: could be 'on' or 'off' (default: off)
    * ibus=: could be 'on' or 'off' (default: off)
    * synaptics=: could be 'on' or 'off' (default: off)
    * passwd=: could be 'ask' (will ask the password) or directly the new password (default: no change)
    * nosound: will mute the sound if present
    * autologin: will autologin if present and if gdm is used and configured for it
    * identfile=: name of the file to find the distro. Overrides the name in the config file
    * identcontent=: content of the file to find the distro. Overrides the content in the config file
    * savefile=: name of the save file. Overrides the name in the config file
    * memonly: will boot using memory only. The CD/DVD/USB will not be read/used after booting (or just the savefile if it's on the USB key)
    * fromiso=: will boot using the ISO provided instead of the CD/DVD/USB media
    * proxy=: url of the http and ftp proxy.
  - can netboot in PXE (using the extra initrd) using the following protocols:
    * NFS
    * SSH
    * Samba (CIFS)
    * HTTP
    * FTP (with a limitation)

Known bugs/limitations:
  - kernel must support aufs2 and squashfs.
  - kernel live version must match the kernel modules version used by the target distro or the kernel modules will probably not be loadable.
  - plinks are not supported over aufs2. So hardlink between branches do not work, i.e. files are copied.
  - live module must be a squashfs filesystem.
  - save file must be an XFS, EXT?, Reiserfs, FAT or NTFS filesystem.
  - init is the only first process supported and is looked up in /, /sbin, /bin, /usr/sbin, /usr/bin directories.
  - if init is dynamically linked (bad idea), only ld and libc is supported.
  - Linux console not localized.
  - PXE boot in FTP will freeze (kernel panic) while chrooting when using curlftpfs. Wget is used instead (needs more memory).

initrd-template/lib/keymaps is a file taken from the salixtools package. This file will be kept up to date.

CONFIGURATION:
--------------
Two files are used for configuration:
  - config
    used at runtime as /etc/salt.cfg
  - modules
    used at compile-time

'config' file is expecting some variables:
  - LIVE_NAME: only used when displaying some information on boot, enter what your want.
  - IDENT_FILE: default file name to look for to identify the target distro to boot. This file must be in the root directory of the ISO.
  - IDENT_CONTENT: string contained in IDENT_FILE for double-checking.
  - ROOT_DIR: directory that contains distro data like modules.

'modules' file is a kernel module file list where each module is on one line. The path starts from /lib/modules/kver/kernel/ where '/' is not mentionned.
Exemple:
drivers/hid/hid.ko
drivers/hid/usbhid/usbhid.ko
drivers/usb/host/ehci-hcd.ko 
drivers/usb/host/ohci-hcd.ko 
drivers/usb/host/uhci-hcd.ko 


COMPILATION:
------------
You need to extract the kernel and modules in a 'kernel' directory.
For exemple, I have this structure in 'kernel' directory:
  $ 'ls' -1 kernel/*
  kernel/boot:
  System.map-2.6.36-smp
  config-2.6.36-smp
  vmlinuz-2.6.36-smp

  kernel/etc:
  rc.d

  kernel/install:
  doinst.sh
  slack-desc

  kernel/lib:
  firmware
  modules

  kernel/usr:
  doc
  src
The script 'create-initrd.sh' will inject the kernel modules listed in 'modules' file from kernel/lib/modules inside the initrd.
The initrd.gz is then created in the current folder
If you use 'create-iso.sh' you won't need to call directly 'create-initrd.sh'


MAKING AN ISO:
--------------
If you want to create an ISO, then:
  - creates your squashfs modules and put them in overlay/$ROOTDIR/modules/. Hint: use a prefix number to order them.
  - create any file or directory you want in your ISO in the overlay directory.
  - create a background image. The result image will be 640x480 in 8bits.
  - invoke the 'create-iso.sh' script with the correct parameters for your ISO. You have the choice of making an ISO with either Isolinux or with Grub2. Grub2 has a nicer menu, which is internationnalized.


DEBUGGING:
----------
If you want to debug, use the '-d 1' flag with 'create-iso.sh'. It will automatically pass the 'debug' parameter to the kernel and thus will give you some debug shells while booting and shuting down. It will also compile and make available the 'lsof' binary in the initrd.

About

(Obsolete) SaLT (Salix Live Technology) is a set of tools to create an initrd for using in a live environnement under Slackware/Salix Linux distribution.

Resources

License

Stars

Watchers

Forks

Packages

No packages published