aboutsummaryrefslogtreecommitdiffstats
path: root/setup-disk.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-01-12 19:25:49 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-01-12 19:26:36 +0000
commit494c77df159bc792f8673e7f87f859e5ac2ee135 (patch)
tree6c0d279ad73c54e1d2d2fe3463d32d373a42f903 /setup-disk.in
parent78c57f4e1f532ef7daf6c21ceec5f15d9b796c8a (diff)
downloadalpine-conf-494c77df159bc792f8673e7f87f859e5ac2ee135.tar.bz2
alpine-conf-494c77df159bc792f8673e7f87f859e5ac2ee135.tar.xz
setup-disk: rename bootdisk to mbrdisk
It is used for installing MBR and is only needed if there exist a partition table.
Diffstat (limited to 'setup-disk.in')
-rw-r--r--setup-disk.in12
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) \