Brak oczekiwania na dyski w initrd.
Arkadiusz Miśkiewicz
arekm at maven.pl
Fri Jul 19 12:23:41 CEST 2013
On Friday 19 of July 2013, Pepe wrote:
> W dniu 23.06.2013 22:36, Arkadiusz Miśkiewicz pisze:
> [...]
>
> > geninitrd tego nie robi - używa tylko modułu scsi_wait_scan, który jak
> > widać się w takim przypadku nie spisuje.
>
> [...]
>
> Ten moduł już nie występuje, zarówno w 3.7 jak i w 3.9. Przy czym w 3.7
> wspomniany problem nie występuje.
Może coś w stylu (nietestowane, u mnie problem nie występuje niestety):
Index: functions
===================================================================
--- functions (wersja 12710)
+++ functions (kopia robocza)
@@ -104,6 +104,25 @@
return 0
}
+# waits for specified device until device is found or timeout happens
+wait_for_device() {
+ local dev="$1"
+ local timeout="$2"
+ local i
+
+ # default = 10s
+ [ -z "$timeout" ] && timeout=5
+ i=0
+ while [ "$i" -lt "$(( timeout * 10 ))" ]; then
+
+ [ -e "$dev" ] && return 0
+
+ i=$(( i + 1 ))
+ usleep 0.1
+ done
+ return 1
+}
+
# resolve /dev/dm-0 to lvm2 node
# which they got from blkid program fs was specifed as UUID= in fstab
dm_lvm2_name() {
Index: geninitrd
===================================================================
--- geninitrd (wersja 12710)
+++ geninitrd (kopia robocza)
@@ -1515,6 +1515,8 @@
initrd_gen_tuxonice
initrd_gen_suspend
+wait_for_device "$rootdev"
+
# clean up env
add_linuxrc <<-'EOF'
if [ ! "$DEBUGINITRD" ]; then
--
Arkadiusz Miśkiewicz, arekm / maven.pl
More information about the pld-devel-pl
mailing list