* root fs on hdd
@ 2000-05-26 15:06 Steve Rossi
2000-05-26 16:07 ` Jim Lewis
2000-05-26 16:23 ` Dan Malek
0 siblings, 2 replies; 6+ messages in thread
From: Steve Rossi @ 2000-05-26 15:06 UTC (permalink / raw)
To: Embedded Linux PPC List
Hi All,
well after stepping away from it for a while then coming back to it I've
managed to track down the problems with my filesystems getting
corrupted. Now I've got stable hard disk i/o and so I'm trying to mount
the root file system from the disk. I get the feeling I'm missing
something incredibly obvious ... perhaps someone can help point it out
to me.
I've copied the the /bin, /dev, /etc, /lib, /libexec, /sbin, and /share
directories from the monta vista sdk to the root direectory of my ext2
partition (/dev/sda2) using "cp -a" while the root partition was
NFS mounted. What I copied is basically the filesystem that I mount over
NFS and it works fine. I've also created empty /proc and /tmp
directories on sda2. I've modifed etc/fstab on sda2 so that /dev/sda2 is
mounted as the root filesystem. I've also changed my bootline to read
root=/dev/sda2 rw
OK, so the kernel boots, it mounts the root partition on /dev/sda2, init
runs, but init complains:
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 52k init
init: error in loading shared libraries: libc.so.6: cannot open shared
object file: No such file or directory
Then it just stops. I've verified that the lib directory on /dev/sda2
contains libc.so.6 as a link to libc-2.1.2.so
So what am I missing? Where is init looking for libc.so.6 and why can't
it find it? Is there something stupid about the way I just copied the
root filesystem from the NFS mounted root to the disk?
Thanks,
Steve
--
-------------------------------------------------------
Steven K. Rossi srossi@ccrl.mot.com
Staff Engineer
Multimedia Communications Research Laboratory
Motorola Labs
-------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: root fs on hdd
2000-05-26 15:06 root fs on hdd Steve Rossi
@ 2000-05-26 16:07 ` Jim Lewis
2000-05-26 16:26 ` Dan Malek
2000-05-26 17:41 ` Steve Rossi
2000-05-26 16:23 ` Dan Malek
1 sibling, 2 replies; 6+ messages in thread
From: Jim Lewis @ 2000-05-26 16:07 UTC (permalink / raw)
To: Steve Rossi; +Cc: Embedded Linux PPC List
You need to make the following soft link in your target :
opt/hardhat/devkit/ppc/8xx/powerpc-linux ----> /
I think that will fix your problem.
-Jim
Steve Rossi wrote:
> Hi All,
>
> well after stepping away from it for a while then coming back to it I've
> managed to track down the problems with my filesystems getting
> corrupted. Now I've got stable hard disk i/o and so I'm trying to mount
> the root file system from the disk. I get the feeling I'm missing
> something incredibly obvious ... perhaps someone can help point it out
> to me.
> I've copied the the /bin, /dev, /etc, /lib, /libexec, /sbin, and /share
> directories from the monta vista sdk to the root direectory of my ext2
> partition (/dev/sda2) using "cp -a" while the root partition was
> NFS mounted. What I copied is basically the filesystem that I mount over
> NFS and it works fine. I've also created empty /proc and /tmp
> directories on sda2. I've modifed etc/fstab on sda2 so that /dev/sda2 is
> mounted as the root filesystem. I've also changed my bootline to read
> root=/dev/sda2 rw
>
> OK, so the kernel boots, it mounts the root partition on /dev/sda2, init
> runs, but init complains:
>
> VFS: Mounted root (ext2 filesystem).
> Freeing unused kernel memory: 52k init
> init: error in loading shared libraries: libc.so.6: cannot open shared
> object file: No such file or directory
>
> Then it just stops. I've verified that the lib directory on /dev/sda2
> contains libc.so.6 as a link to libc-2.1.2.so
>
> So what am I missing? Where is init looking for libc.so.6 and why can't
> it find it? Is there something stupid about the way I just copied the
> root filesystem from the NFS mounted root to the disk?
>
> Thanks,
> Steve
>
> --
> -------------------------------------------------------
> Steven K. Rossi srossi@ccrl.mot.com
> Staff Engineer
> Multimedia Communications Research Laboratory
> Motorola Labs
> -------------------------------------------------------
>
--
Jim Lewis
Sr. Field Applications Engineer
MontaVista Software, Inc.
(817)261-9088 http://www.mvista.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: root fs on hdd
2000-05-26 16:07 ` Jim Lewis
@ 2000-05-26 16:26 ` Dan Malek
2000-05-26 17:27 ` Mark S. Mathews
2000-05-26 17:41 ` Steve Rossi
1 sibling, 1 reply; 6+ messages in thread
From: Dan Malek @ 2000-05-26 16:26 UTC (permalink / raw)
To: Jim Lewis; +Cc: Steve Rossi, Embedded Linux PPC List
Jim Lewis wrote:
>
> You need to make the following soft link in your target :
> opt/hardhat/devkit/ppc/8xx/powerpc-linux ----> /
Oooo. That's even better (I guess I have been making it too difficult :-).
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: root fs on hdd
2000-05-26 16:26 ` Dan Malek
@ 2000-05-26 17:27 ` Mark S. Mathews
0 siblings, 0 replies; 6+ messages in thread
From: Mark S. Mathews @ 2000-05-26 17:27 UTC (permalink / raw)
To: Dan Malek; +Cc: Jim Lewis, Steve Rossi, Embedded Linux PPC List
Our process is to:
1) cpio the /opt/hardhat/.../target tree (including the .../target/opt/...
subtree) to a temporary location
2) install our specific executables and scripts into the temporary
location (from here we can test/debug our stuff via nfsroot)
3) cpio the pieces we want from the temporary location to a pre-image
staging area
4) strip everything in the staging area that's not stripped (except
modules)
5) test the staging area for size (we're currently using a max size of
6MB)
6) losetup, create, and mount a loopback fs
7) cpio from the staging area to the loopback
8) umount and un-losetup the loopback
9) gzip the loopback file
10) cp the loopback file to linux/arch/ppc/mbxboot/ramdisk.image.gz
11) do a make zImage.initrd
12) zsrec the resulting zImage
13) load into ram on the board
14) copy from ram to flash
15) reset the board and watch the fun begin ;-)
Works great. One tricky part is that some of this must be done as root.
I use sudo to make it a little easier. Note step 1, we treat the
/opt/hardhat/.../target tree as a 'pristine', working root fs. We always
copy the contents to somewhere else before making changes.
I may be restating the obvious, but someone might find it useful.
-Mark
On Fri, 26 May 2000, Dan Malek wrote:
>
> Jim Lewis wrote:
> >
> > You need to make the following soft link in your target :
> > opt/hardhat/devkit/ppc/8xx/powerpc-linux ----> /
>
>
> Oooo. That's even better (I guess I have been making it too difficult :-).
>
>
> -- Dan
>
>
Mark S. Mathews
AbsoluteValue Systems Web: http://www.absoval.com
P.O. Box 941149 e-mail: mark@absoval.com
Maitland, FL 32794-1149 Phone: 407.644.8582
USA Fax: 407.539.1294
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: root fs on hdd
2000-05-26 16:07 ` Jim Lewis
2000-05-26 16:26 ` Dan Malek
@ 2000-05-26 17:41 ` Steve Rossi
1 sibling, 0 replies; 6+ messages in thread
From: Steve Rossi @ 2000-05-26 17:41 UTC (permalink / raw)
To: Jim Lewis; +Cc: Embedded Linux PPC List
Jim Lewis wrote:
> You need to make the following soft link in your target :
> opt/hardhat/devkit/ppc/8xx/powerpc-linux ----> /
Yep. That did the trick!
Thanks,
Steve
--
-------------------------------------------------------
Steven K. Rossi srossi@ccrl.mot.com
Staff Engineer
Multimedia Communications Research Laboratory
Motorola Labs
-------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: root fs on hdd
2000-05-26 15:06 root fs on hdd Steve Rossi
2000-05-26 16:07 ` Jim Lewis
@ 2000-05-26 16:23 ` Dan Malek
1 sibling, 0 replies; 6+ messages in thread
From: Dan Malek @ 2000-05-26 16:23 UTC (permalink / raw)
To: Steve Rossi; +Cc: Embedded Linux PPC List
Steve Rossi wrote:
> I've copied the the /bin, /dev, /etc, /lib, /libexec, /sbin, and /share
> directories from the monta vista sdk to the root direectory of my ext2
> partition (/dev/sda2) using "cp -a" while the root partition was
Several problems here. You can't "cp" the /dev directory. Use 'tar'
or 'cpio'.
The MontaVista CDK is built to operate in the /opt/hardhat/..... directory
tree. You have to preserve this directory structure to the target
file system as used by NFS because these paths are part of the
library search. Copy the /opt/hardhat/...../target tree to your
system, then make symbolic links from /bin, /etc, /lib and so on into
the /opt/hardhat/..../target subdirectory. All of this (and much more)
is described in the documentation if you care to read it.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-05-26 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-26 15:06 root fs on hdd Steve Rossi
2000-05-26 16:07 ` Jim Lewis
2000-05-26 16:26 ` Dan Malek
2000-05-26 17:27 ` Mark S. Mathews
2000-05-26 17:41 ` Steve Rossi
2000-05-26 16:23 ` Dan Malek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).