From: der.eremit@email.de
To: Nick Bartos <spam99@2thebatcave.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: getting usb mass storage to finish before running init?
Date: Fri, 13 Feb 2004 13:48:36 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.58.0402131338510.163@neptune.local> (raw)
In-Reply-To: <52496.192.168.1.12.1076639642.squirrel@mail.2thebatcave.com>
On Thu, 12 Feb 2004, Nick Bartos wrote:
> well, the root filesystem is an initrd, so I can't do that.
Then I mean look for the filesystem you want to mount.
> I suppose I could compile in the extra info for /proc/partitions and see
> if that gives me anything I can keep looking for (don't know if it puts
> file system labels in there, but that is probably what I would have to go
> on since that is really the only thing that is constant on all systems).
Well, if you know what filesystem type is wanted you could just attempt
to mount all the partitions from /proc/partitions with that type
(read-only) and look for a unique file - if it's there, keep the fs
mounted, otherwise umount and try next candidate.
That's basically what I do in an initrd I wrote for CD-ROM booting, I'm
just trying to mount iso9660 filesystems and look for /etc/rc.d/rc.cdrom
when it succeeds. Better ways to identifiy a block device exist, I'm
sure, but the approach works for me. I'm narrowing down the search by
scanning the dmesg buffer for ATAPI and SCSI CD-ROM detection messages,
but that approach doesn't work for your problem (and is also fragile
when using it across several kernel versions).
> Is there a quick/clean way to query a device and get the label?
findfs from the e2fsprogs package, maybe.
> I suppose
> I could use tune2fs or something, but I didn't know if there is anything
> better/simpler. I don't know if I like the idea of running tune2fs on
> each partition again and again. I guess I could keep a list in memory and
> only check each one once, but that is getting a bit more complicated &
> time consuming.
Well, it's read-only access, so I don't see a problem even with running
it multiple times on the same device. Keeping a list of already tried
devices isn't black magic, though.
--
Ciao,
Pascal
next prev parent reply other threads:[~2004-02-13 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1oAMR-6St-13@gated-at.bofh.it>
2004-02-13 2:09 ` der.eremit
2004-02-13 2:34 ` Nick Bartos
2004-02-13 12:48 ` der.eremit [this message]
2004-02-13 12:56 ` Nick Bartos
2004-02-13 4:06 ` Randy Dunlap
2004-02-13 12:55 ` der.eremit
2004-02-13 1:54 Nick Bartos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0402131338510.163@neptune.local \
--to=der.eremit@email.de \
--cc=linux-kernel@vger.kernel.org \
--cc=spam99@2thebatcave.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®