[Eisfair_dev] Update auf eiskernel 42e12e2 - auf einem USB-Datenträger
Thomas Bork
tom at eisfair.org
Di Dez 3 22:04:32 CET 2019
Am 03.12.2019 um 12:57 schrieb Stefan Puschek:
> nun sind wir klucher :)
> der sleep 2 HINTER udevadm settle hat den gewünschten Effekt.
Danke für den Test :-)
>> Ich versuche gerade eine Lösung zu bauen, die auf das Vorhandensein
>> der UUID des root-Devices unter /dev/disk/by-uuid prüft und erst bei
>> deren Erscheinen weitermacht. Die UUID bekomme ich per "cat
>> /proc/cmdline", dahin übergibt sie lilo.
> das könnte dann wohl überflüssig sein...
Könntest Du noch etwas testen? Nimm den sleep oben noch einmal raus und
modifiziere bitte den folgenden Abschnitt der Datei init in der initramfs:
Original:
if $($GREP -q '^UUID' /rootdev)
then
# UUID=2381eff1-9677-4a04-9faa-323247ec2f83
string="$($CAT /rootdev)"
echo "rootdev is a UUID: $string, converting it to device ..."
UUIDDEV="$(findfs "$string")"
echo "UUIDDEV is $UUIDDEV."
$RDEV "$UUIDDEV"
echo "rootdev is now $($CAT /rootdev)."
fi
Nach Änderung:
if $($GREP -q '^UUID' /rootdev)
then
# UUID=2381eff1-9677-4a04-9faa-323247ec2f83
string="$($CAT /rootdev)"
echo "rootdev is a UUID: $string"
root_uuid="$(echo "$string" | $AWK -F'=' '{print $2}')"
# 2381eff1-9677-4a04-9faa-323247ec2f83
for try in 0 1 2 3 4 5 6 7 8 9
do
# wait max 10 seconds
test -L /dev/disk/by-uuid/${root_uuid} && break
echo "Waiting for ${root_uuid} to appear in /dev/disk/by-uuid ..."
sleep 1
done
if [ ! -L /dev/disk/by-uuid/${root_uuid} ]
then
echo ""
echo "Cannot find ${root_uuid} in /dev/disk/by-uuid/. Giving up
..."
shell
fi
echo "Converting $string to device ..."
UUIDDEV="$(findfs "$string")"
echo "UUIDDEV is $UUIDDEV."
$RDEV "$UUIDDEV"
echo "rootdev is now $($CAT /rootdev)."
fi
Wie gehabt initramfs zusammen packen, nach /boot kopieren, lilo
ausführen und testen.
--
der tom
[eisfair-team]
Mehr Informationen über die Mailingliste Eisfair_dev