mklive: added -C and -T to append kernel cmdline args and modify bootloader title.
Requested by pancake.
This commit is contained in:
parent
bedab03a6e
commit
8c91dea923
|
@ -25,12 +25,13 @@ if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ cpuid -l ]; then
|
if [ cpuid -l ]; then
|
||||||
menuentry "Void GNU/Linux @@KERNVER@@ (@@ARCH@@)" {
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" {
|
||||||
set gfxpayload="keep"
|
set gfxpayload="keep"
|
||||||
linux (${voidlive})/boot/vmlinuz \
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
root=live:CDLABEL=VOID_LIVE ro \
|
root=live:CDLABEL=VOID_LIVE ro \
|
||||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@
|
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||||
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
|
||||||
initrd (${voidlive})/boot/initrd
|
initrd (${voidlive})/boot/initrd
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,9 +21,9 @@ MENU COLOR border * #00000000 #00000000 none
|
||||||
MENU COLOR sel * #ffffffff #FF5255FF *
|
MENU COLOR sel * #ffffffff #FF5255FF *
|
||||||
|
|
||||||
LABEL linux
|
LABEL linux
|
||||||
MENU LABEL Boot Void GNU/Linux @@KERNVER@@ @@ARCH@@
|
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@
|
||||||
KERNEL /boot/vmlinuz
|
KERNEL /boot/vmlinuz
|
||||||
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@
|
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
|
||||||
LABEL c
|
LABEL c
|
||||||
MENU LABEL Boot first HD found by BIOS
|
MENU LABEL Boot first HD found by BIOS
|
||||||
COM32 chain.c32
|
COM32 chain.c32
|
||||||
|
|
15
mklive.sh.in
15
mklive.sh.in
|
@ -59,6 +59,9 @@ Options:
|
||||||
-o <file> Output file name for the ISO image (auto if unset).
|
-o <file> Output file name for the ISO image (auto if unset).
|
||||||
-p "pkg pkgN ..." Install additional packages into the ISO image.
|
-p "pkg pkgN ..." Install additional packages into the ISO image.
|
||||||
|
|
||||||
|
-C "cmdline args" Add additional kernel command line arguments.
|
||||||
|
-T "title" Modify the bootloader title.
|
||||||
|
|
||||||
The $(basename $0) script generates a live image of the Void Linux distribution.
|
The $(basename $0) script generates a live image of the Void Linux distribution.
|
||||||
This ISO image can be written to a CD/DVD-ROM or any USB stick.
|
This ISO image can be written to a CD/DVD-ROM or any USB stick.
|
||||||
_EOF
|
_EOF
|
||||||
|
@ -141,7 +144,10 @@ generate_isolinux_boot() {
|
||||||
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
|
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
|
||||||
-e "s|@@KEYMAP@@|${KEYMAP}|" \
|
-e "s|@@KEYMAP@@|${KEYMAP}|" \
|
||||||
-e "s|@@ARCH@@|$(uname -m)|" \
|
-e "s|@@ARCH@@|$(uname -m)|" \
|
||||||
-e "s|@@LOCALE@@|${LOCALE}|" $ISOLINUX_DIR/isolinux.cfg
|
-e "s|@@LOCALE@@|${LOCALE}|" \
|
||||||
|
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
|
||||||
|
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
|
||||||
|
$ISOLINUX_DIR/isolinux.cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_grub_efi_boot() {
|
generate_grub_efi_boot() {
|
||||||
|
@ -151,6 +157,8 @@ generate_grub_efi_boot() {
|
||||||
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
|
-e "s|@@KERNVER@@|${KERNELVERSION}|" \
|
||||||
-e "s|@@KEYMAP@@|${KEYMAP}|" \
|
-e "s|@@KEYMAP@@|${KEYMAP}|" \
|
||||||
-e "s|@@ARCH@@|$(uname -m)|" \
|
-e "s|@@ARCH@@|$(uname -m)|" \
|
||||||
|
-e "s|@@BOOT_TITLE@@|${BOOT_TITLE}|" \
|
||||||
|
-e "s|@@BOOT_CMDLINE@@|${BOOT_CMDLINE}|" \
|
||||||
-e "s|@@LOCALE@@|${LOCALE}|" $GRUB_DIR/grub_void.cfg
|
-e "s|@@LOCALE@@|${LOCALE}|" $GRUB_DIR/grub_void.cfg
|
||||||
|
|
||||||
modprobe -q loop
|
modprobe -q loop
|
||||||
|
@ -212,7 +220,7 @@ generate_iso_image() {
|
||||||
#
|
#
|
||||||
# main()
|
# main()
|
||||||
#
|
#
|
||||||
while getopts "b:r:c:k:l:i:s:o:p:h" opt; do
|
while getopts "b:r:c:C:T:k:l:i:s:o:p:h" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
b) BASE_SYSTEM_PKG="$OPTARG";;
|
b) BASE_SYSTEM_PKG="$OPTARG";;
|
||||||
r) XBPS_REPOSITORY+="--repository=$OPTARG ";;
|
r) XBPS_REPOSITORY+="--repository=$OPTARG ";;
|
||||||
|
@ -223,6 +231,8 @@ while getopts "b:r:c:k:l:i:s:o:p:h" opt; do
|
||||||
s) SQUASHFS_COMPRESSION="$OPTARG";;
|
s) SQUASHFS_COMPRESSION="$OPTARG";;
|
||||||
o) OUTPUT_FILE="$OPTARG";;
|
o) OUTPUT_FILE="$OPTARG";;
|
||||||
p) PACKAGE_LIST="$OPTARG";;
|
p) PACKAGE_LIST="$OPTARG";;
|
||||||
|
C) BOOT_CMDLINE="$OPTARG";;
|
||||||
|
T) BOOT_TITLE="$OPTARG";;
|
||||||
h) usage;;
|
h) usage;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -235,6 +245,7 @@ shift $(($OPTIND - 1))
|
||||||
: ${INITRAMFS_COMPRESSION:=xz}
|
: ${INITRAMFS_COMPRESSION:=xz}
|
||||||
: ${SQUASHFS_COMPRESSION:=xz}
|
: ${SQUASHFS_COMPRESSION:=xz}
|
||||||
: ${BASE_SYSTEM_PKG:=base-system}
|
: ${BASE_SYSTEM_PKG:=base-system}
|
||||||
|
: ${BOOT_TITLE:="Void Linux"}
|
||||||
|
|
||||||
# Required packages in the image for a working system.
|
# Required packages in the image for a working system.
|
||||||
PACKAGE_LIST="$BASE_SYSTEM_PKG dialog $PACKAGE_LIST"
|
PACKAGE_LIST="$BASE_SYSTEM_PKG dialog $PACKAGE_LIST"
|
||||||
|
|
Loading…
Reference in New Issue