On Thu, Aug 10, 2006 at 07:39:21PM +0000, Peter wrote:
> Sorry, I was a bit sloppy in the last message.
> My question summarized - Is the following
> command OK?
>
> mkdir -pv ${LFS}/{dev{/pts,/shm},proc,sys}
But you're creating ${LFS}/dev (presumably for the first time), so I
guess you are then going to mount --bind over the top of it afterwards,
which will cover up ${LFS}/dev/{pts,shm}.
>
> I would use this in place of what is
> in 6.2.3. Mounting Virtual Kernel File Systems.
> I want to take care of the mount error that is
> possible by resetting the build from
> scratch without a reboot because the
> book does not explicitly create pts and shm
> and leaves it up to mount --bind.
I think we've crossed our wires somewhere... OK, first, to make sure
we're clear on mount --bind:
Suppose first that /dev/shm and /dev/pts exist and have the relevant
mounts. So /dev/shm has tmpfs mounted and /dev/pts has devpts mounted.
Then
mount --bind /dev ${LFS}/dev
will result in ${LFS}/dev/pts and ${LFS}/dev/shm being directories with
nothing mounted. This is what the book assumes.
Now suppose that /dev/shm and /dev/pts do not exist. Then if we execute
the following:
mount --bind /dev ${LFS}/dev
mkdir ${LFS}/dev/{shm,pts}
we get that ${LFS}/dev/shm and ${LFS}/dev/pts are directories. In
addition, /dev/shm and /dev/pts are now directories. So (to synthesise
what happens when you start building then stop):
mount --bind /dev ${LFS}/dev
mkdir ${LFS}/dev/{shm,pts}
mount -t devpts devpts ${LFS}/dev/pts
mount -t tmpfs shm ${LFS}/dev/shm
# Start build
# Stop build, umount filesystems
umount ${LFS}/dev/{shm,pts}
umount ${LFS}/dev
# Before restarting build:
mount --bind /dev ${LFS}/dev
# We still have the ${LFS}/dev/{shm,pts} directories
mount -t devpts devpts ${LFS}/dev/pts
mount -t tmpfs shm ${LFS}/dev/shm
Does this make sense?
So you want to mkdir ${LFS}/dev _before_ the mount --bind, and mkdir
${LFS}/dev/{pts,shm} _after_ the mount --bind.
I feel this is becoming more of a support thread, which isn't really
suited to lfs-dev, unless something needs to be mentioned about the
possible need to create /dev/pts and /dev/shm, or possibly about how
systems without those are not supported (on the basis there is probably
not kernel support for devpts).
Hope this helps.
Alex :-)
--
Pippin
Computer Monkey to the Pelican
www.oxrev.org.uk, www.corpusjcr.org, www.rev.org.uk
pgpgcIC6wZGZz.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
