chroot error: /bin/csh: No such file or directory; trying to create customized livecd/dvd

Antonio Olivares olivares14031 at gmail.com
Sat Dec 24 13:31:55 UTC 2011


On Sat, Dec 24, 2011 at 7:03 AM, Da Rock
<freebsd-questions at herveybayaustralia.com.au> wrote:
> On 12/24/11 22:57, Antonio Olivares wrote:
>>>
>>> I'll ask a stupid question, and you're more than welcome to give a stupid
>>> answer: Is /bin/csh actually _in_ your chroot?
>>>
>>> So csh should be this path: /usr/home/olivares/tmp/tmp/R/bin/csh
>>>
>>> HTH
>>> _______________________________________________
>>> freebsd-questions at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to
>>> "freebsd-questions-unsubscribe at freebsd.org"
>>
>> tricorehome# pwd
>> /usr/home/olivares/tmp/tmp/R
>> tricorehome# ls -l /bin/csh
>> -r-xr-xr-x  2 root  wheel  369288 Apr  2  2011 /bin/csh
>>
>> I am not sure if it is there now :(
>
> I think you may have missed something there- you do realise that even though
> you've changed directory, you haven't chrooted. So when you run ls -l
> /bin/csh it is still checking your system root- not the chroot. Sometimes a
> single typo can cause huge hassles, eh? :)
>
> Try:
>
> cd /usr/home/olivares/tmp/tmp/R && ls -l bin/csh
>
> Watch the "bin/csh"- don't make it an absolute path by adding the root (/)
> at the beginning.
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

