diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-12 19:25:49 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-12 19:26:36 +0000 |
commit | 494c77df159bc792f8673e7f87f859e5ac2ee135 (patch) | |
tree | 6c0d279ad73c54e1d2d2fe3463d32d373a42f903 | |
parent | 78c57f4e1f532ef7daf6c21ceec5f15d9b796c8a (diff) | |
download | alpine-conf-494c77df159bc792f8673e7f87f859e5ac2ee135.zip |
setup-disk: rename bootdisk to mbrdisk
It is used for installing MBR and is only needed if there exist
a partition table.
-rw-r--r-- | setup-disk.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/setup-disk.in b/setup-disk.in index ee01101..3b6b340 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -153,7 +153,7 @@ install_mounted_root() { boot_fs=$(find_mount_fs "$mnt_boot") supported_boot_fs "$boot_fs" || return 1 - bootdisk=$(disk_from_part $bootdev) + mbrdisk=$(disk_from_part $bootdev) if [ -e "/sys/block/${rootdev#/dev/}/md" ]; then local md=${rootdev#/dev/} features="$features raid" @@ -161,11 +161,13 @@ install_mounted_root() { raidmod=",$raidmod" raidopt="-r" # get a list of slaves - bootdisk= + mbrdisk= for i in /sys/block/$md/slaves/*; do j=${i##*/} i=${j%[0-9]*} - bootdisk="$bootdisk /dev/${i}" + if [ -b "/dev/$i" ]; then + mbrdisk="$mbrdisk /dev/${i}" + fi done fi if [ -n "$VERBOSE" ]; then @@ -173,7 +175,7 @@ install_mounted_root() { echo "Root filesystem: $root_fs" echo "Boot device: $bootdev" echo "Boot filesystem: $boot_fs" - echo "Boot disk(s): $bootdisk" + echo "MBR disk(s): $mbrdisk" fi if [ -z "$APKOVL" ]; then @@ -259,7 +261,7 @@ unmount_partitions() { fix_mbr_all_disks() { # fix mbr for all disk devices - for i in $bootdisk; do + for i in $mbrdisk; do local errmsg echo "Writing MBR to $i" errmsg=$(dd if="$MBR" of=$i 2>&1) \ |