Page 1 of 1

Creating GRUB2 images without grub2-mkrescue

Posted: Mon Jan 06, 2014 9:42 am
by riparoony
Is it required to use `grub2-mkrescue` to create images with GRUB2? I remember their being images for GRUB classic that I used to use, but I can't seem to find anything similar for GRUB2. Is there any way to package GRUB2 images on an ISO using something like mkisofs?

Re: Creating GRUB2 images without grub2-mkrescue

Posted: Mon Jan 06, 2014 11:33 am
by xenos
Yes, you can use grub-mkimage and genisoimage for this. I use the ones I have on my Ubuntu anyway, with the following command line:

Code: Select all

grub-mkimage -o /tmp/core.img -O i386-pc biosdisk iso9660 multiboot configfile
cat /usr/lib/grub/i386-pc/cdboot.img /tmp/core.img > iso/grub2/eltorito.img
rm /tmp/core.img
genisoimage -R -f -b boot/grub/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table -o run/boot.iso -graft-points nos/=iso/nos/ boot/grub/=iso/grub2/
Of course you may wish to use different modules or need to change some paths.

Re: Creating GRUB2 images without grub2-mkrescue

Posted: Mon Jan 06, 2014 5:53 pm
by riparoony
That works, thanks.