Commit 254d0d6d authored by Mike Hibler's avatar Mike Hibler

Fix Linux MFS issue.

When locating the root device, if a BSD disk partition fills the entire
DOS partition, then Linux will not create a separate /dev entry for it.
In that case, we use the DOS partition device.

Also, a couple of changes to resync with BSD slicefix.
parent 67039354
......@@ -87,18 +87,30 @@ if [ $c_part_offset -eq 0 ]; then
fi
a_part_linuxdev=''
maybe_a_part_linuxdev=''
for partdev in /sys/block/$disk/$disk[1-9]*; do
[ $partdev = /sys/block/$disk/$disk$part ] && continue
start=`cat $partdev/start`
[ $start -eq $a_part_offset ] || continue
# remember BSD slice in case we don't come up with partition dev
maybe_a_part_linuxdev=$disk$part
[ $partdev = /sys/block/$disk/$disk$part ] && continue
a_part_linuxdev=${partdev##*/}
break
done
# Valid disklabel, but no 'a' partition.
if [ -z "$a_part_linuxdev" ]; then
exit 1
#
# linux does not create a separate device if the BSD partition
# uses the entire DOS partition. So if we found a DOS partition
# with the correct offset, just use that.
#
if [ -z "$maybe_a_part_linuxdev" ]; then
exit 1
fi
a_part_linuxdev=$maybe_a_part_linuxdev
fi
# We have a valid disklabel with an 'a' partition.
......
......@@ -21,8 +21,13 @@ case $disk in
dtype="sd"
dunit=`expr $dunit - 4`
;;
ad2[4-7])
old_dtype="sd"
dtype="sd"
dunit=`expr $dunit - 24`
;;
# SCSI
da[0-7])
da[0-7]|ada[0-7])
dtype="sd"
old_dtype="sd"
;;
......
......@@ -135,8 +135,6 @@ if [ -n "$BIOSDISK" ]; then
;;
esac
fi
# DOM0MEM is optional.
DOM0MEM=$SLICEFIX_DOM0MEM
#
# Find out what our console should be:
......@@ -179,6 +177,8 @@ if [ $CONSOLE = "unknown" ]; then
echo "WARNING: console type not set, assuming \"sio1\""
CONSOLE=sio1
fi
# DOM0MEM is optional
DOM0MEM=$SLICEFIX_DOM0MEM
#
# Handle pseudo-arguments in the filesystem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment