summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-03-02 21:10:29 +0000
committerMiles Bader <miles@gnu.org>1997-03-02 21:10:29 +0000
commit52141c8b471f3d1b031338cfc4d752e67f4a4993 (patch)
treefae33ddc48a1fdd9b1eff14d60d17027dfc61d15
parent113280967bf6bf106ff5700d4cd0a31de0cfdf05 (diff)
Deal with current device naming scheme.
-rw-r--r--release/INSTALL-GRUB-MBR15
1 files changed, 8 insertions, 7 deletions
diff --git a/release/INSTALL-GRUB-MBR b/release/INSTALL-GRUB-MBR
index ce15ea77..fa4e2c6e 100644
--- a/release/INSTALL-GRUB-MBR
+++ b/release/INSTALL-GRUB-MBR
@@ -3,6 +3,7 @@
# existing MBR.
DEV="$1"
+STAGE1=/boot/grub/stage1
if [ ! "$DEV" -o ! -w "$DEV" ]; then
echo 2>&1 "Usage: $0 DEVICE"
@@ -10,7 +11,7 @@ if [ ! "$DEV" -o ! -w "$DEV" ]; then
fi
case "$DEV" in
- *r?d[0-9])
+ *d[0-9])
;;
*)
echo "The device $DEV doesn't seem to be a whole-disk raw device; continue? [n] "
@@ -28,13 +29,13 @@ esac
cd /tmp
-dd if="$DEV" of=mbr bs=512 count=1 \
-&& cp /boot/grub/stage1_ffs stage1 \
-&& dd if=mbr of=stage1 conv=notrunc bs=1 seek=446 skip=446 count=64 \
-&& dd if=stage1 of="$DEV" bs=512 count=1 \
+dd if="$DEV" of=,mbr bs=512 count=1 \
+&& /bin/cp $STAGE1 ,stage1 \
+&& dd if=,mbr of=,stage1 conv=notrunc bs=1 seek=446 skip=446 count=64 \
+&& dd if=,stage1 of="$DEV" bs=512 count=1 \
|| { echo 2>&1 "$0: Install failed!" ; exit 5 ; }
-rm mbr stage1
+rm ,mbr ,stage1
-echo "$0: /boot/grub/stage1_ffs installed in MBR"
+echo "$0: $STAGE1 installed in MBR"
echo "$0: Don't forget to use the grub \`install=' command to install stage2"