Creating GRUB2 images without grub2-mkrescue
Creating GRUB2 images without grub2-mkrescue
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?
- xenos
- Member
- Posts: 1121
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: Creating GRUB2 images without grub2-mkrescue
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:
Of course you may wish to use different modules or need to change some paths.
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/