/proc/partitions not done updating when init is ran?
I have a problem where it does not look like /proc/partitions is updated completely by the time init is ran.
Basically I am booting from a usb flash device, and when I try to run fsck on the device on boot (using LABEL=, which is necessary since the actual device cannot be assumed in my config) it fails. After further investigation /proc/partitions does not contain any scsi partitions right when init is starting, but if I do a "sleep 10" before running fsck then it works fine.
I can of course put that sleep in there but that is ugly and I have no way of knowing the maximum delay, so if it took too long then it would not work and I would be screwed...
Isn't /proc/partitions supposted to be finished updating when init starts?
If this is not a kernel bug (or it won't be fixed for a while), then what
is the deal and how can I fix this cleanly?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is that happening in 2.6.2-rc3-mm1 or up?
If yes, try unsetting nbd in your kernel config.
Mind Booster Noori
- --
==================================================
Marcos Daniel Marado Torres AKA Mind Booster Noori
/"\ http://student.dei.uc.pt/~marado
\ / [email protected]
X ASCII Ribbon Campaign
/ \ against HTML e-mail and Micro$oft attachments
==================================================
Quoted 14 lines · Nick Bartos
I have a problem where it does not look like
/proc/partitionsis updated completely by the time init is ran.Basically I am booting from a usb flash device, and when I try to run fsck on the device on boot (using LABEL=, which is necessary since the actual device cannot be assumed in my config) it fails. After further investigation
/proc/partitionsdoes not contain any scsi partitions right when init is starting, but if I do a "sleep 10" before running fsck then it works fine.I can of course put that sleep in there but that is ugly and I have no way of knowing the maximum delay, so if it took too long then it would not work and I would be screwed...
Quoted 9 lines
Isn't
/proc/partitionssupposted to be finished updating when init starts?
If this is not a kernel bug (or it won't be fixed for a while), then what
is the deal and how can I fix this cleanly?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFAKwf2mNlq8m+oD34RAvICAJ94Kv1Yspu0syE8MLAZwSHEgJ8i4ACdEOJy KqWcNxWT9t3o1jm1gUq04Ew=
=u2Ds
-----END PGP SIGNATURE-----
No, it is 2.4.25-pre7. I could technically go to 2.6.x, but it would take a bit of work due to some other changes. I would really like to get this stable in 2.4.x.
What is nbd?
Quoted 65 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Is that happening in 2.6.2-rc3-mm1 or up?
If yes, try unsetting nbd in your kernel config.
Mind Booster Noori
- --
==================================================
Marcos Daniel Marado Torres AKA Mind Booster Noori
/"\ http://student.dei.uc.pt/~marado
\ / [email protected]
X ASCII Ribbon Campaign
/ \ against HTML e-mail and Micro$oft attachments
==================================================Quoted 17 lines · Nick Bartos
I have a problem where it does not look like
/proc/partitionsis updated completely by the time init is ran.Basically I am booting from a usb flash device, and when I try to run fsck
on the device on boot (using LABEL=, which is necessary since the actual device cannot be assumed in my config) it fails. After further investigation/proc/partitionsdoes not contain any scsi partitions right
when init is starting, but if I do a "sleep 10" before running fsck then it works fine.I can of course put that sleep in there but that is ugly and I have no way
of knowing the maximum delay, so if it took too long then it would not work and I would be screwed...Quoted 12 lines
Isn't
/proc/partitionssupposted to be finished updating when init starts?
If this is not a kernel bug (or it won't be fixed for a while), then
what
is the deal and how can I fix this cleanly?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.76iD8DBQFAKwf2mNlq8m+oD34RAvICAJ94Kv1Yspu0syE8MLAZwSHEgJ8i4ACdEOJy KqWcNxWT9t3o1jm1gUq04Ew=
=u2Ds
-----END PGP SIGNATURE------
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
OK yes I see that CONFIG_BLK_DEV_NBD is disabled. Any other ideas?
Quoted 78 lines
No, it is 2.4.25-pre7. I could technically go to 2.6.x, but it would take a bit of work due to some other changes. I would really like to get this stable in 2.4.x.
What is nbd?
Quoted 69 lines
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Is that happening in 2.6.2-rc3-mm1 or up?
If yes, try unsetting nbd in your kernel config.
Mind Booster Noori
- --
==================================================
Marcos Daniel Marado Torres AKA Mind Booster Noori
/"\ http://student.dei.uc.pt/~marado
\ / [email protected]
X ASCII Ribbon Campaign
/ \ against HTML e-mail and Micro$oft attachments
==================================================Quoted 20 lines · Nick Bartos
I have a problem where it does not look like
/proc/partitionsis updated
completely by the time init is ran.Basically I am booting from a usb flash device, and when I try to run fsck
on the device on boot (using LABEL=, which is necessary since the actual
device cannot be assumed in my config) it fails. After further investigation/proc/partitionsdoes not contain any scsi partitions right
when init is starting, but if I do a "sleep 10" before running fsck then
it works fine.I can of course put that sleep in there but that is ugly and I have no way
of knowing the maximum delay, so if it took too long then it would not work and I would be screwed...Quoted 12 lines
Isn't
/proc/partitionssupposted to be finished updating when init starts?
If this is not a kernel bug (or it won't be fixed for a while), then
what
is the deal and how can I fix this cleanly?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.76iD8DBQFAKwf2mNlq8m+oD34RAvICAJ94Kv1Yspu0syE8MLAZwSHEgJ8i4ACdEOJy KqWcNxWT9t3o1jm1gUq04Ew=
=u2Ds
-----END PGP SIGNATURE------
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · Nick Bartos
OK yes I see that
CONFIG_BLK_DEV_NBDis disabled. Any other ideas?
Well, does it still happen with 2.4.25-rc2 ?
Quoted 3 lines
Quoted 3 lines
No, it is 2.4.25-pre7. I could technically go to 2.6.x, but it would take a bit of work due to some other changes. I would really like to get this stable in 2.4.x.
Mind Booster Noori
- --
==================================================
Marcos Daniel Marado Torres AKA Mind Booster Noori
/"\ http://student.dei.uc.pt/~marado
\ / [email protected]
X ASCII Ribbon Campaign
/ \ against HTML e-mail and Micro$oft attachments
==================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFAK7UGmNlq8m+oD34RAv5wAJwPjsIOMB55zSF//9MnnQDEIYRDpwCeMfJ5 Au44XTzEf+tbjosvG9Dvo3U=
=h41f
-----END PGP SIGNATURE-----
Quoted 3 lines
Well, does it still happen with 2.4.25-rc2 ?
yes it does, and it does for 2.6.2 as well.
I did a couple of dmesg's and it looks like the usb device is not being detected until after init is ran. I would think that the kernel would have done all the device detection before running init but I guess not.
Is there a way to check somewhere to make sure it is done detecting devices? I cannot just check to see if any of the usb/scsi stuff exists since some systems may be booting off ide and have no usb bus enabled.
Here are a few of the lines that get added after I wait for a few seconds in my init script:
+scsi0 : SCSI emulation for USB Mass Storage devices
+ Vendor: OEI-USB2 Model: CompactFlash Rev: 1.04 + Type: Direct-Access ANSI SCSI revision: 02
+Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 +SCSI device sda: 250880 512-byte hdwr sectors (128 MB) +sda: Write Protect is off
+ /dev/scsi/host0/bus0/target0/lun0: p1 p2
+WARNING: USB Mass Storage data integrity not assured +USB Mass Storage device found at 2
Followup to: <[email protected]> By author: "Nick Bartos" <[email protected]> In newsgroup: linux.dev.kernel
Quoted 11 lines
Quoted 4 lines
Well, does it still happen with 2.4.25-rc2 ?
yes it does, and it does for 2.6.2 as well.
I did a couple of dmesg's and it looks like the usb device is not being detected until after init is ran. I would think that the kernel would have done all the device detection before running init but I guess not.
Yes, the "delayed detect" behaviour of USB is a big problem.
-hpa
Signature · 4 lines
PGP public key available - finger [email protected] Key fingerprint: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD 1E DF FE 69 EE 35 BD 74 "The earth is but one country, and mankind its citizens." -- Bahá'u'lláh Just Say No to Morden * The Shadows were defeated -- Babylon 5 is renewed!!