Jim-
Good. That's confirming some doubts I'm having about doing a chroot to usb.
There are problems with /proc that I start seeing as a message "Error
opening file: ".devfsd" No such device" that appears right after the
chroot is done. I'll check with somebody at TS to see if I understand the
intent of the /usr/bin/loadUSB.sh script.
Let me run my assumptions by you:
I have a working filesystem on an nfsroot that won't fit in on-board flash.
By "won't fit", I mean that a straight copy of all necessary directories
won't fit and it may cost more time than it's worth to try to copy only the
necessary files. If there's a fast way to determine the necessary files and
the size of those files then I can review my assumption that it won't fit.
It seems easy and quick to use /usr/bin/loadUSB.sh to 'switch-over' to usb
flash, but there appear to be side effects that are causing problems now and
will probably cause unforeseen problems. An alternative is to mount only the
bin directories and any other large directories over the internal flash bin
directories. I'm assuming that it will be a can of worms, or
stickingplaster, to change Apache2, mysql and php et. al. to run in a
directory structure different from the directory structure they where
'apt-get-installed' into on the nfsroot.
Thanks for your observations and input.
-Jim Fred
-----Original Message-----
From: On Behalf Of
Jim Jackson
Sent: Thursday, April 06, 2006 3:17 AM
To:
Subject: RE: [ts-7000] TS-7250 filesystem access before and after chroot
sounds like what you really need is a boot via a suitable initrd setup so
that the whole system actually has the correct '/'
I think you misunderstand what chroot is.
chroot acts for the chroot invoked process and its children.
You can have different sessions chrooted to different places all on the
same system.
One "fix" would be to alter /etc/inetd.conf to invoke ftpd as
chroot /usbflash/root ftpd .....
but as I said this is stickingplaster and you'll probably have lots of it
around. Best get your board booting with the root on the correct device.
Jim
On Wed, 5 Apr 2006 wrote:
> Jim-
>
> I chroot to the usb flash so that '/' (root) is on the usb flash. I'm
using
> scripts derived from /usr/bin/loadUSB.sh in on-board flash.
>
> What's seen via ftp as /usbflash/root is seen as /root by other processes
> started after the chroot. That seems error prone. In other words, ftp's
> /usbflash/root is telnet's /root.
>
> I think I need to prevent ftpd from starting before the chroot and that's
> the approach I'll try next.
>
> -Jim Fred
>
> -----Original Message-----
> From: On Behalf
Of
> Jim Jackson
> Sent: Wednesday, April 05, 2006 1:58 PM
> To:
> Subject: Re: [ts-7000] TS-7250 filesystem access before and after chroot
>
>
> On Wed, 5 Apr 2006 wrote:
>
> > I'm booting from internal flash and chroot to USB flash. ftpd and
probably
> > other processes are using the filesystem in internal flash rather than
the
> > USB flash filesystem after chroot. How would you resolve this so that
ftpd
> > provides access to the 'after-chroot' filesystem?
>
> I don't think I understand you.
>
> The USB flash is mounted somewhere say /usbflash
>
> you ftp to the box, login in and if the owenrship and permissions
> of subdirectories under /usbflash allow you you can ftp to and from the
> files.
>
> What this has to do with chroot'ing I don't understand.
> Perhaps I've misunderstood.
>
> Jim
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|