--- /dev/null
+#!/bin/bash
+# Filename: create-grub-dir.sh
+# Purpose: generate core.img and according files for templates/boot/grub/
+# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports: see http://grml.org/bugs/
+# License: This file is licensed under the GPL v2 or any later version.
+# Latest change: Thu Mar 11 14:25:15 CET 2010 [mika]
+################################################################################
+
+set -e
+
+if [ -z "$1" ] ; then
+ echo "Usage: $0 <grub_package.deb>">&2
+ echo "Usage example: $0 grub-pc_1.98-1_i386.deb">&2
+ exit 1
+fi
+
+if [ -d grub ] ; then
+ echo "Directory 'grub' exists in current working directory already, will not continue.">&2
+ exit 1
+fi
+
+GRUB="$1"
+oldpwd=$(pwd)
+
+if ! [ -f "$GRUB" ] ; then
+ wget http://ftp.de.debian.org/debian/pool/main/g/grub2/"$GRUB"
+fi
+
+if ! [ -f "$GRUB" ] ; then
+ echo "Error reading $GRUB - exiting.">&2
+ exit 1
+fi
+
+GRUBDIR=$(mktemp -d)
+cd "$GRUBDIR"
+
+mkdir -p grub
+
+ar x "${oldpwd}"/"$GRUB"
+tar xzf data.tar.gz
+./usr/bin/grub-mkimage -d usr/lib/grub/i386-pc -o core.img biosdisk iso9660
+
+for a in usr/lib/grub/i386-pc/{*.mod,efiemu??.o,command.lst,moddep.lst,fs.lst,handler.lst,parttool.lst}; do \
+ [[ -e $a ]] && cp $a grub/
+done
+
+mv core.img grub/
+
+cd "$oldpwd"
+mv "${GRUBDIR}"/grub .
+rm -rf "$GRUBDIR"
+
+echo "Generated new grub boot directory 'grub'."
+
+## END OF FILE #################################################################
*915resolution: 915resolution
*acpi: acpi
+*background_image: gfxterm
*cat: cat
*cpuid: cpuid
*drivemap: drivemap
*echo: echo
-*efiemu_pnvram: efiemu
-*freebsd: bsd
+*functional_test: functional_test
+*gettext: gettext
*halt: halt
+*hashsum: hashsum
*hdparm: hdparm
*hello: hello
*help: help
*hexdump: hexdump
*keystatus: keystatus
+*kfreebsd: bsd
+*knetbsd: bsd
+*kopenbsd: bsd
*list_env: loadenv
*load_env: loadenv
*loopback: loopback
*ls: ls
-*netbsd: bsd
-*openbsd: bsd
+*lspci: lspci
+*md5sum: hashsum
*probe: probe
-*pxe: pxecmd
+*read_byte: memrw
+*read_dword: memrw
+*read_word: memrw
*save_env: loadenv
*search: search
*serial: serial
+*setpci: setpci
+*sha256sum: hashsum
+*sha512sum: hashsum
*sleep: sleep
+*xnu_splash: xnu
.: configfile
[: test
-background_image: gfxterm
badram: mmap
blocklist: blocklist
boot: boot
cat: minicmd
chainloader: chain
+clear: minicmd
cmp: cmp
configfile: configfile
crc: crc
efiemu_prepare: efiemu
efiemu_unload: efiemu
exit: minicmd
+export: normal
false: true
-freebsd_loadenv: bsd
-freebsd_module: bsd
-freebsd_module_elf: bsd
gptsync: gptsync
handler: handler
help: minicmd
initrd16: linux16
initrd: linux
+kfreebsd_loadenv: bsd
+kfreebsd_module: bsd
+kfreebsd_module_elf: bsd
linux16: linux16
linux: linux
loadfont: font
lsfonts: font
lsmmap: lsmmap
lsmod: minicmd
-lspci: lspci
module: multiboot
+module: multiboot2
+multiboot2: multiboot2
multiboot: multiboot
+normal: normal
+normal_exit: normal
parttool: parttool
password: password
+password_pbkdf2: password_pbkdf2
play: play
+pxe_unload: pxecmd
read: read
-read_byte: memrw
-read_dword: memrw
-read_word: memrw
reboot: reboot
rmmod: minicmd
root: minicmd
+search.file: search_fs_file
+search.fs_label: search_label
+search.fs_uuid: search_fs_uuid
source: configfile
-terminal_input: handler
-terminal_output: handler
+terminal_input: terminal
+terminal_output: terminal
terminfo: terminfo
test: test
true: true
write_byte: memrw
write_dword: memrw
write_word: memrw
-xnu_devtree: xnu
+xnu_devprop_load: xnu
+xnu_kernel64: xnu
xnu_kernel: xnu
xnu_kext: xnu
xnu_kextdir: xnu
xnu_mkext: xnu
xnu_ramdisk: xnu
xnu_resume: xnu
-xnu_splash: xnu
xnu_uuid: xnu_uuid
zfs-bootfs: zfsinfo
zfsinfo: zfsinfo
## grub2 configuration
set default=0
-set timeout=5
+set timeout=20
-if font (hd0,1)/boot/grub/ascii.pff ; then
+if loadfont /boot/grub/ascii.pf2 ; then
insmod png
set gfxmode=640x480
insmod gfxterm
insmod vbe
- terminal gfxterm
+ terminal_output gfxterm
fi
-if background_image (hd0,1)/boot/grub/grml.png ; then
+if background_image /boot/grub/grml.png ; then
set color_normal=black/black
set color_highlight=red/black
+ set menu_color_normal=black/black
+ set menu_color_highlight=black/yellow
else
set menu_color_normal=white/black
set menu_color_highlight=black/yellow
fi
menuentry "%GRML_NAME% - release %VERSION% (default)" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off vga=791 quiet boot=live bootid=%BOOTID% nomce
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off quiet boot=live bootid=%BOOTID% nomce
initrd /boot/%SHORT_NAME%/initrd.gz
}
}
menuentry "%GRML_NAME% - enable persistent mode" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 quiet persistent
+ set gfxpayload=1024x768x16,1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet persistent
initrd /boot/%SHORT_NAME%/initrd.gz
}
-menuentry "%GRML_NAME% - copy grml to RAM" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 quiet toram=%GRML_NAME%.squashfs
+menuentry "%GRML_NAME% - copy Grml to RAM" {
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet toram=%GRML_NAME%.squashfs
initrd /boot/%SHORT_NAME%/initrd.gz
}
menuentry "%GRML_NAME% - copy whole medium to RAM" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 quiet toram
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet toram
initrd /boot/%SHORT_NAME%/initrd.gz
}
menuentry "%GRML_NAME% - start X by default" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 quiet startx=wm-ng
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce quiet startx=wm-ng
initrd /boot/%SHORT_NAME%/initrd.gz
}
}
menuentry "%GRML_NAME% - forensic mode" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 readonly quiet nofstab noraid nolvm noautoconfig noswap raid=noautodetect
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce readonly quiet nofstab noraid nolvm noautoconfig noswap raid=noautodetect
initrd /boot/%SHORT_NAME%/initrd.gz
}
}
menuentry "%GRML_NAME% - debug mode" {
- linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce vga=791 initcall verbose debug=vc
+ set gfxpayload=1024x768
+ linux /boot/%SHORT_NAME%/linux26 apm=power-off boot=live bootid=%BOOTID% nomce initcall verbose debug=vc
initrd /boot/%SHORT_NAME%/initrd.gz
}
-parser.sh: sh
-reader.normal: normal
-terminal_input.at_keyboard: at_keyboard
-terminal_input.serial: serial
-terminal_input.usb_keyboard: usb_keyboard
-terminal_output.gfxterm: gfxterm
-terminal_output.serial: serial
-terminal_output.vga: vga
-terminal_output.vga_text: vga_text
+parser.grub: sh
+gcry_des: crypto
videotest: font video
loopback: extcmd
-memrw:
+memrw: extcmd
terminfo:
part_gpt:
+gcry_arcfour: crypto
read:
aout:
elf: gzio
vga_text:
-bsd: elf extcmd aout boot gzio mmap
+gcry_seed: crypto
+password_pbkdf2: crypto gcry_sha512 pbkdf2 normal
+bsd: elf extcmd aout boot video cpuid gzio mmap
reiserfs: fshelp
sfs: fshelp
915resolution: extcmd
+gfxmenu: trig bitmap_scale gfxterm font normal bitmap video
configfile: normal
-help: extcmd
+help: charset extcmd normal
jfs:
afs: fshelp
ohci: usb pci
+search_fs_file:
usb_keyboard: usb
vga: font
usbms: scsi usb
true:
affs: fshelp
iso9660: fshelp
-gfxterm: font bitmap video
+gfxterm: bitmap_scale font extcmd bitmap video
+functional_test: extcmd
xfs: fshelp
-sleep: extcmd
+sleep: extcmd normal
vbetest: vbe video
-pxecmd: pxe extcmd
+pxecmd: pxe
memdisk:
-fs_file:
+gcry_rijndael: crypto
+gcry_sha1: crypto
+gettext: normal gzio
cmp: gzio
befs_be: fshelp
+hashsum: crypto extcmd normal
halt: extcmd
usb:
+search_fs_uuid:
keystatus: extcmd
linux: normal boot video mmap
part_sun:
bufio:
handler:
cpuid: extcmd
+gcry_blowfish: crypto
hdparm: extcmd
test:
minicmd:
ata: scsi pci
gzio:
udf: fshelp
-xnu_uuid:
+terminal:
+xnu_uuid: gcry_md5
uhci: usb pci
+crypto:
raid:
+gcry_sha512: crypto
biosdisk:
-password: normal
+password: crypto normal
fshelp:
-efiemu: crc extcmd acpi
+efiemu: charset crc acpi
mmap: boot
-xnu: boot video bitmap efiemu gzio
+xnu: bitmap_scale charset extcmd boot bitmap video relocator efiemu gzio
zfsinfo: zfs
blocklist:
ext2: fshelp
drivemap: extcmd boot mmap
part_acorn:
-fs_uuid:
sh: normal
lsmmap:
bitmap:
ntfs: fshelp
-multiboot: elf boot gzio mmap
+multiboot: boot video relocator gzio mmap
vbe: video video_fb
+gcry_crc: crypto
png: bufio bitmap
jpeg: bufio bitmap
parttool: normal
cpio:
+gcry_rmd160: crypto
fat:
+charset:
zfs:
raid6rec: raid
+bitmap_scale: bitmap
loadenv: extcmd
datehook: datetime normal
probe: extcmd
hfs:
boot:
vbeinfo: vbe
+relocator:
acpi: extcmd gzio mmap
usbtest: usb
tga: bufio bitmap
dm_nv: raid
font: bufio video
raid5rec: raid
+example_functional_test: functional_test
video:
crc:
+gcry_cast5: crypto
hfsplus: fshelp
extcmd:
+gcry_whirlpool: crypto
+gcry_tiger: crypto
pxe: bufio
video_fb: video
-search: extcmd
-lspci: pci
+search: search_fs_uuid search_fs_file extcmd search_label
+lspci: extcmd pci
afs_be: fshelp
+gcry_twofish: crypto
msdospart: parttool
hexdump: extcmd gzio
part_apple:
ata_pthru: ata
+gcry_sha256: crypto
+pbkdf2: crypto
date: datetime normal
ls: extcmd normal
ntfscomp: ntfs
hello: extcmd
scsi:
-normal: boot
+normal: terminal crypto charset boot
cat: gzio
-linux16: boot mmap
+linux16: video boot mmap
lvm:
ufs1:
-chain: boot
+chain: video boot
+search_label:
gptsync:
ufs2:
+setpci: extcmd pci
+gcry_rfc2268: crypto
+multiboot2: boot video relocator gzio mmap
part_amiga:
play:
echo: extcmd
minix:
+gcry_serpent: crypto
+gcry_md4: crypto
+gcry_md5: crypto
+gcry_camellia: crypto
part_msdos:
at_keyboard: