Bienvenido a la edición Live de Slackware! Esta es una versión de Slackware-current (pronto a convertirse en 14.2), que puede ser ejecutada desde un DVD o una unidad de almacenamiento USB. Es una imagen ISO que pretende ser una muestra de lo que es Slackware. Obtendrás una instalación por defecto, sin paquetes o kernels personalizados, pero todo el poder. El ISO es creado desde cero, usando uno los espejos de los paquetes de Slackware, y por los scripts de “liveslak”.
Welcome to the Slackware Live Edition! This is a version of Slackware-current (soon to become 14.2), that can be run from a DVD or a USB stick. It is an ISO image meant to be a showcase of what Slackware is about. You get the default install, no custom packages or kernel, but with all the power. The ISO is created from scratch using a Slackware package mirror, by the “liveslak” scripts.
La edición Live de Slackware no necesita ser instalada en el disco duro de la computadora. Puedes llevar la versión para el dispositivo de almacenamiento USB y tenerla en tu bolsillo. Tendrás un sistema operativo Slackware pre-configurado y corriendo en cualquier computadora que puedas acceder que tenga un puerto USB.
Slackware Live Edition does not have to be installed to a computer hard drive. You can carry the USB stick version with you in your pocket. You'll have a pre-configured Slackware OS up & running in a minute wherever you can get your hands on a computer with a USB port.
La versión USB es “persistente” - esto significa que el Sistema Operativo guarda tus cambios en la unidad de almacenamiento USB. Las versiones CD/DVD (y la USB si la configuras acordemente) operan sin persistencia, lo que significa, que todos los cambios que hagas al Sistema Operativo se pierden cuando lo reinicias.
The USB version is “persistent” - meaning that the OS stores your updates on the USB stick. The CD/DVD versions (and the USB stick if you configure it accordingly) operate without persistence, which means that all the changes you make to the OS are lost when you reboot.
De modo a proteger tus datos privados sensibles en caso de pérdida de tu unidad de almacenamiento USB (o en caso de que te lo roben) puedes mejorar tu Sistema Operativo Live con tu carpeta home y/o archivos con una encriptación persistente, para ser desbloqueada en el arranque con una palabra clave que solo tú conozcas.
In order to protect your sensitive private data in case you lose your USB stick (or in case it gets stolen) you can enhance your persistent USB Live OS with an encrypted homedirectory and/or an encrypted persistence file, to be unlocked on boot with a passphrase that only you know.
Las razones que tuve para crear la edición Live de Slackware son las siguientes:
The reasons I had for creating the Slackware Live Edition are as follows:
Los scripsts “liveslack” pueden generar una variedad de versiones de Slackware: The “liveslak” scripts can generate a variety of Slackware flavors:
Las ubicaciones de descarga comunes son:Common download locations are:
Las imágenes ISO son híbridas, lo que significa que puedes quemarlas a un DVD o usar 'dd' o 'cp' para copiarlos a una unidad de almacenamiento USB. Ambos métodos te darán un ambiente en vivo que te permitirá hacer cambios y verse como “escribir en disco”. Los cambios se mantendrán en el disco RAM, entonces en un reinicio se “restablecerá” el sistema operativo a su estado original. En otras palabras, no hay persistencia de datos.
The ISO images are hybrid, which means you can either burn them to DVD, or use 'dd' or 'cp' to copy the ISO to a USB stick. Both methods will give you a live environment which will allow you to make changes and seemingly “write them to disk”. The changes will actually be kept in a RAM disk, so a reboot will “reset” the live OS to its original default state. In other words, there is no persistence of data.
La edicion Live de Slackware maneja dos cuentas: “root” y “live”. Ellas tienen contraseñas, y por defecto ellas son … lo adivinaste: “root” y “live”. También por defecto, los ISOs arrancarán en un runlevel 4, es decir, obtendrás un inicio de sesión gráfico. El gestor de arranque te permitirá elegir un idioma diferente al inglés estadounidense y/o una distribución de teclado y (en un arranque de un sistema UEFI) una zona horaria personalizada.
Slackware Live Edition knows two user accounts: “root” and “live”. They have passwords, and by default these are… you guessed: “root” and “live”. Also by default, the ISOs will boot into runlevel 4, i.e. you will get a graphical login. The bootloader allows you to pick a non-US language and/or keyboard layout and (on boot of an UEFI system) a custom timezone.
La edición Live de Slackware varía tan poco como fue posible de un arranque normal de Slackware. Una vez que hayas pasado la etapa inicial del arranque en vivo y estés en el sistema operativo actual, entrarás como el usuario “live”. Desde ese momento estarás en un ambiente Slackware normal.
Slackware Live Edition deviates as little as possible from a regular Slackware boot. Once you have passed the initial Liveboot stage and brought up the actual OS, you login as user “live”. From that moment onwards, you are in a regular Slackware environment.
La edicion Live de Slackware usa syslinux para iniciar el kernel Linux en computadoras con BIOS. Para ser precisos, la variante “isolinux” es instalada en una imagen ISO y la variante “extlinux” es instalada en la partición Linux de la version USB Live.
Slackware Live Edition uses syslinux to boot the Linux kernel on BIOS computers. To be precise, the “isolinux” variant is installed to the ISO image and the “extlinux” variant is installed into the Linux partition of the USB Live version.
Syslinux muestra un menú gráfico de arranque con un lindo fondo Slackware-temado y varias opciones:
Syslinux shows a graphical boot menu with a nice Slackware-themed background and several options:
Puedes seleccionar una distribución de teclado que coincida con la de tu computadora. También puedes iniciar Slackware en otro idioma aparte del Ingles Estadounidense.
You can select a keyboard mapping that matches your computer's. Also you can boot Slackware in another language than US English.
Si eliges usar la interface en Inglés probablemente igual desees cambiar la zona horaria porque por defecto usará UTC. Tienes que seleccionar una zona horaria específica personalizando a mano al agregar “tz=TuGeografia/TuUbiación” porque el menú de arranque syslinux no ofrece una selección de zonas horarias. Syslinux te permite editar la linea de comandos de arranque al presiontar <TAB>. Presiona <ENTER> para iniciar luego de hacer tus cambios o <ESC> para deshacer tu edición y volver al menú.
If you stick to US English interface language you will probably still want to change the timezone because it will default to UTC. You have to specify a custom timezone manually by adding “tz=YourGeography/YourLocation” because the syslinux bootmenu does not offer you a selection of timezones. Syslinux allows you to edit the boot commandline by pressing <TAB>. Press <ENTER> to boot after you made your changes or <ESC> to discard your edit and return to the menu.
En computadoras con UEFI, Grub2 maneja el arranque y te mostrará un menú similar (y con tema similar) al menú de Syxlinux:
On UEFI computers, Grub2 handles the boot and it will show a menu similar (and similarly themed) to the Syslinux menu:
Editar el menu Grub antes de arrancar es posible al presionar la tecla “e”. Después de hacer tus cambios a la línea de comando de arranque, presione <F10> para arrancar. Para deshacer los cambios, presione <ESC>
Editing a Grub menu before booting it is possible by pressing the “e” key. After making your changes to the boot commandline, press <F10> to boot. To discard your changes, press <ESC>.
Otra diferencia entre los menús Syslinux y Grub2: En Grub2 puedes seleccionar un teclado no-norteamericano, idioma y zona horaria y retornar al menú cada vez. Igual tendrás que seleccionar “Iniciar Slackware Live” para arrancar la computadora. En el menú Syslinux, solo la selección de teclado te retornará al menú. Cualquier idioma no-norteamericano por otro lado arrancará Slackware Live inmediatamente; sin tener que retornar al menú principal. Esta es una limitación de syslinux que podría potencialmente requerir más archivos de configuración para construir un menú con más opciones. Grub2 soporta variables que permitirán hacer más sencillo la modificación de características a las entradas del menú
Another difference between Syslinux and Grub2 menus: in Grub2 you can select a non-US keyboard, language and/or timezone and you will return to the main menu every time. You still have to select “Start SLACKWARE Live” to boot the computer. In the Syslinux menu, only the keyboard selection menu will return you to the main menu. Any non-US *language* selection on the other hand will boot you into Slackware Live immediately; without returning to the main menu. This is a limitation of syslinux which would require exponentially more menu files to construct a menu with more choices. Grub2 supports variables which make it easy to modify a menu entry's characteristics.
A script is available which allows you to transfer the ISO image content to a USB stick, making some modifications depending on the script's parameters.
The USB stick will be erased and re-formatted when running this script! Before inflicting any irreversible damage, the script will show you a prompt at which point you can evaluate whether it is safe to continue.
This script, called 'iso2usb.sh', accepts the following parameters:
-c|--crypt size|perc Add a LUKS encrypted /home ; parameter is the requested size of the container in kB, MB, GB, or as a percentage of free space. Examples: '-c 125M', '-c 1.3G', '-c 20%'. -f|--force Ignore most warnings (except the back-out). -h|--help This help. -i|--infile <filename> Full path to the ISO image file. -o|--outdev <filename> The device name of your USB drive. -p|--persistence <name> Custom name of the 'persistence' directory/file. -r|--refresh Refresh the USB stick with the ISO content. No formatting, do not touch user content. -u|--unattended Do not ask any questions. -v|--verbose Show verbose messages. -w|--wait<number> Add <number> seconds wait time to initialize USB. -C|--cryptpersistfile size|perc Use a LUKS-encrypted 'persistence' file instead of a directory (for use on FAT filesystem). -P|--persistfile Use an unencrypted 'persistence' file instead of a directory (for use on FAT filesystem).
Examples:
# ./iso2usb.sh -i ~/download/slackware64-live-14.2.iso -o /dev/sdX
# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 750M -w 15
# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 30% -P
# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 30% -C 300M
You might have noticed that the “-P” parameter does not accept a size parameter. This is because the unencrypted container file is created as a 'sparse' file that starts at zero size and is allowed to grow dynmically to a maximum of 90% of the initial free space on the Linux partition of the USB stick.
Slackware Live Edition can do a network boot boot using PXE protocol off a NFS export. Extract the content of the ISO to (for instance) a new directory called slackware-live
below your TFTP server's /tftproot
directory and export that directory via NFS. Then add lines like this to your pxelinux.cfg/default
file (assuming your NFS server has IP address 192.168.0.1
):
label liveslak kernel slackware-live/boot/generic append initrd=slackware-live/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=us tz=Europe/Amsterdam locale=us_EN.utf8 nfsroot=192.168.0.1:/tftpboot/slackware-live hostname=pxelive
As shown in the example above, a boot parameter nfsroot
is used for network boot. The parameter value defines the IP address of your NFS server and the path of the NFS export where you extracted the Slackware Live ISO. Hint: to get a listing of the exported shares of your NFS server, run showmount -e localhost
on the NFS server.
Actually, two boot parameters are available to properly support network boot. A second boot parameter nic
can be used to define the characteristics of your Live environment's network configuration, like the name of the network interface, static IP adress and such. If you are on a network where a DHCP server configures your clients, then the nic
parameter will not be needed as Slackware Live Edition will figure out all the details by itself.
Syntax of these two parameters:
nfsroot=ip.ad.dr.ess:/path/to/liveslak nic=<driver>:<interface>:<dhcp|static>[:ipaddr:netmask[:gateway]]
Example uses of the two network boot parameters:
nfsroot=192.168.1.1:/tftproot/slackware-live nic=auto:eth0:dhcp nic=auto:eth0:static:10.0.0.21:24: nic=:eth1:static:192.168.1.6:255.255.255.248:192.168.1.1
After you have setup your PXE environment (DHCP, TFTP and NFS servers) properly using the above information, boot one of your PXE-capable computers, interrupt the boot and select “network boot” and type or select the appropriate label (in the above example, that would be liveslak
). You will see the kernel and initrd being downloaded and booted, and then the Live OS will start just as if it was running from a local medium.
If your DHCP server takes too long in acknowledging the client's request, the DHCP client times out and the boot of your Live OS will fail because the NFS-mounted Live filesystem will not become available. In that case you can try increasing the wait time before the DHCP client decides that it is not going to get an IP address from the server. Add the boot parameter dhcpwait=30
(example value) where the number 30
is the number of seconds the DHCP client should wait for a server response. You should of course pick a value that is sufficiently large for your network setup.
The default DHCP wait time of the Live OS is 20 seconds.
Persistence is not supported in this configuration; currently the overlayfs does not support NFS as a writable layer in the live filesystem.
Slackware Live Edition is not just capable of booting as a PXE client; it is able to run a PXE server all by itself.
What does that mean?
A practical example would be that your bring a USB stick with Slackware Live Edition to a LAN party, use it to boot one of the computers and then all the other computers in the (wired) LAN will be able to do a network boot and run the same Slackware Live Edition a couple of minutes later. The computer with the USB stick will act as the PXE server and all the other computers will be its PXE clients, reading the Slackware data off that USB stick. The clients will inherit the server's timezone,language and keyboard settings by default but those can be overridden. The PXE clients will not have 'persistence'. If the server has access to the Internet, the clients will have access as well.
How to start the PXE server?
When you boot the Live OS you can then start a script “pxeserver” from the console in runlevel 3 or from an X terminal in runlevel 4. The script will gather all required information and if it is unable to figure something out by itself it will ask you. If it is unable to figure out the wired network interface that it should use, you can add the name of your interface (for instance, eth1) as a single parameter to the script when you start it.
The PXE server uses dnsmasq to offer DNS to the PXE clients. The dnsmasq program will enable its internal DHCP server capabilities if your LAN does not have its own DHCP server. Dnsmasq will also start a TFTP server which the PXE clients will connect to in order to retrieve the boot files (kernel and initrd). The pxeserver
script also starts a NFS server which will be used by the Live initrd to obtain the squashfs modules and boot the Live OS. If your PXE server has multiple network interfaces, for instance a wireless interface which is connected to the outside world and a wired interface connected to another computer which will become a PXE client (or indeed connected to a switch with a whole bunch of prospective PXE clients behind that) then the PXE server will setup packet forwarding so that the PXE clients will be able to access the outside world through the wired interface and out to that other interface.
If you have multiple network interfaces, it is important to know that dnsmasq will only bind to the interface where you want PXE clients to connect to. In a multi-NIC situation where a second NIC is connected to the outside world (your local network), this means that the DHCP/DNS server started by dnsmasq will not interfere with an existing DHCP server in your local network.
Once the PXE server is running, the script will show you the dnsmasq's activity log in a dialog window so that you can monitor the PXE clients that are connecting.
If your PXE server computer has sufficient RAM, it is strongly advised to boot the server's Live OS from the USB stick with the 'toram
' parameter. When more than a few PXE clients start reading OS files from the PXE server, the USB stick will become a bottleneck. Running the server OS from RAM will get rid of that bottleneck.
Press <F2> in the syslinux boot screen for an overview of (most) boot parameters. When booting Grub, select the menu “Help on boot parameters” instead. The Grub help is ugly, I know, but Grub does not offer anything better than this.
The following parameters are recognized by Slackware Live Edition. To boot with default values just press ENTER.
0|1|2|3|4|5|6|S|s|single ⇒
Select a runlevel to start with. The default is 4 for graphical login.
kbd=fr xkb=ch,fr ⇒
Example of custom X keyboard layout. The boot menus will configure some of these for you but you can of course always modify the values.
livepw=“somestring” ⇒
Change the password for user "live". The password is passed as a cleartext string.
locale=nl_NL kbd=nl tz=Europe/Amsterdam ⇒
Example of language, keyboard and/or timezone customization.
rootpw=“somestring” ⇒
Change the password for user "root". The password is passed as a cleartext string.
load=nvidia ⇒
Load and configure Nvidia drivers if available in the ISO (not for SLACKWARE and XFCE variants by default).
load=mod1[,mod2[…]] ⇒
Load one or more squashfs modules from the directory "/liveslak/optional". By default none of these "optional" modules are loaded on boot.
noload=mod1[,mod2[…]] ⇒
Prevent loading of one or more squashfs modules from the directory "/liveslak/addons". By default all these "addon" modules are loaded on boot.
dhcpwait=<numseconds> ⇒
Maximum wait time for the DHCP client to configure a network interface (default: 20 seconds).
nfsroot=ip.ad.dr.ess:/path/to/liveslak ⇒
defines the IP address of the NFS server, and the path to the extracted content of Slackware Live Edition.
nic=<driver>:<interface>:<dhcp|static>[:ipaddr:netmask[:gateway]] ⇒
network device customization, usually this parameter is not needed when your network runs a DHCP server. Specify a driver if UDEV does not detect the device. Specify the interface if Slackware Live can not figure it out. If you specify 'static' you need to also specify ipaddr and netmask. The gateway is optional but needed to access the internet for instance.
localhd ⇒
initialize RAID/LVM on local hard drives.
tweaks=tweak1[,tweak2,[,…]] ⇒
Implemented tweaks: nga - no glamor 2D acceleration, avoids error "EGL_MESA_drm_image required". tpb - enable TrackPoint scrolling while holding down middle mouse button. syn - start the syndaemon for better support of Synaptics touchpads. ssh - start the SSH server (disabled by default).
nomodeset ⇒
Boot without kernel mode setting, needed with some machines.
rootdelay=10 ⇒
Add 10 second delay to give the kernel more time to initialize USB. Try this if booting fails. Default is 5.
swap ⇒
Allow the Live OS to activate all swap partitions on the local hardware. By default, no swap is touched.
hostname=your_custom_hostname[,qualifier] ⇒
Specify a custom hostname. A qualifier 'fixed' can be appended to prohibit hostname modification in case of network boot.
livemedia=/dev/sdX ⇒
Tell the init script which partition contains the Slackware Live OS you want to boot. This can become necessary if you have another copy of Slackware Live installed in another partition. Also accepted: UUID or LABEL.
livemedia=/dev/sdX:/path/to/live.iso ⇒
Use this if you want to load the live OS from an ISO file on a local harddisk partition.
livemain=directoryname ⇒
Use this if you copied the content of the ISO to a different directory than "liveslak".
luksvol=file1[:/mountpoint1][,file1[:/mountpoint2],…] ⇒
Mount LUKS container "file1" at mount point "/mountpoint1" in the Live fs. Multiple files must be separated by a comma. Specify "luksvol=" to *prevent* mounting any LUKS container, including an encrypted /home .
nop ⇒
No persistence, i.e. boot the virgin installation in case your "persistence" directory got corrupted. If you want to ignore any persistent data during boot, including LUKS data, specify "nop luksvol=" .
nop=wipe ⇒
Wipe all data from persistence directory or container. Useful in cases where your persistent data got corrupted.
persistence=name ⇒
Use this if you are using a different directory/file than "persistence" for storing persistent data.
toram ⇒
copy the OS from the media to to RAM before running it. You can remove the boot media after booting.
blacklist=mod1[,mod2[…]] ⇒
Add one or more kernel modules to the kernel blacklist to prevent them from loading, in case they cause issues during operation.
debug ⇒
During init, pause at strategic locations while assembling the overlay filesystem and show mount information.
rescue ⇒
After initialization, you will be dropped in a rescue shell to perform lowlevel maintenance.
The Live ISO contains three directories in the root of its filesystem:
The USB variant with persistence may have an additional directory in the root:
The first script:
The script “make_slackware_live.sh” creates an ISO file as its output which contains the Live OS. Thanks to Linux kernel 4.x and the squashfs-tools package in Slackware, the process of creating a Slackware Live ISO requires no (re)compilation of Slackware content or installing 3rd party packages.
The script's inner workings can be subdivided into several distinct stages. For the full Slackware ISO the process stages are as follows:
Stage one:
Stage two:
Stage three:
Stage four:
Done! You can find the ISO file and its MD5 checksum in the /tmp directory.
The second script:
The “iso2usb.sh” script's runtime usage is explained in detail in a previous paragraph “Transfering ISO content to USB stick”.
This section explains how the script modifies the ISO for the enhanced USB functionality.
The script will create a file of requested size in the root of the Live partition using the 'dd' command. The 'cryptsetup luksCreate' command will initialize the encryption, which causes the script to prompt you with “are you sure, type uppercase YES” after which an encryption passphrase must be entered three times (two for intializing, and one for opening the container). If the container is used for an encrypted /home, its filename will be “slhome.img”. The script will copy the existing content of the ISO's /home into the container's filesystem which will later be mounted on top of the ISO's /home (thereby masking the existing /home). The Live OS is instructed to decrypt the container and mount the filesystem. This is done by editing the file “/luksdev” in the initrd and adding a line: “/slhome.img”. The iso2usb.sh script only supports creating and configuring an encrypted /home, but you can create additional encrypted containers yourself and mount them on other locations in the ISO's filesystem. In order for this to work, you need to edit the “/luksdev” file and add a line “/your/container.img:/your/mountpoint” i.e. container path and the target mount directory on a single line, separated by a colon. The Live init script will create the mount point if it is missing.
A second type of encrypted container exists, which can be used for storing your persistence data. The Live init script will check if it needs to enable persistence in this order:
For slow USB media, the default 5 seconds wait time during boot are sometimes insufficient to allow the kernel to detect the partitions on your USB device. The script can optionally add more wait time. It does this by editing the file “wait-for-root” in the initrd and updating the value which is stored there (by default “5” is written there by the “make_slackware_live.sh” script).
The third script:
The “makemod” script allows you to create a Slackware Live module easily, with a Slackware package or a directory tree as its input parameter.
Usage:
# makemod <packagename|directory> modulename.sxz
You can copy the module you just created (minding the filename conventions for a Slackware Live module, see paragraph “Slackware Live module format”) to either the optional/ or to the addon/ directory of your Live OS. If you copy it to the optional/ or addon/ directory of the liveslak sources then “make_slackware_live.sh” will use the module when creating the ISO image.
The fourth script:
The “setup2hd” script enables you to install the running Live OS to the computer's local hard disk. The “setup2hd” is a modified Slackware installer, so you will be comfortable with the process. There is no 'SOURCE' selection because the script knows where to find the squashfs modules. After you select the target partition(s), every active module of the Live OS variant (SLACKWARE, PLASMA5, MATE, …) is extracted to the hard drive. After extraction has completed, the script summarizes how many modules have been extracted. It will also show an example command to extract any remaining inactive or disabled modules manually. The final step in the installation is again the stock Slackware installer which kicks off the Slackware configuration scripts.
The fifth script:
The pxeserver
script works as follows:
nfsroot=<server_ip_address>:/mnt/livemedia luksvol= nop hostname=<distroname> tz=<server_timezone> locale=<server_locale> kbd=<server_kbd_layout>
Which shows that the configuration of the Live OS where the PXE server runs is largely determining the configuration of the PXE clients.
Creating an ISO image of Slackware Live Edition requires that you are running Slackware 14.2 (64-bit). Older releases of Slackware have a kernel that is too old to support liveslak's use of the “overlayfs” kernel functionality, and are lacking the squashfs tools. Likewise, a Slackware Live Edition can only be created for Slackware 14.2 or newer.
You also need the “liveslak” script collection which can be downloaded from any of the links at the bottom of this page.
Liveslak is a directory tree containing scripts, bitmaps and configuration files. Only 5 scripts are meant to be run by you, the user. These scripts (“make_slackware_live.sh”, “iso2usb.sh”, “makemod”, “setup2hd” and “pxeserver”) are explained in more detail in the section “Scripts and tools” higher up. When creating a Live ISO from scratch, you only need to run the “make_slackware_live.sh” script.
The toplevel 'liveslak' directory contains the following subdirectories:
The toplevel 'liveslak' directory contains the following files:
setup2hd
script.The liveslak's “make_slackware_live.sh” script accepts optional parameters to tweak the process of Live OS generation:
The script's parameters are: -h This help. -a arch Machine architecture (default: x86_64). Use i586 for a 32bit ISO, x86_64 for 64bit. -d desktoptype SLACKWARE (full Slack), KDE4 (basic KDE4), XFCE (basic XFCE), PLASMA5 (full Plasma5 replaces KDE4), MATE (Gnome2 fork replaces KDE4), CINNAMON (fork of Gnome3 Shell replaces KDE4). -e Use ISO boot-load-size of 32 for computers where the ISO won't boot otherwise (default: 4). -f Forced re-generation of all squashfs modules, custom configurations and new initrd.img. -m pkglst[,pkglst] Add modules defined by pkglists/<pkglst>,... -r series[,series] Refresh only one or a few package series. -s slackrepo_dir Directory containing Slackware repository. -t <doc|mandoc> Trim the ISO (remove man and/or doc). -v Show debug/error output. -z version Define your Slackware version (default: current). -H <hostname> Hostname of the Live OS (default: darkstar). -O <outfile> Custom filename for the ISO. -R <runlevel> Runlevel to boot into (default: 4). -X Use xorriso instead of mkisofs/isohybrid.
The script uses package repositories to create a Live ISO. The packages will be installed into a temporary directory.
In order to create a Live ISO for any of these variants, the package repositories that are required must be available as a local directory (this can be a network-mounted directory). A local mirror of the Slackware repository is mandatory. Any packages that are used from a 3rd party repository will be downloaded from a remote server as long as a rsync URL for the repository is configured in ./pkglists/*.conf.
When all pre-reqs are met, you issue a single command to generate the ISO. The following example will create a pure Slackware Live Edition:
# ./make_slackware_live.sh
Another example which creates a MATE variant, configuring runlevel '3' as default and specifying a custom path for the Slackware package repository root (note that the script will look for a subdirectory “slackware64-current” below this directory if you are generating this ISO for slackware64-current):
# ./make_slackware_live.sh -d MATE -R 3 -s ~ftp/pub/Slackware
If you want to know what package sets are included in any of these Desktop Environments, run the following command:
# grep ^SEQ_ make_slackware_live.sh
for MATE, you will find:
SEQ_MSB="tagfile:a,ap,d,e,f,k,l,n,t,tcl,x,xap,xfce,y pkglist:slackextra,mate local:slackpkg+"
Which means that most of the Slackware package series (excepting kde and kdei) will be installed from their tagfiles, and on top of that two package lists are installed from the pkglists/ subdirectory: slackextra and mate. Lastly, “slackpkg+” will be installed from a local directory.
You can create your own custom Live OS by changing its characteristics in the configuration file “make_slackware_live.conf
”.
Among the things you can change are:
custom_config()
” where you can add all your costom post-installation steps that are not covered in the “make_slackware_live.sh
” script itself.
This is the section in make_slackware_live.conf
which deals with these customizations. Two variables are required if you want to create your own custom Live OS: “LIVEDE
” and “SEQ_CUSTOM
”, the rest is optional (but useful nevertheless):
# REQUIRED: # Define a new name for your own variant of Slackware Live Edition: #LIVEDE="CINELERRA" # REQUIRED: # Define your own custom package sequence for a custom Live ISO. # In this example you would need to create two files "pkglists/cinelerra.conf" # and "pkglists/cinelerra.lst" defining the package location and package list # respectively): #SEQ_CUSTOM="min,xbase,xapbase,xfcebase,cinelerra" # OPTIONAL: # Your custom distro name (will reflect in boot screen & filenames): #DISTRO="cinelerra" # OPTIONAL: # Marker used for finding the Slackware Live files: #MARKER="CINELERRA" # OPTIONAL: # The filesystem label of the ISO: #MEDIALABEL="CINELERRA" # OPTIONAL: # The ISO main directory: #LIVEMAIN="cinelerra" # OPTIONAL: # Add your own Live OS customizations to the function custom_config() : #custom_config() { # # Add your own stuff here which is not covered in the main script: #}
Overlayfs and squashfs are doing the real magic here. As explained earlier, the squashfs program takes a directory structure and complresses this into a single archive file. It does this in a special way, more like how mkisofs does this than how tar creates an archive. The resulting module can be loop-mounted to access the filesystem inside.
When you have several of these loop-mounted squashfs modules, each containing a fraction of the filesystem of the OS, you are going to stack these fractional filesystems on top of each other and thus assemble the complete filesystem (much like Tintin did in The Secret of the Unicorn when he overlayed several translucent pieces of parchment and looked through them to see the complete picture). Overlayfs is the driver that performs this 'overlaying' of the fractional filesystems. Overlayfs can work with many read-only fractional filesystems and exactly one writable filesystem. The writable filesystem is what gives your Live OS the appearance that it is writing to a hard drive - the writes to the overlay filesystem are however done to RAM (in that case you have a real Live OS) or to a 'persistence' filesystem which is stored somewhere on a writable medium (a USB stick with 'persistence' is an example of this case).
The initrd used for the Slackware Live Edition is a standard Slackware initrd created with Slackware's “mkinitrd” command, with just one modification: its “init” script. The correct name for an 'initrd' nowadays is 'initramfs' by the way, short for “initial ram filesystem” because it contains the initial file system that gets loaded into kernel memory when your computer boots. The init script of an initrd is what prepares the root filesystem even before the actual OS starts. When the OS does start, it finds a root filesystem all ready to use. An example case is of course the LUKS-encrypted root filesystem. Another is a root filesystem stored on logical volumes (LVM). Some advance work is required to make the root filesystem accessible and start the real “init” program of the OS (PID 1). Just like the previous examples, you need a script in an initrd to assemble the root filesystem of a Live OS. Slackware's initrd does not support a Live environment, so the stock init script was expanded for use in liveslak.
What does the 'liveslak' init script do?
A Slackware Live module contains a directory tree, which has been 'squashed' into a compressed archive file by the program “squashfs”. The compression algorithm used is “xz” which explains the choice of the module's file extension “.sxz” meaning “squashed with xz”.
Slackware Live Edition expects its modules to adhere to a particularly loose filename convention:
0000 = contains the Slackware /boot directory 0010-0019 = packages installed from a Slackware tagfile (a,ap,d, ... , y series) 0020-0029 = packages installed from a package list as found in the ./pkglists subdirectory of the liveslak sources (min, xbase, xapbase, xfcebase etc) 0030-0039 = a 'local' package, i.e. a package found in subdirectory ./local or ./local64 (depending on architecture) 0099 = liveslak configuration module (contaning all the customizations that change the installed packages into a usable Live OS)
Naturally, there have been many who went before me, and since I started as a n00b in Linux Live land, I have learnt a lot about how a Live distro works from playing with these other Slackware-based Live distros. Allow me to name them, and show respect:
Website: https://www.slax.org/
SLAX was the original Live variant of Slackware. The linux-live scripts which are used to create a SLAX ISO were generalized so that they can create a Live version of any OS that is already installed to a harddrive. SLAX development stalled a couple of years ago but its creator seems to have warmed up recently.
The Live functionality of SLAX is based on aufs and unionfs which requires a custom-built kernel with aufs support compiled-in. It is small and has its boot scripts tweaked for startup speed.
Website: http://ww.porteus.org/
Porteus was created as a fork of SLAX by the SLAX community when the development of SLAX seemed to have ended. Porteus has an active user community where it's “all about the modules”. The use of aufs instead of overlayfs allows Porteus (like SLAX) to add and remove squashfs modules in the running Live system on the fly, which sparked the development of a lot of community modules. It looks like the next generation of Porteus will be based on Arch Linux instead of Slackware: this has to do with the original Porteus developer leaving the team.
Website: http://www.salixos.org/download.html
Salix is a distribution based on Slackware with its own philosophy of “one tool per task” reducing the number of packages a lot, compared to its parent Slackware distro. Salix has implemented dependency checking in its package management tool. Live editions of Salix are available in several editions, each built around and focused on a different Desktop Environment or Window Manager. Live editions are available for XFCE and MATE.
Website: http://www.slackel.gr/
Slackel is a Greek distro based on both Slackware and Salix. It comes in three flavors, each of which has a Live variant: KDE4, Openbox and Fluxbox. The Live scripts are a modification of Salix-Live.
Website: http://slackex.exton.net/
A website offering Live versions based on many regular Linux distributions. The SlackEX version is loosely based on Slackware with a custom kernel and some tools that are not part of Slackware itself. I was unable to find the sources for this live distro.
Slackware Live Edition is created by the 'liveslak' scripts developed and maintained by Eric Hameleers aka Alien BOB alien@slackware.com.