New menu configs for grub [ci skip]

This commit is contained in:
Kevin Lange 2015-07-26 19:08:07 -07:00
parent 7a475f0223
commit 2193d69bf0
3 changed files with 109 additions and 40 deletions

View File

@ -7,10 +7,23 @@ insmod png
#set root='(cd)'
set gfxmode=1024x768
set t_driver=preset
set t_resolution=1024,768
set g_resolution=1024x768
export gfxmode
export t_driver
export t_resolution
export g_resolution
insmod gfxterm
terminal_output gfxterm
set theme=/boot/grub/theme.txt
loadfont /boot/grub/fonts/unicode.pf2
function set_theme {
set theme=/boot/grub/theme.txt
}
set timeout_style=menu
set timeout=5
@ -37,37 +50,7 @@ function load_ramdisk {
function set_vidmode {
echo "Switching to video mode..."
set gfxpayload=1024x768x32
set gfxpayload=${g_resolution}x32
}
menuentry 'Live CD' {
multiboot /kernel vid=preset,1024,768 start=live-welcome root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
menuentry 'Normal ToaruOS boot - boots to a graphical login screen' {
multiboot /kernel vid=preset,1024,768 root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
menuentry 'Graphical terminal - boots to a terminal with a traditional login prompt ' {
multiboot /kernel vid=preset,1024,768 start=--single root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
menuentry 'VGA console with serial debugging - disables graphical boot, loads the serial debug shell' {
multiboot /kernel start=--vga logtoserial=1 root=/dev/ram0
load_modules
module /mod/debug_shell.ko
load_ramdisk
set gfxpayload=text
boot
}
configfile /boot/grub/menus.cfg

View File

@ -0,0 +1,86 @@
set_theme
submenu 'Live CD' {
multiboot /kernel vid=${t_driver},${t_resolution} start=live-welcome root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
submenu 'Normal ToaruOS boot - boots to a graphical login screen' {
multiboot /kernel vid=${t_driver},${t_resolution} root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
submenu 'Graphical terminal - boots to a terminal with a traditional login prompt ' {
multiboot /kernel vid=${t_driver},${t_resolution} start=--single root=/dev/ram0
load_modules
load_ramdisk
set_vidmode
boot
}
submenu 'VGA console with serial debugging - disables graphical boot, loads the serial debug shell' {
multiboot /kernel start=--vga logtoserial=1 root=/dev/ram0
load_modules
module /mod/debug_shell.ko
load_ramdisk
set gfxpayload=text
boot
}
submenu 'Advanced graphics configuration options...' {
set_theme
menuentry '800x600' {
set t_resolution=800,600
set g_resolution=800x600
export t_resolution
export g_resolution
configfile /boot/grub/menus.cfg
}
menuentry '1024x768 (default)' {
set t_resolution=1024,768
set g_resolution=1024x768
export t_resolution
export g_resolution
configfile /boot/grub/menus.cfg
}
menuentry '1280x720' {
set t_resolution=1280,720
set g_resolution=1280x720
export t_resolution
export g_resolution
configfile /boot/grub/menus.cfg
}
menuentry '1920x1080' {
set t_resolution=1920,1080
set g_resolution=1920x1080
export t_resolution
export g_resolution
configfile /boot/grub/menus.cfg
}
menuentry 'Custom...' {
echo -n "Width: "
read _w
echo
echo -n "Height: "
read _h
set t_resolution=${_w},${_h}
set g_resolution=${_w}x${_h}
export t_resolution
export g_resolution
configfile /boot/grub/menus.cfg
}
menuentry 'Use QEMU Driver' {
set t_driver=qemu
export t_driver
configfile /boot/grub/menus.cfg
}
menuentry 'Use Preset LFB Driver (Default)' {
set t_driver=preset
export t_driver
configfile /boot/grub/menus.cfg
}
}

View File

@ -14,42 +14,42 @@ desktop-color: "#000000"
}
+ label {
top = 40%
top = 60%
width = 100%
align = center
color = #fff
text = "Requires a PS/2 keyboard + mouse and at least 256MB of RAM."
}
+ label {
top = 43%
top = 63%
width = 100%
align = center
color = #fff
text = "Use alt+mouse1 to drag windows, alt+f10 to fullscreen."
}
+ label {
top = 46%
top = 66%
width = 100%
align = center
color = #fff
text = "The default user is 'local' with password 'local'."
}
+ label {
top = 49%
top = 69%
width = 100%
align = center
color = #fff
text = "If video fails, your GPU may not support the necessary 1024x768x32bpp mode."
}
+ label {
top = 57%
top = 77%
width = 100%
align = center
color = #fff
text = "ToaruOS is free software, released under the NCSA/University of Illinois License"
}
+ label {
top = 60%
top = 80%
width = 100%
align = center
color = #fff
@ -72,7 +72,7 @@ desktop-color: "#000000"
id = "__timeout__"
left = 15%
width = 70%
top = 73%
top = 90%
height = 12
show_text = true
text_color = "255, 255, 255"