You are not logged in.

#1 2012-04-12 07:56:59

Goosfrabaa
Member
Registered: 2010-01-31
Posts: 9

/proc filesystem boot options where?

I uses the last (linux 3.3.1-1) kernel, and I would like use the new "hidepid" option at boot time.

My fstab looks like:

devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

/dev/sda1              /boot         ext2      defaults            0      1
/dev/sda2              swap          swap      defaults            0      0
/dev/sda3              /             ext4      defaults,acl        0      1
tmpfs                  /tmp          tmpfs     nodev,nosuid        0      0

I tried append the /etc/rc.sysinit of line 16:

mountpoint -q /proc    || mount -t proc proc /proc -o nosuid,noexec,nodev,hidepid=1

but when I rebooted my computer, this option doesn't show up.

Where I can write the "hidepid=1" option?

Offline

#2 2012-04-12 08:10:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: /proc filesystem boot options where?

That sysinit line checks if proc is already mounted, and mounts it if it's not. Thing is, it was already mounted in early userspace.

So add the hidepid option to /usr/lib/initcpio/init instead, and then regenerate your initramfs image.

Offline

#3 2012-04-12 09:38:48

Goosfrabaa
Member
Registered: 2010-01-31
Posts: 9

Re: /proc filesystem boot options where?

Forum Fellow wrote:

Thing is, it was already mounted in early userspace.

Probably you are right.

I added the "hidepid=1" option to /usr/lib/initcpio/init file, and I regenerate my initramfs image with

mkinitcpio -p linux

command. After that I read the

/boot/initramfs-linux.img

and I found that option.
But, after reboot this option missing:

mount | grep proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

I don't understand too why has a relatime option, because not in /usr/lib/initcpio/init file.

Last edited by Goosfrabaa (2012-04-12 10:11:52)

Offline

#4 2012-04-12 10:04:31

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: /proc filesystem boot options where?

Uhh.... who's James? smile

Offline

#5 2012-04-12 10:12:47

Goosfrabaa
Member
Registered: 2010-01-31
Posts: 9

Re: /proc filesystem boot options where?

Sorry, I edited wink
(Otherwise James stem from  https://bbs.archlinux.org/help.php#bbcode)

Last edited by Goosfrabaa (2012-04-12 10:15:54)

Offline

#6 2012-04-12 19:51:43

Goosfrabaa
Member
Registered: 2010-01-31
Posts: 9

Re: /proc filesystem boot options where?

Finally I used an ugly (but well functioning) solution.
I edited the /etc/rc.sysinit file:

mountpoint -q /proc && mount /proc -o remount,hidepid=1  || mount -t proc proc /proc -o nosuid,noexec,nodev,hidepid=1

I don't know what whould be the right solution, but it is working (until doesn't came a new initscripts package).

Last edited by Goosfrabaa (2012-04-12 20:01:56)

Offline

Board footer

Powered by FluxBB