Conversion guide for BootScripts 2.0

Lucas C. Villa Real edited this page Aug 2, 2016 · 1 revision
Clone this wiki locally

Here are the steps I needed to perform in order to adapt my Settings to the new BootScripts package:

Replace inittab with new version.

The new version uses the BootDriver script (a new name for the ambiguous bin/Init). This is how the new version looks like.


l1:S:wait:/System/Links/Executables/~BootDriver ~BootUp

l2:12345:wait:/System/Links/Executables/~BootDriver Console
l6:6:wait:/System/Links/Executables/~BootDriver Reboot
l0:0:wait:/System/Links/Executables/~BootDriver Halt

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now

1:2345:respawn:/System/Links/Executables/agetty tty1 9600
2:2345:respawn:/System/Links/Executables/agetty tty2 9600
3:2345:respawn:/System/Links/Executables/agetty tty3 9600
4:2345:respawn:/System/Links/Executables/agetty tty4 9600
5:2345:respawn:/System/Links/Executables/agetty tty5 9600
6:2345:respawn:/System/Links/Executables/agetty tty6 9600

You can always find the new versions of settings files in the Resources/Defaults/Settings directory of the program.

Convert Options to BootOptions

The Options file is no longer mixed with the boot scripts in Settings/BootScripts (rationale: Settings/BootScripts now contains exclusively boot scripts, as its name implies). Options was moved to the root of Settings/, and renamed to BootOptions.

An important change: now the network settings are entered directly in BootOptions, instead of separate files in a Settings/BootScripts/Network. So, add a section to BootOptions that looks like this:


eth0_~BootProto=Static # This the default if none is selected
#eth0_~BootProto=DHCP # Requires DHCPCD package


I believe the format is quite intuitive. So now, user specific configuration, for most purposes, is concentrated at the BootOptions file.

Rename/modify boot scripts

Some of the boot scripts were renamed to what we consider more logical names. Of course, if you like very much the old names, or prefer to create your own, you can always modify inittab instead.

The main change is that Init and Done were renamed to BootUp and Shutdown, and these are now intended to be "sourced" by your "runlevel" scripts. This is a simpler yet more flexible model than the older one, where bin/Init (now called BootDriver) ran always two scripts: one of Init and Done and then a second, user-specified one. Now you can just chain boot scripts as you see fit.

For example, you can have a script called Graphic that looks like this:

source ~BootUp
Exec "Starting login manager..." kdm

The nice new feature is that you can specify any boot script to BootDriver through the kernel command line in GRUB, using a command such as Boot=Graphic. So you can have a boot menu with "graphic desktop" and "console" entries.