Skip to content

Commit 4e635cd

Browse files
committed
DRAFT: use grub2 for bios boot
1 parent 92f5286 commit 4e635cd

File tree

16 files changed

+412
-14
lines changed

16 files changed

+412
-14
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
title-text: ""
2+
title-color: "#FFF"
3+
desktop-image: "black.png"
4+
5+
+ image {
6+
file = "logo.png"
7+
left = 4%
8+
top = 4%
9+
}
10+
+ boot_menu {
11+
left = 4%+90
12+
width = 92%-180
13+
top = 25%
14+
height = 55%
15+
item_color = #FFF
16+
selected_item_color = #000
17+
item_spacing = 4
18+
item_padding = 10
19+
item_height = 20
20+
menu_pixmap_style = "menu_*.png"
21+
item_pixmap_style = "item_*.png"
22+
selected_item_pixmap_style = "sel_*.png"
23+
item_icon_space = 0
24+
icon_width = 0
25+
icon_height = 0
26+
scrollbar_frame = "scbf_*.png"
27+
scrollbar_thumb = "scbt_*.png"
28+
scrollbar_width = 2
29+
}
30+
+ vbox {
31+
left = 4%+100
32+
width = 80%
33+
top = 90%
34+
+ label {text = "Press ENTER to boot" color = "white" align = "left" }
35+
+ label {text = "Press E to edit menu entry" color = "white" align = "left" }
36+
+ label {text = "Press C to enter the GRUB commandline" color = "white" }
37+
}
38+
+ progress_bar {
39+
id = "__timeout__"
40+
top = 90%+26
41+
left = 96%-300
42+
width = 190
43+
height = 16
44+
text_color = #000
45+
fg_color = "#F47820"
46+
bg_color = #FFF
47+
border_color = #000
48+
#border_color = "#F47820"
49+
text = "@TIMEOUT_NOTIFICATION_MIDDLE@"
50+
}

config/media-files/GRMLBASE/boot/grub/grub.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if [ -f /boot/grub/addons.cfg ] ; then
1919
source "/boot/grub/addons.cfg"
2020
fi
2121

