Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Boot Parameter

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 13

live-boot - System Boot Scripts

DESCRIPTION
live-boot contains the scripts that configure a Debian Live system during the boot process (early userspace). live-boot is a hook for the initramfs-tools, used to generate a initramfs capable to boot live systems, such as those created by live-helper(7). This includes the Debian Live isos, netboot tarballs, and usb stick images. At boot time it will look for a (read-only) media containing a "/live" directory where a root filesystems (often a compressed filesystem image like squashfs) is stored. If found, it will create a writable environment, using aufs, for Debian like systems to boot from.

CONFIGURATION
live-boot can be configured through a boot parameter or a configuration file. Kernel Parameters live-boot is parameter. only activated if 'boot=live' boot was used to as a kernel the

In addition, there are some behaviour, see below.

more

parameters

influence

Configuration Files live-boot can be configured (but not activated) through configuration files. Those files can be placed either in the root filesystem itself (/etc/live/boot.conf, /etc/live/boot.d/), or on the live media (live/boot.conf, live/boot.d/).

OPTIONS
live-boot currently features the following parameters. access=ACCESS Set the accessibility level for physically or visually impared users. ACCESS must be one of v1, v2, v3, m1, or m2. v1=lesser visual impairment, v2=moderate visual impairment, v3=blindness, m1=minor motor difficulties, m2=moderate motor difficulties. console=TTY,SPEED Set the default console to be used with the "live-getty" option. Example: "console=ttyS0,115200" debug Makes initramfs boot process more verbose. Use: debug=1

Without setting debug to a value the messages may not be shown. fetch=URL httpfs=URL Another form of netboot by downloading a squashfs image from a given url. The fetch method copies the image to ram and the httpfs method uses fuse and httpfs2 to mount the image in place. Copying to ram requires more memory and might take a long time for large images. However, it is more likely to work correctly because it does not require networking afterwards and the system operates faster once booted because it does not require to contact the server anymore. Due to current limitations in busyboxs wget and DNS resolution, an URL can not contain a hostname but an IP only. Not working: http://example.com/path/to/your_filesystem.squashfs Working: http://1.2.3.4/path/to/your_filesystem.squashfs Also note that therefore it's currently not possible to fetch an image from a namebased virtualhost of an httpd if it is sharing the ip with the main httpd instance. You may also use the live iso image in place of the squashfs image. iscsi=server-ip[,server-port];target-name Boot from an iSCSI target that has an iso or disk live image as one of its LUNs. The specified target is searched for a LUN which looks like a live media. If you use the iscsitarget software iSCSI target solution which is packaged in Debian your ietd.conf might look like this: # The target-name you specify in the iscsi= parameter Target <target-name> Lun 0 Path=<path-to-your-live-image.iso>,Type=fileio,IOMode=ro # If you want to boot multiple machines you might want to look at tuning some parameters like # Wthreads or MaxConnections fromiso=/PATH/TO/IMAGE Allows to use a filesystem available on live-media. from within an iso image that's

ignore_uuid Do not check that any UUID embedded in the initramfs matches the discovered medium. live-boot may be told to generate a UUID by setting LIVE_GENERATE_UUID=1 when building the initramfs. integrity-check If specified, an MD5 sum is calculated on the live media during boot and compared to the value found in md5sum.txt found in the root directory of the live media. ip=[DEVICE]:[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]: [AUTOCONF] [,[DEVICE]:[CLIENT_IP]:[SERVER_IP]:[GATEWAY_IP]:[NETMASK]:[HOSTNAME]: [AUTOCONF]] Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). It will be changed in a future release to mimick official kernel boot param specification (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp).

