diff --git a/bin/generate-zbm b/bin/generate-zbm index 3257c5176..e934eafe2 100755 --- a/bin/generate-zbm +++ b/bin/generate-zbm @@ -498,85 +498,6 @@ if ( enabled $config{Components} ) { printf "Created kernel image %s\n", $kernel_target; } -# Generate syslinux.cfg, requires components to be built -if ( enabled $config{Components}{syslinux} ) { - my $warning = <<"EOF"; - -DEPRECATION WARNING: syslinux support in generate-zbm is deprecated. - Support will be removed in the next release. - - As an alternative: consider one of the following two options: - - 1. Set `Components.Versions` to `false` in the ZFSBootMenu configuration and - maintain a static syslinux configuration. - - 2. Use the contrib/syslinux-update.sh script in the ZFSBootMenu repository - as a post-image hook for generate-zbm(5). - -EOF - print $warning; - - my $glob = sprintf( "%s/%s-*", $config{Components}{ImageDir}, $runConf{kernel_prefix} ); - my @listing = sort versioncmp glob($glob); - - # Filter EFI files, in case they're in the same directory - my @components; - foreach my $entry (@listing) { - if ( $entry =~ /EFI$/i ) { - next; - } - push( @components, $entry ); - } - - $runConf{syslinux_temp} = join( '/', $tempdir, 'syslinux.conf' ); - open CFG, '>', $runConf{syslinux_temp}; - - my $header = <<'EOF'; -UI menu.c32 -PROMPT 0 - -MENU TITLE Boot Menu -TIMEOUT 50 -EOF - - print CFG $header; - - my $add_default = 1; - while (@components) { - my $entry = pop(@components); - - my $directory = dirname($entry); - - # Strip the mountpoint prefix out to generate a correct path based on / - $directory =~ s/\Q$config{Global}{BootMountPoint}//; - - my $kernel = basename($entry); - my ( undef, $version ) = split( '-', $kernel ); - my $label = "ZFSBootMenu-$version"; - my $menu_label = "ZFSBootMenu $version"; - - if ($add_default) { - print CFG "DEFAULT $label\n\n"; - $add_default--; - } - - my $entry_text = <<"EOF"; -LABEL $label -MENU LABEL $menu_label -KERNEL $directory/$kernel -INITRD $directory/initramfs-$version.img -APPEND $runConf{cmdline} - -EOF - print CFG $entry_text; - - } - close CFG; - - make_path dirname( $config{Components}{syslinux}{Config} ); - safeCopy( $runConf{syslinux_temp}, $config{Components}{syslinux}{Config} ) or exit 1; -} - if ( nonempty $config{Global}{PostHooksDir} and -d $config{Global}{PostHooksDir} ) { while ( my $hook = <$config{Global}{PostHooksDir}/*> ) { next unless -x $hook; diff --git a/docs/guides/void-linux/syslinux-mbr.rst b/docs/guides/void-linux/syslinux-mbr.rst index 455da1999..7e92943e9 100644 --- a/docs/guides/void-linux/syslinux-mbr.rst +++ b/docs/guides/void-linux/syslinux-mbr.rst @@ -142,9 +142,7 @@ See :doc:`generate-zbm(5) ` for more details. Configure syslinux ~~~~~~~~~~~~~~~~~~ -The ``generate-zbm`` image-creation utility includes now-deprecated support for managing a syslinux configuration. -Because this capability is slated for removal and was not reliable in the first place, it is better to create a static -syslinux configuration. The ZFSBootMenu configuration described above disables explicit image versioning, which means +The ZFSBootMenu configuration described above disables explicit image versioning, which means that each invocation of ``generate-zbm`` will produce two output files at a predictable location: * ``/boot/syslinux/zfsbootmenu/vmlinuz-bootmenu`` @@ -184,6 +182,9 @@ Consult the `syslinux documentation