big-img, chainload self

This commit is contained in:
Ciro Santilli
2015-09-18 11:35:08 +02:00
parent 793df24519
commit 7dc6e56e16
10 changed files with 147 additions and 7 deletions

13
grub/Makefile Normal file
View File

@@ -0,0 +1,13 @@
.POSIX:
.PHONY: clean run
main.img:
make -C '../mbrs' && cp '../bios_hello_world.img.sym' 'iso/boot/main.img'
grub-mkrescue -o '$@' iso
clean:
rm -f iso/boot/*.img *.img
run: main.img
qemu-system-i386 -hda '$<'

View File

@@ -11,3 +11,5 @@ This example uses a file, but the most common way to use it is with:
chainloader +1
which uses the first sector of some partition instead of a file.
TODO: why does it fail for hybrid ISO images? <http://superuser.com/questions/154134/grub-how-to-boot-into-iso-partition#comment1337357_154271>

View File

@@ -1,5 +1,7 @@
set timeout=0
set default="0"
menuentry "main" {
menuentry "hello-world" {
chainloader /boot/main.img
}
# Reload ourselves again.
menuentry "self +1" {
chainloader +1
}