I am trying to do what you have suggested, it appears that /bin/csh is
not present in the /usr/home/olivares/tmp/tmp/R directory :(

tricorehome# ls /usr/home/olivares/tmp/tmp/
R
tricorehome# ls -l /usr/home/olivares/tmp/tmp/
total 2
drwxr-xr-x  17 root  wheel  512 Dec 23 21:56 R
tricorehome# ls -l /usr/home/olivares/tmp/tmp/R/
total 46
-rw-r--r--   2 root  wheel   798 Dec 23 21:56 .cshrc
-rw-r--r--   2 root  wheel   265 Dec 23 21:56 .profile
-r--r--r--   1 root  wheel  6200 Dec 23 21:56 COPYRIGHT
drwxr-xr-x   2 root  wheel  1024 Dec 23 21:30 bin
drwxr-xr-x   7 root  wheel   512 Dec 23 21:56 boot
dr-xr-xr-x   2 root  wheel   512 Dec 23 21:30 dev
drwxr-xr-x  20 root  wheel  2048 Dec 23 21:56 etc
drwxr-xr-x   3 root  wheel  1536 Dec 23 21:30 lib
drwxr-xr-x   2 root  wheel   512 Dec 23 21:31 libexec
drwxr-xr-x   2 root  wheel   512 Dec 23 21:30 media
drwxr-xr-x   2 root  wheel   512 Dec 23 21:30 mnt
dr-xr-xr-x   2 root  wheel   512 Dec 23 21:30 proc
drwxr-xr-x   2 root  wheel  2560 Dec 23 21:30 rescue
drwxr-xr-x   2 root  wheel   512 Dec 23 21:56 root
drwxr-xr-x   2 root  wheel  2560 Dec 23 21:31 sbin
lrwxr-xr-x   1 root  wheel    11 Dec 23 21:30 sys -> usr/src/sys
drwxrwxrwt   2 root  wheel   512 Dec 23 21:30 tmp
drwxr-xr-x  14 root  wheel   512 Dec 23 21:31 usr
drwxr-xr-x  22 root  wheel   512 Dec 23 21:30 var
tricorehome# ls -l /usr/home/olivares/tmp/tmp/R/bin/
total 1692
-r-xr-xr-x  2 root  wheel   11472 Dec 23 21:30 [
-r-xr-xr-x  1 root  wheel   11448 Dec 23 21:30 cat
-r-xr-xr-x  1 root  wheel    7912 Dec 23 21:30 chflags
-r-xr-xr-x  1 root  wheel   17576 Dec 23 21:30 chio
-r-xr-xr-x  1 root  wheel    8392 Dec 23 21:30 chmod
-r-xr-xr-x  1 root  wheel   21304 Dec 23 21:30 cp
-r-xr-xr-x  2 root  wheel  369288 Dec 23 21:30 csh
-r-xr-xr-x  1 root  wheel   18440 Dec 23 21:30 date
-r-xr-xr-x  1 root  wheel   22104 Dec 23 21:30 dd
-r-xr-xr-x  1 root  wheel   13920 Dec 23 21:30 df
-r-xr-xr-x  1 root  wheel    5704 Dec 23 21:30 domainname
-r-xr-xr-x  1 root  wheel    5592 Dec 23 21:30 echo
-r-xr-xr-x  2 root  wheel   56880 Dec 23 21:30 ed
-r-xr-xr-x  1 root  wheel   16408 Dec 23 21:30 expr
-r-xr-xr-x  1 root  wheel   10336 Dec 23 21:30 getfacl
-r-xr-xr-x  1 root  wheel    5840 Dec 23 21:30 hostname
-r-xr-xr-x  1 root  wheel    7128 Dec 23 21:30 kenv
-r-xr-xr-x  1 root  wheel    7640 Dec 23 21:30 kill
-r-xr-xr-x  2 root  wheel   11368 Dec 23 21:30 link
-r-xr-xr-x  2 root  wheel   11368 Dec 23 21:30 ln
-r-xr-xr-x  1 root  wheel   30496 Dec 23 21:30 ls
-r-xr-xr-x  1 root  wheel    7152 Dec 23 21:30 mkdir
-r-xr-xr-x  1 root  wheel   13576 Dec 23 21:30 mv
-r-xr-xr-x  1 root  wheel   95448 Dec 23 21:30 pax
-r-xr-xr-x  2 root  wheel   16520 Dec 23 21:30 pgrep
-r-xr-xr-x  2 root  wheel   16520 Dec 23 21:30 pkill
-r-xr-xr-x  1 root  wheel   43312 Dec 23 21:30 ps
-r-xr-xr-x  1 root  wheel    7128 Dec 23 21:30 pwait
-r-xr-xr-x  1 root  wheel    5696 Dec 23 21:30 pwd
-r-sr-xr-x  1 root  wheel   20416 Dec 23 21:30 rcp
-r-xr-xr-x  1 root  wheel    5456 Dec 23 21:30 realpath
-r-xr-xr-x  2 root  wheel   56880 Dec 23 21:30 red
-r-xr-xr-x  2 root  wheel   15880 Dec 23 21:30 rm
-r-xr-xr-x  1 root  wheel   72744 Dec 23 21:30 rmail
-r-xr-xr-x  1 root  wheel    5784 Dec 23 21:30 rmdir
-r-xr-xr-x  1 root  wheel   18832 Dec 23 21:30 setfacl
-r-xr-xr-x  1 root  wheel  136696 Dec 23 21:30 sh
-r-xr-xr-x  1 root  wheel    5448 Dec 23 21:30 sleep
-r-xr-xr-x  1 root  wheel   22608 Dec 23 21:30 stty
-r-xr-xr-x  1 root  wheel    4456 Dec 23 21:30 sync
-r-xr-xr-x  2 root  wheel  369288 Dec 23 21:30 tcsh
-r-xr-xr-x  2 root  wheel   11472 Dec 23 21:30 test
-r-xr-xr-x  2 root  wheel   15880 Dec 23 21:30 unlink
-r-xr-xr-x  1 root  wheel    7144 Dec 23 21:30 uuidgen
tricorehome# cd /usr/home/olivares/tmp/tmp/R && ls -l bin/csh
-r-xr-xr-x  2 root  wheel  369288 Dec 23 21:30 bin/csh
tricorehome# pwd
/usr/home/olivares/tmp/tmp/R
tricorehome# cd ~
tricorehome# ls -l /bin/csh
-r-xr-xr-x  2 root  wheel  369288 Apr  2  2011 /bin/csh

With your command it is there, how do I proceed now?  Do I cd
/usr/home/olivares/tmp/tmp/R, then mount it as instructed and then try
the chroot?

Thanks,

Antonio


More information about the freebsd-questions mailing list