#!/bin/sh PATH="/usr/sbin:/usr/bin:/sbin:/bin" # Insert ctrl character # ctrl-V then esc will print ^[ # ctrl-V then ctrl-shift-m will print ^M BACK_UP="\033[1K\033[0G" WARN="\033[33;1m" BAD="\033[31;1m" BOLD="\033[1m" GOOD="\033[32;1m" # Sets the default collation order LC_COLLATE=C # From KNOPPIX LINUXRC # Reset fb color mode RESET="]R" # ANSI COLORS # Erase to end of line CRE=" " # Clear and reset Screen CLEAR="c" # Normal color NORMAL="" # RED: Failure or error message RED="" # GREEN: Success message GREEN="" # YELLOW: Descriptions YELLOW="" # BLUE: System mesages BLUE="" # MAGENTA: Found devices or drivers MAGENTA="" # CYAN: Questions CYAN="" # BOLD WHITE: Hint WHITE="" # Clear screen with colormode reset # echo "$CLEAR$RESET" # echo "$CLEAR" # Just go to the top of the screen # printf "" KV=$(uname -r) KMAJOR=$(echo ${KV} | cut -f1 -d.) KMINOR=$(echo ${KV} | cut -f2 -d.) KVER="${KMAJOR}.${KMINOR}" MISCOPTS='debug detect' CONSOLE_LOGLEVEL=$(cut -b1 /proc/sys/kernel/printk 2>/dev/null || echo 7) QUIET=0 ROOT_LINKS='bin sbin lib lib32 lib64 boot usr opt emul' ROOT_TREES='etc root home var' FAKE_ROOT='' FAKE_INIT='' FAKE_ROOTFLAGS='' REAL_ROOT='' NEW_ROOT='/newroot' no_umounts='/newroot|/mnt/aufs-dev|/mnt/aufs-rw-branch|/mnt/livecd|/mnt/cdrom|/.unions/memory|/.unions/memory/xino' ROOTDELAY=5 CDROOT='0' CDROOT_DEV='' CDROOT_TYPE='auto' CDROOT_PATH='/mnt/cdrom' # This is the file that the cdroot will be checked for as a # marker. It must exist RELATIVE to the cdroot. CDROOT_MARKER='/livecd' VERIFY=0 IP='dhcp' GK_BOOTFONT_DISABLED=0 GK_CONSOLE_LOGLEVEL=3 GK_DEBUGMODE_STATEFILE="/tmp/debug.enabled" GK_EMERGENCY_ACTION="halt -f" GK_HW_LOAD_ALL_MODULES=0 GK_HW_USE_MODULES_LOAD=0 GK_INIT_LOG='/run/initramfs/init.log' GK_INIT_LOG_DISABLED='/tmp/no-init.log' GK_INIT_LOG_PREFIX= GK_NET_DHCP_PIDFILE='/var/run/udhcpc.pid' GK_NET_DHCP_RETRIES=3 GK_NET_GW= GK_NET_IFACE='eth0' GK_NET_LOCKFILE='/tmp/network.started' GK_NET_ROUTES= GK_NET_TIMEOUT_DAD=10 GK_NET_TIMEOUT_DECONFIGURATION=10 GK_NET_TIMEOUT_DHCP=10 GK_NET_TIMEOUT_INTERFACE=10 GK_META_BUILD_DATE=$(cat /etc/build_date 2>/dev/null || echo "Unknown") GK_META_VERSION=$(cat /etc/build_id 2>/dev/null || echo "Unknown") GK_PRESERVE_RUN=1 GK_PROMPT_FILE='/tmp/current_prompt' GK_PROMPT_TIMEOUT=0 GK_ROOT_DEV_DETECTED_STATEFILE="/tmp/root_dev.detected" GK_SHELL_LOCKFILE='/tmp/rescueshell.lock' GK_SSHD_LOCKFILE='/tmp/remote-rescueshell.lock' GK_SSHD_PIDFILE='/var/run/dropbear.pid' GK_SSHD_PORT=22 GK_SSHD_WAIT= GK_UDEV_LOG='/run/initramfs/udevd.log' GK_UDEV_DEBUG=0 GK_UDEV_TIMEOUT=120 GK_USERINTERACTION_DISABLED_STATEFILE='/tmp/user-interaction.disabled' CRYPT_ENV_FILE='/etc/CRYPT_ENV.conf' CRYPT_ROOT_KEYDEV_FSTYPE='auto' CRYPT_ROOT_KEYFILE='/tmp/root.key' CRYPT_ROOT_OPENED_LOCKFILE='/tmp/ROOT.opened' CRYPT_ROOT_OPTIONS='' CRYPT_SILENT=0 CRYPT_SWAP_KEYDEV_FSTYPE='auto' CRYPT_SWAP_KEYFILE='/tmp/swap.key' CRYPT_SWAP_OPENED_LOCKFILE='/tmp/SWAP.opened' CRYPT_SWAP_OPTIONS='' ROOTFSTYPE='auto' ZFS_ENC_ENV_FILE='/etc/ZFS_ENC_ENV.conf' ZFS_ENC_OPENED_LOCKFILE='/tmp/ZFS.opened' # Flag for if ok when using CDROOT got_good_root='0' # if LOOP found on root before mount, trigger Unpacking additional packages got_loop_wo_mount='0' # AUFS variables aufs=0 aufs_union_file=/livecd.aufs aufs_modules_dir=mnt/cdrom # Overlayfs variables overlayfs=0 overlayfs_modules_dir=mnt/cdrom LOOPS='/livecd.loop /zisofs /livecd.squashfs /image.squashfs /livecd.gcloop' DEFAULT_NFSOPTIONS="ro,nolock" # HWOPTS is the list of ALL options that take do/no prefixes, almost all of # which match a MODULES_* variable; it is ALSO the order of evaluation. # # The following entries are special behavior, rather than module loading # - keymap # - cache # - modules HWOPTS_BLK='nvme sata scsi pata usb firewire waitscan' HWOPTS_OBSOLETE='pcmcia ataraid' # Obsolete stuff that might be useful on old hardware, do$X only. HWOPTS="keymap cache modules virtio hyperv ${HWOPTS_BLK} bcache lvm dmraid multipath mdadm zfs fs iscsi crypto" # This is the set of default HWOPTS, in the order that they are loaded. # This is whitespace aligned with HWOPTS above. MY_HWOPTS=" modules virtio hyperv ${HWOPTS_BLK} lvm dmraid mdadm fs crypto"