ip=[frommedia] If this variable is set, dhcp and static configuration are just skipped and the system will use the (must be) media-preconfigured /etc/network/interfaces instead. {live-media|bootfrom}=DEVICE If you specify one of this two equivalent forms, live-boot will first try to find this device for the "/live" directory where the read-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed. Instead of specifing an actual device name, the keyword 'removable' can be used to limit the search of acceptable live media to removable type only. Note that if you want to further restrict the media to usb mass storage only, you can use the 'removable-usb' keyword. {live-media-encryption|encryption}=TYPE live-boot will mount the encrypted rootfs TYPE, asking the passphrase, useful to build paranoid live systems :-). TYPE supported so far are "aes" for loop-aes encryption type. live-media-offset=BYTES This way you could tell live-boot that your image starts at offset BYTES in the above specified or autodiscovered device, this could be useful to hide the Debian Live iso or image inside another iso or image, to create "clean" images. live-media-path=PATH Sets the path to the live filesystem on the medium. By default, it is set to '/live' and you should not change that unless you have customized your media accordingly. live-media-timeout=SECONDS Set the timeout in seconds for the device "live-media=" to become ready before giving up. specified by

module=NAME Instead of using the default optional file "filesystem.module" (see below) another file could be specified without the extension ".module"; it should be placed on "/live" directory of the live medium. netboot[=nfs|cifs] This tells live-boot to perform a network mount. The parameter "nfsroot=" (with optional "nfsopts="), should specify where is the location of the root filesystem. With no args, will try cifs first, and if it fails nfs. nfsopts= This lets you specify custom nfs options. nofastboot This parameter disables the default disabling of filesystem checks in /etc/fstab. If you have static filesystems on your harddisk and you want them to be checked at boot time, use this parameter, otherwise they are skipped.

nopersistent disables the "persistent" feature, useful if the bootloader syslinux) has been installed with persistent enabled. noprompt Do not reboot. prompt to eject

