grubのメニューリストをコンパクトにする。
まだ途中。
/etc/default/grub
diff --git a/grub b/grub index a5c4c53..eda140c 100644 --- a/grub +++ b/grub @@ -21,7 +21,7 @@ GRUB_CMDLINE_LINUX="" #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries -#GRUB_DISABLE_LINUX_RECOVERY="true" +GRUB_DISABLE_LINUX_RECOVERY="true" +# Uncomment to enable menu entries compact +GRUB_ENABLE_MENU_COMPACT=true # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
/etc/grub.d/10_linux
diff --git a/10_linux b/10_linux index e5231e4..339fafe 100755 --- a/10_linux +++ b/10_linux @@ -113,6 +113,12 @@ EOF list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi done` + +if [ "x${GRUB_ENABLE_MENU_COMPACT}" = "xtrue" ]; then + lines=`echo $list` + list=`for i in $lines; do echo $i; done | sort -r | head -n 1` +fi + prepare_boot_cache= while [ "x$list" != "x" ] ; do