Створення флешки на базі grub4dos для завантаження всякої єрунди.
В результаті матимо файлову структуру типу такої. Тут grldr - сам завантажувач, *.lst - конфігураційні файли з вибором що завантажувати.
Зразок файлів конфігурації:
menu.lst
timeout 30
gfxmenu /gfx/Reanimator
default 0
title Continue boot from HDD
find --set-root --ignore-floppies --ignore-cd /ntldr || find --set-root --ignore-floppies --ignore-cd /bootmgr
map (hd0) (hd1)
map (hd1) (hd0)
map --rehook
find --set-root --ignore-floppies --ignore-cd /ntldr || find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /ntldr || chainloader /bootmgr
#title Continue boot Win 2K3-
#find --set-root --ignore-floppies --ignore-cd /ntldr
#map (hd0) (hd1)
#map (hd1) (hd0)
#map --rehook
#find --set-root --ignore-floppies --ignore-cd /ntldr
#chainloader /ntldr
#title Continue boot Win Vista+
#find --set-root --ignore-floppies --ignore-cd /bootmgr
#map (hd0) (hd1)
#map (hd1) (hd0)
#map --rehook
#find --set-root --ignore-floppies --ignore-cd /bootmgr
#chainloader /bootmgr
title Live OS
lock
find --set-root /submenu_1.lst
configfile /submenu_1.lst
title Install OS
lock
find --set-root /submenu_3.lst
configfile /submenu_3.lst
title Hardware utilities
lock
find --set-root /submenu_2.lst
configfile /submenu_2.lst
title Shutdown
halt
title Reboot
reboot
submenu_1.lst
timeout 30
gfxmenu /gfx/LIVE
default 0
title Run AVG Rescue CD
# 120.120823
map /iso/avg_120.iso (hd32)
map --hook
chainloader (hd32)
boot
title Run AntiSMS
map /iso/AntiSMS.iso (0xff)
map --hook
chainloader (0xff)/BOOT/WINPELDR.BIN
title Run MSDaRT 5.0 WinXP SP3 x86
find --set-root /iso/msdart_5.0_x86.iso
map --mem /iso/FiraDisk.img (fd0)
# map --mem /iso/firadisk.gz (fd0)
map --mem /iso/msdart_5.0_x86.iso (hd32)
map --hook
chainloader (hd32)
title Run MSDaRT 7.0 Win7 x86
find --set-root /iso/msdart_7.0_x86.iso
map /iso/msdart_7.0_x86.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
title Run MSDaRT 7.0 Win7 x64
find --set-root /iso/msdart_7.0_x64.iso
map /iso/msdart_7.0_x64.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
title Run Active@ Boot Disk
#7.1
find --set-root /iso/activebootdisk.iso
map /iso/activebootdisk.iso (hd32)
map --hook
root (hd32)
chainloader (hd32)
title Run Puppy Linux
# 5.7.1
kernel /puppy/vmlinuz
initrd /puppy/initrd.gz
title Return to main menu
lock
find --set-root /menu.lst
configfile /menu.lst
submenu_2.lst
timeout 30
gfxmenu /gfx/Hardware
default 0
title Run Memtest86+ 4.2
map /iso/mt420.iso (hd32)
map --hook
chainloader (hd32)
boot
title Run Victoria 3.5
map /iso/vcr35r.iso (hd32)
map --hook
chainloader (hd32)
boot
title Return to main menu
lock
find --set-root /menu.lst
configfile /menu.lst
submenu_3.lst
Додав варіант для 16.04 EFI, там трохи є різниця.
timeout 30
gfxmenu /gfx/OS
default 0
title Install Ubuntu 10.04 x86
find --set-root /iso/ubuntu-10.04.4-i386-zf.iso
map /iso/ubuntu-10.04.4-i386-zf.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/iso/ubuntu-10.04.4-i386-zf.iso splash
initrd /casper/initrd.lz
title Install Ubuntu 12.04 amd64
find --set-root /iso/ubuntu-12.04-amd64-zf.iso
map /iso/ubuntu-12.04-amd64-zf.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/iso/ubuntu-12.04-amd64-zf.iso splash
initrd /casper/initrd.lz
title Install Ubuntu 16.04 efi
find --set-root /iso/ubuntu.iso
map --mem /iso/ubuntu.iso (0xff) || map --heads=0 --sectors-per-track=0 /iso/ubuntu.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/iso/ubuntu.iso splash
initrd /casper/initrd.lz
title Start Install Windows XP
map --mem (md)0x800+4 (99)
map --mem /iso/FiraDisk.img (fd0)
map --mem /iso/FiraDisk.img (fd1)
map /iso/WinXp.iso (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/iso/WinXP.iso;\n\0
chainloader (0xff)/I386/SETUPLDR.BIN
title Continue Install Windows XP
map --mem (md)0x800+4 (99)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/iso/WinXP.iso;\n\0
chainloader (hd0)+1
title Install Win7 Pro SP1 x86 or x64 EN
root (hd0,0)
chainloader /bootmgr
boot
title Return to main menu
lock
find --set-root /menu.lst
configfile /menu.lst
submenu_4.lst
timeout 30
gfxmenu /gfx/HDD
default 0
title Backup & Recovery 11.5.37687 x86
kernel /iso/abr/abrx86/abrx86.krn quiet vga=788
initrd /iso/abr/abrx86/abrx86.fs
title Backup & Recovery 11.5.37687 x64
kernel /iso/abr/abrx64/abrx64.krn quiet vga=788
initrd /iso/abr/abrx64/abrx64.fs
title Disk Director 12.0.3223
kernel /iso/add/addx86/add12x86.krn quiet vga=788
initrd /iso/add/addx86/add12x86.fs
title True Image 2015 18.0.5539
kernel /iso/ati/ati2015.krn quiet vga=788
initrd /iso/ati/ati2015.fs
title Return to main menu
lock
find --set-root /menu.lst
configfile /menu.lst