[Eisfair_dev] [e1] Installer 2.7.2-2.20.1
Thomas Bork
tom at eisfair.org
Mo Mai 2 20:21:57 CEST 2016
Am 02.05.2016 um 18:47 schrieb Marcus Roeckrath:
>> evtl. ist es auch ein "Verständnis-Problem" -> "803" ungleich "8,3" ?!
> Was meinst Du damit?
> IMHO sind das gleiche Bezeichner für die gleiche Sache.
Sind sie - das eine ist die hexadezimale Interpretation, das andere die
dezimale. Siehe unter
https://ssl.nettworks.org/repo/browse/eisfair/trunk/install/eisfair-1/eis-installer/rootfs/var/install/initrd/initrdfs_empty/initparttwo?r=40457
folgende Auswertung in der initramfs, die ja auf den Problem-Maschinen
nicht durchlaufen wird:
# Check if ROOTDEV is a number (major and minor)
if ! $($GREP -q '^/dev/.*' /rootdev)
then
string="$(cat /rootdev)"
echo "rootdev is a number: $string"
stringlenght="$(echo ${#string})"
# hdd3 is 1643 (0x1643)
# sda1 is 801 (0x0801)
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193730
case $stringlenght in
3)
# Get the major number (first digit only)
# sda1 is MAJOR 8
MAJOR="$($AWK '{ print substr($0,1,1) }' /rootdev)"
# Get the minor number (everything after the first digit)
# sda1 is MINOR 01
MINOR="$($AWK '{ print substr($0,2) }' /rootdev)"
;;
4)
# Get the major number (first two digits only)
# hdd3 is MAJOR 16
MAJOR="$($AWK '{ print substr($0,1,2) }' /rootdev)"
# Get the minor number (everything after the second digit)
# hdd3 is MINOR 43
MINOR="$($AWK '{ print substr($0,3) }' /rootdev)"
;;
esac
echo "MAJOR in hex is $MAJOR."
echo "MINOR in hex is $MINOR."
# Convert hex to dec
# sda1 is MAJOR 8 and MINOR 1
# hdd3 is MAJOR 22 and MINOR 67
MAJOR="$(echo $((0x${MAJOR})))"
MINOR="$(echo $((0x${MINOR})))"
echo "MAJOR in dec is $MAJOR."
echo "MINOR in dec is $MINOR."
# Get the /dev node name using the major and minor numbers by
# looking it up in /proc/diskstats
DISKS="/proc/diskstats"
BOOT="$($AWK '$1=='$MAJOR' && $2=='$MINOR' { print $3 }' $DISKS)"
$RDEV "/dev/$BOOT"
fi
if [ "`$CAT /rootdev`" = "/dev/" ]
then
echo ""
echo "Cannot find MAJOR $MAJOR MINOR $MINOR in $DISKS!"
echo "This means there is no driver for your hardware"
echo "in the initramfs or the driver was not loaded."
shell
else
echo "rootdev is $($CAT /rootdev)."
fi
Und damit alle wissen, wovon Ihr hier redet, lade ich den Installer mal
hoch.
--
der tom
[eisfair-team]
Mehr Informationen über die Mailingliste Eisfair_dev