Sponsored Content
Operating Systems Linux Gentoo automating chroot and mount/unmount Post 302198719 by duderonomy on Friday 23rd of May 2008 07:28:18 PM
Old 05-23-2008
automating chroot and mount/unmount

Hello,

I am trying to automate a task that I believe is easy. It is documented
for manual system administrative purposes here:
Gentoo Linux -- Installing the Gentoo Base System - chapter 6

I am attempting to do the following in a script:

# cd $TOP_OF_ROOT_FS
# mount -t proc none /mnt/gentoo/proc
# chroot . /bin/bash -c "cmd; cmd; exit 0"
# umount ./proc

However I am getting an error:
umount: /proc: device is busy

Does anyone know how to automate this sort of task?

Also, what is the difference between:
mount -t proc none /mnt/gentoo/proc
&
mount -t proc proc /mnt/gentoo/proc

Is "none" or "proc" merely a label for the fstab?

Thanks in advance.
Cheers!
Smilie
 

10 More Discussions You Might Find Interesting

1. Linux

chroot?

If i were to create a new user for my ftp would chroot be the proper command to set there root directory as the file i've put all my FTP stuff in? Also would that jail them, or would they beable to get out of the set directory? (0 Replies)
Discussion started by: byblyk
0 Replies

2. AIX

how do i unmount ?

hi all, I am new to AIX as well as UNIX also ,i have a question One of my program has created a new filesystem on the system..... df shows : /dev/fslv04 2031616 2030648 1% 3 1% /replicas/source when i tried to umount the above filesystem by umount... (3 Replies)
Discussion started by: vamshi_k
3 Replies

3. Red Hat

Unbale ot mount chroot /sys/image

Hi frds i need ur help on this..! I am using redhat 9.0 recently someone has messed with mine filesystem and anyhow managed to hide mine linux partition both hd0,0 and hd0,1 ..!This is sick..i got mine Xp partition also hidden by this. I tried booting with linux rescue disk..but fail to mount to... (2 Replies)
Discussion started by: nicknihal
2 Replies

4. HP-UX

Cannot unmount mount points??

When taking a snap, I have a script that stops any active snap. When running the script, I'm getting a message that u02 and u04 are already mounted. How can I find out what process(es) is/are latching on the these mount points? Thank you for your time. (1 Reply)
Discussion started by: genzbeat
1 Replies

5. HP-UX

/usr out of disk space need to unmount/ expand volume /mount

Greetings, I am running HP-UX 10.2 and /usr is out of disk space already. I installed IE 5.0 for UNIX on my machine under /usr and browsed the Internet for a while and presto no more disk space. I have plenty of hard disk space on my computer so would like to expand the size of the volume. The... (5 Replies)
Discussion started by: Dirk_
5 Replies

6. OS X (Apple)

Can't Mount Disk / Image after bad unmount

I have had a little issue with one of my disks, the usb cacble was pulled out and one of the external drives on it would no longer mount. I used First Aid and it verified and repaired both OK / nothing to do). After lots of messing around and not being able to mount I used Drive Genius 2 and that... (1 Reply)
Discussion started by: Cranie
1 Replies

7. Shell Programming and Scripting

if (disk is mounted) unmount if (disk is unmounted) mount

Hey there, sorry if this is a bit too much of a noob question, trying to get to grips with a simple bash script - but i have done ZERO bash scripting. basically having worked out how to mount and unmount disks using: disktool -m *device* & disktool -e *device* - and looking at the result of... (2 Replies)
Discussion started by: hollister
2 Replies

8. Shell Programming and Scripting

Cygwin bash script to unmount and mount an XP partition

As stated, I am looking into keeping my backup drive unmounted in normal windows use. Partly this is to address threats like cryptolocker. Since one of my backup drives is an internal drive, it will not likely afford any protection from such a threat. I am thinking of adding code to my rsync script... (5 Replies)
Discussion started by: LMHmedchem
5 Replies

9. Shell Programming and Scripting

Script to unmount and mount by UUID

Hi, Need a bit of help on this one as I am a scripting noob. I have a linux based NAS that mounts USB hard drives in an inconsistent location and to make matters worse, seems to lose the mount for an unknown reason and doesn't remount automatically unless the drive is removed and re-inserted.... (4 Replies)
Discussion started by: gtr33m
4 Replies

10. UNIX for Beginners Questions & Answers

AIX - SAN Mount and Unmount on LPAR

We have 2 LPAR. LPAR #1 have a Application, Database Server process (ctree Server) and SAN+Physical Table. LPAR#2 has only Application. Both Application process are connected to Database via C-tree Server Process (Running on LPAR #1.. We want to keep one Active C-tree Server and one Backup... (1 Reply)
Discussion started by: gabhanes
1 Replies
PSPAX(1)						    Documentation for pax-utils 						  PSPAX(1)

NAME
pspax - list ELF/PaX information about running processes SYNOPSIS
pspax [options] ELFs DESCRIPTION
pspax is a user-space utility that scans the proc directory and list ELF types, as well as their respective PaX flags and filenames and attributes. Depending on build options, it may additionaly display the process running set of capabilities. OPTIONS
-a, --all Show all processes -h, --header Print GNU_STACK/PT_LOAD markings -i, --ipaddr Print ipaddr info if supported -p, --pid PID Only process specified process id -u, --user UID Process user/uid # -g, --group GID Process group/gid # -n, --nx Only display w^x processes -w, --wx Only display w|x processes -v, --verbose Be verbose (can be used more than once) -B, --nobanner Don't display the header -h, --help Show condensed usage and exit -V, --version Print version and exit HOMEPAGE
http://hardened.gentoo.org/pax-utils.xml REPORTING BUGS
Please include as much information as possible (using any available debugging options) and send bug reports to the maintainers (see the AUTHORS section). Please use the Gentoo bugzilla at http://bugs.gentoo.org/ if possible. SEE ALSO
chpax(1), dumpelf(1), paxctl(1), pspax(1), readelf(1), scanelf(1) AUTHORS
Ned Ludd <solar@gentoo.org> Maintainer Mike Frysinger <vapier@gentoo.org> Maintainer Fabian Groffen <grobian@gentoo.org> Mach-O Maintainer NOTES
1. http://hardened.gentoo.org/pax-utils.xml 2. http://bugs.gentoo.org/ pax-utils 0.2.3 03/03/2011 PSPAX(1)
All times are GMT -4. The time now is 10:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy