big-img, chainload self
This commit is contained in:
13
grub/Makefile
Normal file
13
grub/Makefile
Normal 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 '$<'
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user