LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-25-2016, 11:57 AM   #1
exskewsme
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Rep: Reputation: Disabled
chroot mount problem with /tftpboot


I have a machine currently running Ubuntu 16.04 amd64 that holds a lot of chroots used to do cross-platform embedded Linux builds. Rather than updating the host /etc/fstab as a lot of howtos suggest, I have start-up scripts that look like this:
Code:
sudo mount --bind /home /home/exskewsme/chroots/trusty_i386/home
sudo mount --bind /tmp /home/exskewsme/chroots/trusty_i386/tmp
sudo mount --bind /dev /home/exskewsme/chroots/trusty_i386/dev
sudo mount --bind /proc /home/exskewsme/chroots/trusty_i386/proc
sudo mount --bind /media /home/exskewsme/chroots/trusty_i386/media
sudo mount --bind /tftpboot /home/exskewsme/chroots/trusty_i386/tftpboot
dchroot -d -c trusty_i386
sudo umount /home/exskewsme/chroots/trusty_i386/home
sudo umount /home/exskewsme/chroots/trusty_i386/tmp
sudo umount /home/exskewsme/chroots/trusty_i386/dev
sudo umount /home/exskewsme/chroots/trusty_i386/proc
sudo umount /home/exskewsme/chroots/trusty_i386/media
sudo umount /home/exskewsme/chroots/trusty_i386/tftpboot
and the appropriate entry in /etc/schroot/schroot.conf
Code:
[trusty_i386]
description=Trusty i386
directory=/home/exskewsme/chroots/trusty_i386
type=directory
root-users=exskewsme
This lets me start the right chroot to modify / build embedded Linux board support package binaries as needed. This has worked great, until I recently needed to work with a device that needed me to download images from a tftpboot directory.

I created chroots/trusty_i386/tftpboot, and as seen in the sample above, had the script mount it. But unlike /tmp and /home/exskewsme, which see my host directories, it can't see the host /tftpboot directory. Instead, it keeps a local /tftpboot directory; everything I copy into it within the chroot is present, but it's not in the /tftpboot directory when I exit the chroot. Running mount in the chroot does not show the /tftpboot directory being mounted, so at least it's consistent.

I tried using a /xxx directory and saw the same result. I also tried using /chroots as my chroot root directory instead of /home/exskewsme/chroots, in case I had some cyclic definition problem. That didn't change things either. The mount command itself shows the contents of host /tftpboot being in .../trusty_i386/tftpboot prior to entering the chroot. The only thing that's clear for me right now is that I must be misunderstanding something.

My goal is to have the host provide tftpboot services with files that are added to it within the chroot... preferably without modifying host system files like /etc/fstab. I'd like to do that with a host directory instead of by running a tftp server in the chroot. If anyone can help me with that I'd appreciate it.

Thanks for reading.

Last edited by exskewsme; 08-26-2016 at 11:03 AM.
 
Old 08-26-2016, 05:32 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Some information on what host etc you are using would be nice, also thread really need to go in the general programming forum or the forum specific to your host, this forum is really for LFS problems, ask a mod to move this thread to somewhere more appropriate.
 
1 members found this post helpful.
Old 08-26-2016, 09:33 AM   #3
exskewsme
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Keith Hedger View Post
Some information on what host etc you are using would be nice, also thread really need to go in the general programming forum or the forum specific to your host, this forum is really for LFS problems, ask a mod to move this thread to somewhere more appropriate.
Thanks... I didn't take Linux From Scratch literally enough and didn't realize it was a specific project. I looked for ways to contact a mod and haven't found an appropriate one so far, do you know how I'd do that?
 
Old 08-26-2016, 09:46 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Just use the "Report" button at the bottom of the thread/post, good luck!
 
1 members found this post helpful.
Old 09-01-2016, 04:54 PM   #5
exskewsme
LQ Newbie
 
Registered: Aug 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Is this too complicated to answer, or too silly to answer? I'm getting into doing a telnet script to get the files from the chroot to the host tftp directory, which seems like overkill.
 
  


Reply

Tags
chroot, mount


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tftpboot problems, kernel panic, unable to mount port, etc smintz Linux - Embedded & Single-board computer 1 08-08-2011 10:55 AM
[SOLVED] Chroot output of mount spiky0011 Linux From Scratch 2 05-07-2011 06:58 AM
Is possible to mount devices in a chroot jail? daurpam Linux - Newbie 2 04-20-2010 04:09 PM
mount command not working in chroot. and now chroot not working mohit.jain Linux From Scratch 5 07-14-2006 03:57 AM
mount in chroot environment not possible moskito01 SUSE / openSUSE 5 12-06-2004 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:47 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