Ask Your Question
0

Problems mounting /proc with root user

asked 2017-07-08 09:22:13 -0600

mario gravatar image

Hello! Based on some emulation program running, I need to mount /proc but I am getting an error. This is what I am doing:

  1. sudo su.
  2. chroot /opt/somedir
  3. mount /proc

I am getting the next error: mount: only root can mount proc on /proc

I am running as root, What do I need to do to fix it? Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-07-08 10:19:45 -0600

aeperezt gravatar image

You need to do:

sudo chroot /opt/somedir

sudo mount /proc

or

sudo -s

chroot /opt/somedir

mount /proc

edit flag offensive delete link more

Comments

I tried both options and they did not work: 1. sudo chroot /opt/vpn/vpnsys/ 2. root@localhost:/# sudo mount /procbash: sudo: command not found

Or 1. sudo -s 2. [root@localhost user]# chroot /opt/vpn/vpnsys/ 3. [root@localhost]:/# mount /proc mount: only root can mount proc on /proc

mario gravatar imagemario ( 2017-07-08 10:33:09 -0600 )edit
0

answered 2017-07-08 15:47:40 -0600

sixpack13 gravatar image

updated 2017-07-08 15:49:12 -0600

AFAIK (for a partition mounted to /mnt):

sudo mount /dev/sdxy /mnt

sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /selinux /mnt/selinux

sudo chroot /mnt
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-08 09:21:21 -0600

Seen: 192 times

Last updated: Jul 08 '17