Commits

Uelsk8s committed b4eaa68

rebuild grub no splash for TUI

Comments (0)

Files changed (1)

var/vabs/grub2/src/10_linux

 EOF
 }
 
+tui_entry ()
+{
+  cat << EOF
+menuentry "$1" {
+EOF
+  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
+  cat << EOF
+	linux16	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro vga=normal $2
+EOF
+  if test -n "${initrd}" ; then
+    cat << EOF
+	initrd16 ${rel_dirname}/${initrd}
+EOF
+  fi
+  cat << EOF
+}
+EOF
+}
+
 list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
         if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
       done`
   for i in "initrd.img-${version}" "initrd-${version}.img" \
 	   "initrd.img" "initrd-${version}" "initrd.img-${alt_version}" \
 	   "initrd-${alt_version}.img" "initrd-${alt_version}" \
-	   "initrd"; do
+	   "initrd" "initrd.gz"; do
     if test -e "${dirname}/${i}" ; then
       initrd="$i"
       break
   linux_entry "${OS}, Linux ${version}" \
       "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
   if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
-    linux_entry "${OS}, Linux ${version} (TUI)" \
+    tui_entry "${OS}, Linux ${version} (TUI)" \
 	"2 ${GRUB_CMDLINE_LINUX}"
   fi