(like

the CD or remove the USB flash drive on

noprompt=TYPE This tells live-boot not to prompt to eject the CD (when noprompt=cd) or remove the USB flash drive (when noprompt=usb) on reboot. ramdisk-size This parameters allows to set a custom ramdisk size (it's the '-o size' option of tmpfs mount). By default, there is no ramdisk size set, so the default of mount applies (currently 50% of available RAM). Note that this option has no currently no effect when booting with toram. swapon This parameter enables usage of local swap partitions. persistent[={nofiles|cryptsetup}] live-boot will look for persistent and snapshot partitions or files labeled "live-rw", "home-rw", and files called "live-sn*", "home-sn*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latter in appropriate locations (snapshots). Snapshots will be tried to be updated on reboot/shutdown. Look at live-snapshot(1) for more informations. If "nofiles" is specified, only filesystems with matching labels will be searched; no filesystems will be traversed looking for archives or image files. This results in shorter boot times. If "cryptsetup" is specified, filesystems stored on Luks-encrypted devices will be considered as well as others when searching for a persistence filesystem; the user will be prompted for any needed decryption passphrase. persistent-path=PATH live-boot will look for persistency files in the root directory of a partition, with this parameter, the path can be configured so that you can have multiple directories on the same partition to store persistency files. persistent-subtext=SUFFIX Add a suffix when searching for the image filenames or partition labels to use for the above mentioned persistent feature, the SUFFIX will be added after a dash (e.g.: "live-sn" would transform to "live-sn-SUFFIX"). This is handy to test multiple live-boot based live-systems with different persistent storage choices. {preseed/file|file}=FILE A path to a file present on the rootfs could debconf database. be used to preseed

package/question=VALUE All debian installed packages could be preseeded from command-line

that way, beware of blanks spaces, they parsing, use a preseed file in this case.

will

interfere

with

quickreboot This option causes live-boot to reboot without attempting to eject the media and without asking the user to remove the boot media. showmounts This parameter will make live-boot to show on "/" the ro filesystems (mostly compressed) on "/live". This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation. silent If you boot with the normal quiet parameter, live-boot hides most messages of its own. When adding silent, it hides all. todisk=DEVICE Adding this parameter, live-boot will try to copy the entire read-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live-media=DEVICE" boot parameter with the same DEVICE used this time. toram Adding this parameter, live-boot will try to copy the whole read-only media to the computer's RAM before mounting the root filesystem. This could need a lot of ram, according to the space used by the read-only media. union=aufs|unionfs By default, live-boot switch to unionfs. uses aufs. With this parameter, you can

FILES (old)
/etc/live.conf Some variables can be configured via this config file live system). (inside the

live/filesystem.module This optional file (inside the live media) contains a list of white-space or carriage-return-separated file names corresponding to disk images in the "/live" directory. If this file exists, only images listed here will be merged into the root aufs, and they will be loaded in the order listed here. The first entry in this file will be the "lowest" point in the aufs, and the last file in this list will be on the "top" of the aufs, directly below /cow. Without this file, any images in the "/live" directory are loaded in alphanumeric order. /etc/live-persistence.binds This optional file (which resides in the rootfs system, not in the live media) is used as a list of directories which not need be persistent: ie. their content does not need to survive reboots when using the persistence features.

This saves expensive writes and speeds up operations on volatile data such as web caches and temporary files (like e.g. /tmp and .mozilla) which are regenerated each time. This is achieved by bind mounting each listed directory with a tmpfs on the original path.

FILES
/etc/live/boot.conf /etc/live/boot.d/ live/boot.conf live/boot.d/

live-config - System Configuration Scripts DESCRIPTION


live-config contains the scripts that configure a Debian Live system during the boot process (late userspace).

CONFIGURATION
live-config can be configured through boot parameters or configuration files. If both mechanisms are used for a certain option, the boot parameters take precedence over the configuration files. When using persistency, live-config scripts are only run once. Boot Parameters (scripts) live-config is only activated if 'boot=live' is used as a boot parameter. Additionally, live-config needs to be told which scripts to run through the 'live-config' parameter or which scripts to not run through the 'live-noconfig' parameter. If both 'live-config' and 'live-noconfig' are used, or, if either one is specified multiple times, always the later one takes precedence over the previous one(s). live-config | config All scripts are run. default. This is what Debian Live images use by

live-config=SCRIPT1,SCRIPT2, ... SCRIPTn | config=SCRIPT1,SCRIPT2, ... SCRIPTn Only the specified scripts are run. Note that the order matters, e.g. 'live-config=sudo,user-setup' would not work since the user needs to be added before it can be configured for sudo. Look at the filenames of the scripts in /lib/live/config for their ordering number. live-noconfig | noconfig No script is run. This is the same as not using any of

'live-config' or 'live-noconfig'. live-noconfig=SCRIPT1,SCRIPT2, ... SCRIPTn | noconfig=SCRIPT1,SCRIPT2, ... SCRIPTn All scripts are run, except the specified ones. Boot Parameters (options) Some individual scripts parameter. can change their behaviour upon a boot

live-config.hostname=HOSTNAME | hostname=HOSTNAME Allows to set the hostname of the system. The default is 'debian'. live-config.username=USERNAME | username=USERNAME Allows to set the username that gets created for autologin. The default is 'user'. live-config.user-fullname="USER FULLNAME" | user-fullname="USER FULLNAME" Allows to set the fullname of the users that gets created for autologin. The default is 'Debian Live user'. live-config.locales=LOCALE1,LOCALE2 ... LOCALEn | locales=LOCALE1,LOCALE2 ... LOCALEn Allows to set the locale of the system, e.g. 'de_CH.UTF-8'. The default is 'en_US.UTF-8'. In case the selected locale is not already available on the system, it is automatically generated on the fly. live-config.timezone=TIMEZONE | timezone=TIMEZONE Allows to set the timezone of the system, e.g. 'Europe/Zurich'. The default is 'UTC'. live-config.utc=yes|no | utc=yes|no Allows to change if the system is assuming that the hardware clock is set to UTC or not. The default is 'yes'. live-config.keyboard-model=KEYBOARD_MODEL | keyboard-model=KEYBOARD_MODEL Allows to change the keyboard model. There is no default value set. live-config.keyboard-layouts=KEYBOARD_LAYOUT1,KEYBOARD_LAYOUT2 ... KEYBOARD_LAYOUTn | keyboard-layouts=KEYBOARD_LAYOUT1,KEYBOARD_LAYOUT2 ... KEYBOARD_LAYOUTn Allows to change the keyboard layouts. If more than one is specified, the tools of the desktop environment will allow to switch it under X11. There is no default value set. live-config.keyboard-variant=KEYBOARD_VARIANT keyboard-variant=KEYBOARD_VARIANT Allows to change the keyboard variant. There is set. | no default value | default value

live-config.keyboard-options=KEYBOARD_OPTIONS keyboard-options=KEYBOARD_OPTIONS Allows to change the keyboard options. There are no set.

live-config.sysv-rc=SERVICE1,SERVICE2 ... SERVICEn rc=SERVICE1,SERVICE2 ... SERVICEn Allows to disable sysv services through update-rc.d.

sysv-

live-config.x-session-manager=X_SESSION_MANAGER x-session-manager=X_SESSION_MANAGER Allows to set the x-session-manager through update-alternatives. live-config.xorg-driver=XORG_DRIVER | xorg-driver=XORG_DRIVER Allows to set xorg driver instead of autodetecting it. live-config.xorg-resolution=XORG_RESOLUTION xorg-resolution=XORG_RESOLUTION Allows to set xorg resolution instead of autodetecting it.

live-config.hooks=filesystem|medium|URL1|URL2| ... |URLn | hooks=medium|filesystem|URL1|URL2| ... |URLn Allows to fetch and execute one or more arbitrary files. Note that the URLs must be fetchable by wget (http, ftp or file://), the files are executed in /tmp of the running live system, and that the files needs their dependencies, if any, already installed, e.g. if a python script should be executed the system needs python installed. Some hooks for some common use-cases are available at /usr/share/doc/live-config/examples/hooks/ and <http://live.debian.net/other/hooks>. If the file is placed on the live medium, it can be fetched with file:///live/image/FILE, or with file:///FILE if it is in the root filesystem of the live system itself. All hooks in /lib/live/hooks/ in the root filesystem of the live system can be automatically be enabled with the keyword 'filesystem'. All hooks in /live/hooks/ of the live medium can be automatically be enabled with the keyword 'medium'. If several mechanisms are combined, then filesystem hooks are executed first, then medium hooks, and last the network hooks. Boot Parameters (shortcuts) For some common use cases where it would require to combine several individual parameters, live-config provides shortcuts. This allows both to have full granularity over all the options, as well keep things simple. live-config.noroot | noroot Disables the sudo and policykit, privileges on the system. the user cannot gain root

live-config.noautologin | noautologin Disables both the automatic console autologin.

login

and

the

graphical

live-config.nottyautologin | nottyautologin Disables the automatic login on the console, not affecting the graphical autologin. live-config.nox11autologin | nox11autologin Disables the automatic login with any affecting tty autologin. display manager, not

Boot Parameters (special options) For special use cases there are some special boot paramters. live-config.debug | debug Enables debug output in live-config. Configuration Files live-config can be configured (but not activated) through configuration files. Everything but the shortcuts that can be configured with a boot parameter can be alternatively also be configured through one or more files. If configuration files are used, the 'boot=live' parameter is still required to activate live-config. Configuration files can be placed either in the root filesystem itself (/etc/live/config.conf, /etc/live/config.d/), or on the live media (live/config.conf, live/config.d/). If both places are used for a certain option, the ones from the live media take precedence over the ones from the root filesystem. Although the configuration files placed in the conf.d directories do not require a particular name or suffix, it's suggest for consistency to either use 'vendor.conf' or 'project.conf' as a naming scheme (whereas 'vendor' or 'project' is replaced with the actual name, resulting in a filename like 'debian-eeepc.conf'). LIVE_CONFIGS=SCRIPT1,SCRIPT2, ... SCRIPTn This variable equals the 'live-config=SCRIPT1,SCRIPT2, ... SCRIPTn' parameter. LIVE_NOCONFIGS=SCRIPT1,SCRIPT2, ... SCRIPTn This variable equals the 'live-noconfig=SCRIPT1,SCRIPT2, SCRIPTn' parameter. ...

LIVE_HOSTNAME=HOSTNAME This variable equals the 'live-config.hostname=HOSTNAME' parameter. LIVE_USERNAME=USERNAME This variable equals the 'live-config.username=USERNAME' parameter. LIVE_USER_FULLNAME="USER FULLNAME" This variable equals the FULLNAME"' parameter. 'live-config.user-fullname="USER

LIVE_LOCALES=LOCALE1,LOCALE2 ... LOCALEn This variable equals the 'live-config.locales=LOCALE1,LOCALE2 LOCALEn' parameter.

...

LIVE_TIMEZONE=TIMEZONE This variable equals the 'live-config.timezone=TIMEZONE' parameter. LIVE_UTC=yes|no This variable equals the 'live-config.utc=yes|no' parameter. LIVE_KEYBOARD_MODEL=KEYBOARD_MODEL This variable equals 'live-config.keyboard-model=KEYBOARD_MODEL' parameter. LIVE_KEYBOARD_LAYOUTS=KEYBOARD_LAYOUT1,KEYBOARD_LAYOUT2 the ...

KEYBOARD_LAYOUTn This variable equals the 'live-config.keyboard-layouts=KEYBOARD_LAYOUT1,KEYBOARD_LAYOUT2 ... KEYBOARD_LAYOUTn' parameter. LIVE_KEYBOARD_VARIANT=KEYBOARD_VARIANT This variable equals 'live-config.keyboard-variant=KEYBOARD_VARIANT' parameter. LIVE_KEYBOARD_OPTIONS=KEYBOARD_OPTIONS This variable equals 'live-config.keyboard-options=KEYBOARD_OPTIONS' parameter. the

the

LIVE_SYSV_RC=SERVICE1,SERVICE2 ... SERVICEn This variable equals the 'live-config.sysv-rc=SERVICE1,SERVICE2 ... SERVICEn' parameter. LIVE_XORG_DRIVER=XORG_DRIVER This variable equals the parameter. 'live-config.xorg-driver=XORG_DRIVER'

LIVE_XORG_RESOLUTION=XORG_RESOLUTION This variable equals 'live-config.xorg-resolution=XORG_RESOLUTION' parameter. LIVE_HOOKS=filesystem|medium|URL1|URL2| ... |URLn This variable equals 'live-config.hooks=filesystem|medium|URL1|URL2| parameter.

the

...

the |URLn'

CUSTOMIZATION
live-config can be easily customized for downstream projects usage. or local

Adding new config scripts Downstream projects can put their scripts into /lib/live/config and don't need to do anything else, the scripts will be called automatically during boot. The scripts are best put into an own debian package. A sample package containing an example script can be found in /usr/share/doc/live-config/examples. Removing existing config scripts It's not really possible to remove scripts itself in a sane way yet without requiring to ship a locally modified live-config package. However, the same can be achieved by disabling the respective scripts through the live-noconfig mechanism, see above. To avoid to always need specifing disabled scripts through the boot parameter, a configuration file should be used, see above. The configuration files for the live system itself are best put into an own debian package. A sample package containing an example configuration can be found in /usr/share/doc/live-config/examples.

SCRIPTS
live-config currently /lib/live/config. features the following scripts in

hostname configures /etc/hostname and /etc/hosts. user-setup adds an live user account. sudo grants sudo privileges to the live user.

locales configures locales. tzdata configures /etc/timezone. gdm configures autologin in gdm. gdm3 configures autologin in gdm3 (squeeze and newer). kdm configures autologin in kdm. lxdm nodm configures autologin in nodm. slim configures autologin in slim. configures autologin in lxdm.

xinit configures autologin with xinit. keyboard-configuration configures the keyboard. sysvinit configures sysvinit. sysv-rc configures sysv-rc by disabling listed services. login disables lastlog. apport (ubuntu only) disables apport. gnome-panel-data disables lock button for the screen. gnome-power-manager

disables hibernation. gnome-screensaver disables the screensaver locking the screen. initramfs-tools makes update-initramfs persistency. to also update the live media when using

kaboom disables KDE migration wizard (squeeze and newer). kde-services disables some unwanted KDE services (squeeze and newer). debian-installer-launcher adds debian-installer-launcher on users desktop. module-init-tools automatically load some modules on some architectures. policykit grant user privilegies through policykit. sslcert regenerating ssl snake-oil certificates. update-notifier disables update-notifier. anacron disables anacron. util-linux disables util-linux' hwclock. login disables lastlog. xserver-xorg configures xserver-xorg. ureadahead (ubuntu only) disables ureadahead. openssh-server recreates openssh-server host keys. hooks allows to run arbitrary commands from a script placed on media or an http/ftp server. the live

FILES
/etc/live/config.conf

/etc/live/config.d/ live/config.conf live/config.d/ /lib/live/config.sh /lib/live/config/ /var/lib/live/config/

You might also like