22+
if [ -f /boot/grub/help.cfg ] ; then
23+
source "/boot/grub/help.cfg"
24+
fi
25+
2226
if [ "${grub_platform}" == "efi" ] ; then
2327
menuentry "UEFI Firmware Settings" {
2428
fwsetup

config/media-files/GRMLBASE/boot/grub/header.cfg

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,72 @@
11
set default=0
22
set timeout=20
33

4+
function load_video {
5+
insmod efi_gop
6+
insmod efi_uga
7+
insmod vbe
8+
insmod vga
9+
insmod video_bochs
10+
insmod video_cirrus
11+
}
12+
13+
# Try graphics on both EFI and BIOS, but with simpler settings for BIOS
414
if loadfont /boot/grub/unicode.pf2 ; then
515
insmod png
6-
set gfxmode=auto
16+
load_video
717
insmod gfxterm
18+
19+
if [ "${grub_platform}" = "efi" ] ; then
20+
# EFI: use auto mode for best resolution
21+
set gfxmode=auto
22+
else
23+
# BIOS: use specific lower resolution for better VBE compatibility
24+
# Try 640x480, fallback to 800x600, then text mode
25+
set gfxmode=640x480,800x600,1024x768,auto
26+
set gfxpayload=keep
27+
fi
28+
829
terminal_output gfxterm
930
fi
1031

11-
if [ "${grml_secureboot}" = "true" ] ; then
12-
if [ -f /boot/grub/grml-theme/sb-theme.txt ] ; then
13-
set theme=/boot/grub/grml-theme/sb-theme.txt
32+
if [ "${grub_platform}" == "efi" ] ; then
33+
if [ "${grml_secureboot}" = "true" ] ; then
34+
if [ -f /boot/grub/grml-theme/sb-theme.txt ] ; then
35+
set theme=/boot/grub/grml-theme/sb-theme.txt
36+
export theme
37+
else
38+
set menu_color_normal=white/black
39+
set menu_color_highlight=black/orange
40+
export menu_color_normal
41+
export menu_color_highlight
42+
fi
43+
elif [ -f /boot/grub/grml-theme/theme.txt ] ; then
44+
set theme=/boot/grub/grml-theme/theme.txt
1445
export theme
1546
else
1647
set menu_color_normal=white/black
17-
set menu_color_highlight=black/orange
48+
set menu_color_highlight=black/yellow
1849
export menu_color_normal
1950
export menu_color_highlight
2051
fi
21-
elif [ -f /boot/grub/grml-theme/theme.txt ] ; then
22-
set theme=/boot/grub/grml-theme/theme.txt
23-
export theme
2452
else
25-
set menu_color_normal=white/black
26-
set menu_color_highlight=black/yellow
27-
export menu_color_normal
28-
export menu_color_highlight
53+
set default=2
54+
menuentry "LEGACY BOOT" {
55+
true
56+
}
57+
menuentry "" {
58+
true
59+
}
60+
61+
if [ -f /boot/grub/grml-theme/bios-theme.txt ] ; then
62+
set theme=/boot/grub/grml-theme/bios-theme.txt
63+
export theme
64+
else
65+
set menu_color_normal=white/black
66+
set menu_color_highlight=black/yellow
67+
export menu_color_normal
68+
export menu_color_highlight
69+
fi
2970
fi
3071

3172
if [ ${iso_path} ] ; then
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
## Help & Information submenu
2+
submenu "Help & Information ⇢" {
3+
menuentry "Welcome and Overview" {
4+
cat /boot/grub/help/f1.txt
5+
echo ""
6+
echo "Press any key to return to the menu..."
7+
read
8+
}
9+
10+
menuentry "Help Topics Overview" {
11+
cat /boot/grub/help/f2.txt
12+
echo ""
13+
echo "Press any key to return to the menu..."
14+
read
15+
}
16+
17+
menuentry "Main Boot Options" {
18+
cat /boot/grub/help/f3.txt
19+
echo ""
20+
echo "Press any key to return to the menu..."
21+
read
22+
}
23+
24+
menuentry "Cheatcodes Part 1" {
25+
cat /boot/grub/help/f4.txt
26+
echo ""
27+
echo "Press any key to return to the menu..."
28+
read
29+
}
30+
31+
menuentry "Cheatcodes Part 2" {
32+
cat /boot/grub/help/f5.txt
33+
echo ""
34+
echo "Press any key to return to the menu..."
35+
read
36+
}
37+
38+
menuentry "Troubleshooting" {
39+
cat /boot/grub/help/f6.txt
40+
echo ""
41+
echo "Press any key to return to the menu..."
42+
read
43+
}
44+
45+
menuentry "Kernel Cheatcodes" {
46+
cat /boot/grub/help/f7.txt
47+
echo ""
48+
echo "Press any key to return to the menu..."
49+
read
50+
}
51+
52+
menuentry "Configuration Options" {
53+
cat /boot/grub/help/f8.txt
54+
echo ""
55+
echo "Press any key to return to the menu..."
56+
read
57+
}
58+
59+
menuentry "Contact & Support" {
60+
cat /boot/grub/help/f10.txt
61+
echo ""
62+
echo "Press any key to return to the menu..."
63+
read
64+
}
65+
66+
# separator entry
67+
menuentry "" {
68+
true
69+
}
70+
71+
menuentry "< Back to main menu" {
72+
true
73+
}
74+
}
75+
# EOF
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
Further information regarding the Grml live system and available boot
4+
options can be found on pages 2 to 10, reachable via the Help menu.
5+
6+
Note that the options on page 3 (F3) have to be used as *main* boot
7+
options at the bootprompt as they are aliases for further options.
8+
The options mentioned on pages 4-9 have to be used as options after the
9+
main boot option. If you don't need a special main option just use the
10+
default one being 'grml' (which is used in several examples as well).
11+
Example:
12+
13+
grml vga=normal -> disables framebuffer in the default boot mode
14+
forensic vga=normal -> disables framebuffer in the forensic boot mode
15+
16+
Booting with just "vga=normal" won't work as well as "grml forensic"
17+
won't do what you'd expect.
18+
19+
Further information available via the Help menu.
20+
21+
To return to the main boot menu, press ESC or select the back option.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
Problems with Grml?
4+
5+
If you can't boot the Grml system, don't despair! The Grml team is ready
6+
to help you! We are especially interested in hearing about startup
7+
problems, because in general they don't happen to only one person.
8+
We've either already heard about your particular problem and can
9+
dispense a quick fix, or we would like to hear about it and work through
10+
it with you, and the next user who comes up with the same problem will
11+
profit from your experience!
12+
13+
Contact us:
14+
Web: https://grml.org/contact/
15+
IRC: #grml on irc.oftc.net
16+
Mail: contact (at) grml.org
17+
Bugs: https://grml.org/bugs/
18+
19+
See the FAQ for more information:
20+
https://grml.org/faq/
21+
22+
Thank you for helping us to improve Grml!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
Overview of bootsplashes on Grml (Help Menu)
4+
5+
F1 main bootsplash
6+
F2 this overview page
7+
F3 main Grml bootoptions
8+
F4 main cheatcodes for Grml [1/2]
9+
F5 main cheatcodes for Grml [2/2]
10+
F6 troubleshooting on Grml
11+
F7 kernel cheatcodes
12+
F8 Grml configuration options
13+
F10 problems with Grml? _
14+
__ _ _ __ _ __ ___ | | ___ _ __ __ _
15+
/ _` | '__| '_ ` _ \| | / _ \| '__/ _` |
16+
| (_| | | | | | | | | || (_) | | | (_| |
17+
\__, |_| |_| |_| |_|_(_)___/|_| \__, |
18+
|___/ |___/
19+
20+
Problems? Some more information is accessible via the Help menu.
21+
See F6 for troubleshooting information.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
The following options can be used at the boot:-prompt:
4+
5+
grml [options, list via F4-F10] boot Grml default
6+
grml2ram copy medium to RAM and run from there (see F5 for alternatives)
7+
memtest memtest86+ (memory test program)
8+
fb1280x1024, fb1024x768 or fb800x600 use framebuffer mode (e.g. notebooks)
9+
nofb disable framebuffer mode
10+
hd / hd1 / hd2 / hd3 / floppy boot from (1st/2nd/..) harddisk / floppy
11+
debug [ break=live-bottom ] get interactive shells during startup process
12+
forensic do not touch any harddisks during hardware recognition
13+
serial activate serial console
14+
grub boot GRand Unified Bootloader (GRUB)
15+
hdt boot Hardware Detection Tool
16+
17+
18+
19+
A list with all supported boot options can be found on the CD at
20+
/run/live/medium/grml/*/grml-cheatcodes.txt
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
The following options can be used at the boot:-prompt. [1/2]
4+
5+
grml blacklist=firewire-core disable new (Juju) firewire stack
6+
grml blacklist=ieee1394 disable old firewire stack
7+
grml blacklist=ipw3945,prism54 disable specified drivers
8+
grml blacklist=module1[,module2] disable loading of specified module, e.g.:
9+
grml blacklist=usbcore disable USB drivers
10+
grml debnet search local partitions for file /etc/network/interfaces,
11+
copy /etc/network then to local system and restart networking
12+
grml localtime assume Hardware Clock (RTC) is in localtime
13+
grml tz=Europe/Vienna set timezone (default: tz=UTC)
14+
grml home=/dev/sda1 use specified device as home directory
15+
grml keyboard=de set keyboard
16+
grml lang=[at|ch|da|de|es|fr|it|...|us] set keyboard + language
17+
grml myconfig=/dev/fd0 load configuration from specified device
18+
grml noautoconfig disable searching for device labeled GRMLCFG
19+
grml nodhcp disable searching for network setup via DHCP
20+
grml noeject noprompt do not eject CD after halt / do not prompt for it
21+
grml nofstab / nolabel disable generating of /etc/fstab / use of fs-labels
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Grml - Linux for sysadmins and users of texttools
2+
3+
The following options can be used at the boot:-prompt. [2/2]
4+
5+
grml nolvm disable search for Logical Volumes (LVM)
6+
grml noquick disable grml-quickconfig startup script
7+
grml noswraid disable search for software RAID devices
8+
grml noudev disable startup of udev (disables module loading)
9+
grml services=foo1[,foo2] start specified service(s) [/etc/init.d/name foo1]
10+
grml ssh=password set password for user grml + root and start ssh-server
11+
grml startx[=windowmanager] autostart X.org using grml-x
12+
grml swap activate present swap partitions
13+
grml testcd check CD data integrity and md5sums
14+
grml toram / grml2ram copy the whole CD/media to RAM and run from there
15+
grml toram=%SQUASHFS_NAME% copy only specified squashfs file
16+
to RAM and run from there
17+
grml vga=ask / vga=791 prompt for framebuffer menu / set options
18+
19+
Supported boot options: /run/live/medium/grml/*/grml-cheatcodes.txt

0 commit comments

Comments
 (0)