diff options
author | Daniel Baumann <daniel@debian.org> | 2009-10-28 13:15:30 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:48 +0100 |
commit | 2e2de4361d4549021ab6d62226257d68b88d25fe (patch) | |
tree | 78e27f41d6a31cd9b95410504ef143d75e3a3e9e /helpers/lh_binary_iso | |
parent | 7523992b6a479359b5457b95568a376b3a2ef8e4 (diff) | |
download | vyos-live-build-2e2de4361d4549021ab6d62226257d68b88d25fe.tar.gz vyos-live-build-2e2de4361d4549021ab6d62226257d68b88d25fe.zip |
Merging initial and experimental grub2 support from Luigi Capriotti <l.capriotti@xbmc.org>.
Outstanding issues: doesn't work chrooted yet, lh_binary_iso binary.sh modifications probably should be done at lh_binary_grub2.
Diffstat (limited to 'helpers/lh_binary_iso')
-rwxr-xr-x | helpers/lh_binary_iso | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/helpers/lh_binary_iso b/helpers/lh_binary_iso index 0b8bb5540..d9f390255 100755 --- a/helpers/lh_binary_iso +++ b/helpers/lh_binary_iso @@ -99,6 +99,12 @@ case "${LH_BOOTLOADER}" in GENISOIMAGE_EXCLUDE="boot/grub/stage2_eltorito" ;; + grub2) + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/grub/grub_eltorito -J" + GENISOIMAGE_EXCLUDE="boot/grub/grub_eltorito" + ;; + silo) GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -G boot/isofs.b -B ..." GENISOIMAGE_EXCLUDE="boot/isofs.b" @@ -132,7 +138,40 @@ then fi fi +if [ "${LH_BOOTLOADER}" = "grub2" ] +then + cat > binary.sh << EOF +#!/bin/sh + +input_dir=/usr/lib/grub/i386-pc + +# build core.img +core_img=\$(mktemp) +grub-mkimage -d ${input_dir} -o ${core_img} biosdisk iso9660 + +# build grub_eltorito image +cat ${input_dir}/cdboot.img ${core_img} > binary/boot/grub/grub_eltorito + +rm -f ${core_img} + +for file in ${input_dir}/*.mod ${input_dir}/efiemu??.o \ + ${input_dir}/command.lst ${input_dir}/moddep.lst ${input_dir}/fs.lst \ + ${input_dir}/handler.lst ${input_dir}/parttool.lst +do + if test -f "$file" + then + cp -f "$file" binary/boot/grub + fi +done +EOF + +else + echo "#!/bin/sh" > binary.sh +fi + +cat >> binary.sh << EOF + genisoimage ${GENISOIMAGE_OPTIONS} -o binary.iso binary EOF |