LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2011, 05:15 AM   #1
pattbert
LQ Newbie
 
Registered: Oct 2009
Posts: 8

Rep: Reputation: 0
tty in chroot env says "not a tty"


I'm currently trying to set up a chroot jail on my Fedora 15 machine.

I tried a minimal approach first only putting the necessary files in it. However, the tty command tells me "not a tty". I then tried adding hard links to all kinds of different system directories like /dev, /var, /etc, /tmp to it, but to no avail.
I even made the chroot directory a hard link to / but tty still tells me "not a tty". So what I'm getting, is that just hard linking the necessary directories and files doesn't do it.
What do I need to do to get a real tty in my chroot jail?
 
Old 11-19-2011, 10:06 PM   #2
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
You should not hardlink directories; bind-mount them:
Code:
mount --bind /some/directory /path/to/chroot/some/directory
Have you mounted /proc inside the chroot? You probably need to. You also need to have /dev/ptmx and /dev/pts/ (latter mounted), if you wish to use pseudoterminals inside the chroot. If you don't, tty will always report 'not a tty'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
in the installation i get an error message "tty; job turned ff (initramts)" !! Herbie07 Linux - Newbie 1 05-05-2011 05:00 AM
"bad tty" & "file descriptor error" while building RPM on F13 gosssamer Linux - Software 7 12-28-2010 05:02 PM
Getting "/bin/sh can't access tty job control turned off" after adding a new HDD gardar Debian 5 08-14-2009 05:32 AM
"Can't access tty, job control turned off"-Sony p2 laptop beachboy2 Linux - Laptop and Netbook 7 05-02-2009 01:12 AM
error "unable to load tty" after adding HDD to Ubuntu mrlankey0486 Linux - Hardware 3 04-27-2006 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration