diff options
author | James Meyer <jams@linhes.org> | 2010-12-04 23:44:45 (GMT) |
---|---|---|
committer | James Meyer <jams@linhes.org> | 2010-12-04 23:44:51 (GMT) |
commit | f51fb708846d13222bd97b3f760eb3be902c0be0 (patch) | |
tree | ad25ff81828f12cb7da86384863e163cb4e001f2 /build_tools/larch7/larch0/buildscripts/larch-mbr-grub | |
parent | 4384efe238cdfeac86fae0d8e1097a409350f8c6 (diff) | |
download | linhes_dev-f51fb708846d13222bd97b3f760eb3be902c0be0.zip |
remove old versions of larch 6 and 7
Diffstat (limited to 'build_tools/larch7/larch0/buildscripts/larch-mbr-grub')
-rwxr-xr-x | build_tools/larch7/larch0/buildscripts/larch-mbr-grub | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/build_tools/larch7/larch0/buildscripts/larch-mbr-grub b/build_tools/larch7/larch0/buildscripts/larch-mbr-grub deleted file mode 100755 index 7197ef2..0000000 --- a/build_tools/larch7/larch0/buildscripts/larch-mbr-grub +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# -# larch-mbr-grub - Set up a grub boot -# -#2009.08.12 - - -# $1: path to system to be larchified ("/" if running system) -# $2: larch partition - -INSTLDIR="$1" -if [ "${INSTLDIR}" = "/" ]; then - INSTLDIR="" -fi -DEVICE="$2" - -dev=${DEVICE:0:8} -part=${DEVICE:8} - -# Convert the device and partion to grub syntax -grubdevice () -{ - ## The contents of DEVICE.map look something like this: - #(fd0) /dev/fd0 - #(hd0) /dev/hda - #(hd1) /dev/sda - gdev="$( cat ${INSTLDIR}${dmap} | grep "${dev}" | cut -f1 | tr -d "()" )" - gpart=$(( ${part} - 1 )) - echo "#Installing GRUB to (${gdev}), root (${gdev},${gpart})" -} - -dmap=/tmp/DEVICE.map -rm -f ${INSTLDIR}${dmap} -if [ -n "${INSTLDIR}" ]; then - # First try to get a device mapping - mount --bind /dev ${INSTLDIR}/dev - echo "quit" | chroot ${INSTLDIR} grub --no-floppy --device-map=${dmap} --batch - grubdevice - # Now actually install grub - # As far as I can tell, the extra options to grub are not needed here - chroot ${INSTLDIR} grub --batch <<EOT -root (${gdev},${gpart}) -setup (${gdev}) -quit -EOT - umount ${INSTLDIR}/dev -else - # First try to get a device mapping - echo "quit" | grub --no-floppy --device-map=${dmap} --batch - grubdevice - # Now actually install grub - # As far as I can tell, the extra options to grub are not needed here - grub --batch <<EOT -root (${gdev},${gpart}) -setup (${gdev}) -quit -EOT -fi -rm -f ${INSTLDIR}${dmap} - - - - |