Code: Select all
include "lib/gfx.lib"
include "lib/bootmenu.lib"
$TIMEOUT = 20000; rem menu time out in milliseconds
$ROOT = "hd0p0:"
$FILESYS = "ext2"
include "bootlist.scr"
Code: Select all
rem all these are from gfx.lib
$screen = setscreen 640, 480, 32; rem screen mode 640x480 with 32bit color
$background = loadimage "backgnd.png"
blit screen, background
rem menuitem is from bootmenu.lib
menuitem "venom", venomOS; rem menu item label, function to run when selected
menuitem "linux", linux
menuitem "windows", windows
function venom
{
$kernel = load "/sys/boot/venom.sys";
load "/sys/boot/rd0.sys", 0x200000; rem load file, at memory 0x200000
call $kernel
}
function linux
{
$kernel = load "hd0p1:/boot/vmlinuz"
load "hd0p1:/boot/initrd.img"
call $kernel
}
function windows
{
$bootsect = load "hd0p2:", 0x7C00, 512; rem chain load partition 2 boot sector (512 bytes) at 0x7C00
call $bootsect
}