]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
master: Add kernel command line arguments for live OS
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 10:25:28 +0000 (10:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 10:25:28 +0000 (10:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bricklayer-master

index 2f4fbe5ca4c59f67841c7dbb67f67db0dcbbd9ad..c6db4339a32f3e61043eea9601baac5d2c7afdff 100644 (file)
@@ -169,6 +169,16 @@ make_grub_config() {
        local name="${2}"
        local class="${3}"
        local arch="${4}"
+       local label="${5}"
+
+       # Make kernel commandline
+       local commandline=(
+               # Tell dracut where to find the filesystem
+               "root=live:LABEL=${label}"
+
+               # Be less verbose during boot
+               "quiet"
+       )
 
        cat > "${path}" <<EOF
 # Bricklayer GRUB configuration
@@ -189,13 +199,13 @@ set default=0
 set timeout=60
 
 menuentry 'Install ${name} (${arch})' --class ${class} --id install {
-       linux /boot/vmlinuz
+       linux /boot/vmlinuz ${commandline[@]}
        initrd /boot/initramfs.img
 }
 
 submenu 'Other Installation Options -->' {
        menuentry 'Unattended installation' --class ${class} --id install.unattended {
-               linux /boot/vmlinuz installer.unattended=1
+               linux /boot/vmlinuz ${commandline[@]} installer.unattended=1
                initrd /boot/initramfs.img
        }
 }
@@ -469,7 +479,7 @@ mkimage() {
        local os_release="$(mktemp)"
 
        # Create the live system image
-       if ! make_live_system_image "${tempdir}/live-os.img" "${os_release}" \
+       if ! make_live_system_image "${tempdir}/squashfs.img" "${os_release}" \
                        "kernel = ${kernel_release}"; then
                rm -rf "${tempdir}" "${os_release}"
                return 1