1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 15:09:27 +00:00

Add Syslinux menu with debug and autologin options

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-06-28 13:15:58 +10:00
parent 85436f675b
commit 204facc395
6 changed files with 56 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
TIMEOUT 20 #2s
PROMPT 1
UI vesamenu.c32
TIMEOUT 20 #2s
PROMPT 0
# doesn't appear to work here?
INCLUDE ../global.cfg
@@ -7,3 +8,20 @@ INCLUDE ../global.cfg
# each INCLUDEd file has a `DEFAULT mylabel` in it, and the last one wins
INCLUDE ../linux-previous.cfg
INCLUDE ../linux-current.cfg
# http://www.syslinux.org/wiki/index.php?title=Comboot/menu.c32
LABEL Boot next BIOS option
MENU LABEL Boot next BIOS option
LOCALBOOT -1
MENU TITLE RancherOS
MENU BACKGROUND ../rancher.png
MENU WIDTH 80
MENU MARGIN 10
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
MENU ENDROW 24
MENU TIMEOUTROW 20

View File

@@ -3,7 +3,23 @@
DEFAULT rancheros-${LABEL}
LABEL rancheros-${LABEL}
SAY rancheros-${LABEL}: RancherOS ${VERSION} ${KERNEL_VERSION}
MENU LABEL RancherOS ${VERSION} ${KERNEL_VERSION}
KERNEL ../vmlinuz-${KERNEL_VERSION}
INITRD ../initrd-${VERSION}
# see global.cfg for kernel boot parameters
LABEL rancheros-${LABEL}-autologin
SAY rancheros-${LABEL}-autologin: autologin RancherOS ${VERSION} ${KERNEL_VERSION}
MENU LABEL rancher.autologin
MENU INDENT 2
COM32 cmd.c32
APPEND rancheros-${LABEL} rancher.autologin=tty1 rancher.autologin=ttyS0
LABEL rancheros-${LABEL}-debug
SAY rancheros-${LABEL}-debug: debug RancherOS ${VERSION} ${KERNEL_VERSION}
MENU LABEL rancher.debug=true
MENU INDENT 2
COM32 cmd.c32
APPEND rancheros-${LABEL} rancher.debug=true
MENU SEPARATOR

View File

@@ -38,6 +38,7 @@ cat scripts/isolinux.cfg | envsubst > ${DIST}/boot/isolinux/isolinux.cfg
cat scripts/isolinux_label.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/linux-current.cfg
#cat scripts/isolinux_label.cfg | LABEL=debug APPEND="rancher.debug=true" envsubst > ${DIST}/boot/linux-previous.cfg
cat scripts/global.cfg | LABEL=${VERSION} envsubst > ${DIST}/boot/global.cfg
cp scripts/rancher.png ${DIST}/boot/
mkdir -p ./scripts/installer/build/boot

View File

@@ -34,11 +34,12 @@ cp ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ${CD}/boot/
DIST=$(pwd)/dist
cp -r ${DIST}/boot/* ${CD}/boot/
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux/
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux/
cp /usr/lib/syslinux/modules/bios/*.c32 ${CD}/boot/isolinux/
# add the installer image to the iso for non-network / dev/test
cp ${ARTIFACTS}/installer.tar ${CD}/rancheros/
cp ${ARTIFACTS}/Dockerfile.amd64 ${CD}/rancheros/
cp ${ARTIFACTS}/installer.tar ${CD}/rancheros/
cp ${ARTIFACTS}/Dockerfile.amd64 ${CD}/rancheros/
gzip ${CD}/rancheros/installer.tar
cd ${CD} && xorriso \
-as mkisofs \

BIN
scripts/rancher.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -123,6 +123,9 @@ while [ "$#" -gt 0 ]; do
--netconsole)
NETCONSOLE=1
;;
--gui)
GUICONSOLE=1
;;
--installed)
./scripts/create-installed
INSTALLED=1
@@ -265,16 +268,17 @@ if [ "$QIND" != "1" ]; then
HOME=${HOME:-/}
fi
# default serial console
DISPLAY_OPTS="-nographic -serial mon:stdio -display none"
if [ "$CONSOLEDISPLAY" == "1" ]; then
DISPLAY_OPTS="-curses"
fi
if [ "$NETCONSOLE" == "1" ]; then
# put ttyS1 on port 4444
DISPLAY_OPTS="${DISPLAY_OPTS} -serial tcp::4444,server"
KERNEL_ARGS="rancher.console=ttyS1 rancher.autologin=ttyS1 ${KERNEL_ARGS}"
if [ "$GUICONSOLE" == "" ]; then
# default serial console
DISPLAY_OPTS="-nographic -serial mon:stdio -display none"
if [ "$CONSOLEDISPLAY" == "1" ]; then
DISPLAY_OPTS="-curses"
fi
if [ "$NETCONSOLE" == "1" ]; then
# put ttyS1 on port 4444
DISPLAY_OPTS="${DISPLAY_OPTS} -serial tcp::4444,server"
KERNEL_ARGS="rancher.console=ttyS1 rancher.autologin=ttyS1 ${KERNEL_ARGS}"
fi
fi
if [ "$QEMU" == "1" ]; then