PDA

View Full Version : Change mount option - noatime instead of relatime



mecho
07-30-2010, 12:55 AM
The output of cat /proc/mounts shows that all internal file systems are mounted with relatime option. What I read about it is that there is still some overhead compared to noatime option and is totally useless. noatime would give a little bit of performance gain with no side effects. Does anyone know where this setting come from in Knoppix ? Is it a kernel setting ?
Here is the output of cat /proc/mounts:
rootfs / rootfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/sdb1 /mnt-system vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022 ,codepage=cp850,iocharset=iso8859-1,shortname=winnt,errors=remount-ro 0 0
tmpfs /ramdisk tmpfs rw,relatime,size=1048576k 0 0
/dev/cloop /KNOPPIX iso9660 ro,relatime 0 0
/dev/loop0 /KNOPPIX-DATA ext2 rw,relatime,errors=continue 0 0
unionfs /UNIONFS aufs rw,relatime,si=e1e6333f,noplink 0 0
unionfs /home aufs rw,relatime,si=e1e6333f,noplink 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
tmpfs /UNIONFS/var/run tmpfs rw,relatime,size=10240k 0 0
tmpfs /UNIONFS/var/lock tmpfs rw,relatime,size=10240k 0 0
tmpfs /UNIONFS/var/log tmpfs rw,relatime,size=102400k 0 0
tmpfs /tmp tmpfs rw,relatime,size=1048576k 0 0
udev /dev tmpfs rw,relatime,size=20480k 0 0
tmpfs /dev/shm tmpfs rw,relatime,size=1048576k 0 0
devpts /dev/pts devpts rw,relatime,mode=1777 0 0
/dev/sda6 /media/sda6 vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0 000,dmask=0000,allow_utime=0022,codepage=cp850,ioc harset=iso8859-1,shortname=winnt,errors=remount-ro 0 0

mecho
08-01-2010, 05:45 PM
Does anybody know how Knoppix mounts Unionfs and tempfs. I will really appreciate if someone can enlighten me on this subject

kl522
08-01-2010, 10:04 PM
It's all in a shell script call 'init' inside the 'minirt.gz'. Google for 'knoppix minirt.gz cpio' etc. Hopeful you will come upon a good writeup.

mecho
08-02-2010, 01:11 AM
Thanks for the tip kl522 - I will check it out

mecho
08-02-2010, 11:43 PM
I checked "init" in minirt.gz and there seems to be no trace of unionfs mount options, or at least I don't get it. Does anyone have other ideas ?
I am not so interested in changing the mount option, as finding the inner workings of Knoppix. I really love this distro

kl522
08-03-2010, 04:43 AM
Sorry allow me to be cynical here, :)

Which editor are you using ?

mecho
08-03-2010, 05:00 AM
It's fine:) I extracted minirt and I am using geany or nano for editing. Please if you have something can you point it to me

kl522
08-03-2010, 05:23 AM
If I were to fully describe everything, I am being punished. So why don't you tell us what you have done, every step of it ? How do you scan the whole script ? Did you use a string search ? You should be the one who tell us. When I searched for it, it is obvious to me. :)

mecho
08-03-2010, 06:24 AM
Here are the steps I took:
cp /mnt-system/boot/syslinux/minirt.gz /ramdisk
mkdir /ramdisk/tmp
cd /ramdisk/tmp
zcat ../minirt.gz | cpio -i -d
geany init

There is no sign of the mount options appearing in /proc/mounts
Obviously you see something that I don't, can you please give me a direction where to look

kl522
08-03-2010, 07:34 AM
geany init

There is no sign of the mount options appearing in /proc/mounts


Here is the problem. What are you looking for ? Why are you looking for /proc/mounts in 'init' ?

You are looking for WRONG thing. Just search for 'unionfs' you will come up the commands which are used to mount the unionfs. But 'relatime' is not even there, likely it's just one of the default options. If you want to add custom options, you will have to add it to the relevent mount commands, after the '-o'.

/proc/mounts appearance are managed by the kernel. What and how it appear depends on the 'mount' command issued. It is not directly manipulated.

mecho
08-03-2010, 06:26 PM
@kl522
I am getting a lot of errors while extracting the contents of minirt.gz, and when I put it back together it is smaller in size. The system does not boot afterwards. Is there any spacial way of extracting minirt and putting it back together

kl522
08-03-2010, 08:25 PM
The problem with most postings are :-

They want to know what is right.
But they should tell us what they are doing wrong.

Sorry if this turns out to be nasty but I think it's so fundamental to a "posting atiquette".

klaus2008
08-03-2010, 08:29 PM
I am getting a lot of errors while extracting the contents of minirt.gz, and when I put it back together it is smaller in size. The system does not boot afterwards. Is there any spacial way of extracting minirt and putting it back together There are instructions in the wiki: http://www.knoppix.net/wiki/Knoppix_Remastering_Howto#For_5.3.1_the_file_syste m_in_minirt_changed_to_ramfs.
Extraction and creation of minirt.gz have to be done as root.

mecho
08-03-2010, 09:05 PM
@kl522
I am sorry I have to say this, but you really make me. PLEASE do not reply to threads if you are not really willing to help in any way. This forums are for knowledge sharing and help in understanding Knoppix and Linux in general. I really appreciate your knowledge, but the way you are trying to help is totally useless. This is in regard to all posts you made in this thread

mecho
08-03-2010, 09:30 PM
I was following the instructions in the wiki I was just afraid to do it as root. It was not mentioned in the wiki or at least I did not see it and I did not think it would be necessary. Anyway that did the trick - I extracted minirt just fine as root and put it back together. The noatime option for uniionfs did the trick - thanks to kl522 and I am sorry for my previous post.
I don't know if there will be any performance gain or less writes to the flash, but I achieved what I wanted. Thanks All

kl522
08-03-2010, 11:11 PM
@kl522
I am sorry I have to say this, but you really make me. PLEASE do not reply to threads if you are not really willing to help in any way. This forums are for knowledge sharing and help in understanding Knoppix and Linux in general. I really appreciate your knowledge, but the way you are trying to help is totally useless. This is in regard to all posts you made in this thread

Yes all my posts are useless, that's because you are unwilling to tell us what you have done wrong. You said you have errors, but you are not posting about what commands you used, what intructions you have followed, what errors are they on the screen. You have searched the shell script, but you are not posting about what you have searched, what strings you have entered, what you expect to see. You want to know what is right, but we do not have telepathic minds to know what you did wrong.

Yes I was nasty. That's because I think the posts do not meet basic "posting etiquette".
Yes I know my posts are upsetting people. That's because I read posts which are upsetting me.

mecho
08-03-2010, 11:45 PM
The steps I took were described in post #9 - that's how klaus2008 managed to point me in the right direction probably. There is no sudo in those steps. Anyway, lets forget about it. I will try to be more thorough in my post, you can try to be more polite and it's all good.
I will post all steps for editing minirt.gz now, just to avoid any confusion to anyone following this thread. All in terminal:
cp /mnt-system/boot/syslinux/minirt.gz /ramdisk
cd /ramdisk
gunzip minirt.gz
mkdir minirtdir
cd minirtdir
sudo cpio -ivu --no-absolute-filenames < ../minirt
sudo nano init # Make changes to init
sudo find . | cpio -oH newc | gzip -9 > ../minirt.gz
cp /ramdisk/minirt.gz /mnt-system/boot/syslinux