Skip navigation.
Home
Now Shipping Version 7.0

fstab auto update needs review


Posts: 373

Hi,

To begin with, it is important to mention thah I'm a happy Mepis user, Mepis is a very good distribution and can still be improved.

My computer has three IDE HD, two of them are identical and they are connected to the motherboard (ABIT KT&-A RAID) to a special connector wich made possible to build a RAID 1.
Now the boot disk is /dev/hde, the mirror disk is /dev/hdg and it should be completely hidden for the operating system because it is being managed by the hardware, the third disk is a secondary disk (/dev/hda) that I use ocassionally, it doesn't represent a problem.

Mepis has some scripts that update /etc/fstab every time the computer is turned on. There are also some Dynamic partitions in fstab: /dev/hda1, /dev/hdg1, /dev/hdg5 (swap).
/dev/hde1 is static and mounted as /.
I tried commenting out this dymnamic entries but the next reboot put this devices as they were the first time.

Doing some research I found some scripts located in /usr/sbin whose names are buildfstab and addfstab that rebuild the fstab every time the computer is booted.

I changed one of the lines which appears in both scripts from

$(scanpartitions)

to

$(scanpartitions | egrep -v "hdg|hda5")

This helped to avoid the hda1 and hdg5 partitions to appear in the file fstab but I can't get rid of /dev/hdg1 and I don't know if there are more scripts that I don't know that are doing the job.

My proposal is, if it is possible, to do something to hide those partitions that the user doesn't want to see or the user doesn't want to be mounted by using a list a list. As an advanced user, I can edit a script or do something else to fix this situation but I think also in a normal user, there should be a frienldy way to the solution.

Finally, if somebody has any idea of what can I do to avoid the filesystem appearing in my fstab file, I'll appreciate it so much.

Thank you,

Alberto

Here is what I did to get

Here is what I did to get rid of the annoying update to fstab at every boot.

Edit the files: /usr/sbin/buildfstab and /usr/sbin/addfstab

Add as the first executable line in each file: exit 0

My /etc/fstab file stays just like I left it.

jimbo

Jon Du Quesne's picture

Nifty Tip!

Thank you aguerra and jimbo! I'll add it to my bag-o-tricks. My only concern is this: Don't you need to get permission from someone before you make these changes to the OS? Smiling

Don't ya love Linux!

Jon

Sounds like just what I

Sounds like just what I need.

Could you tell me which is the "first executable line".?

Thanks

you can also edit

you can also edit /etc/init.d/mepis-init.sh and comment the line that says 'buildfstab'...

Newbie or not Newbie, there's always a question

Jon Du Quesne's picture

A New One To Me

That's a new one to me carlops. The original references above where to the older 3.3 version of Mepis. Since then, I haven't thought to look in the init scripts to see what magic occurs there. Thanks for the pointer!

Jon

No computer is magic, no operating system is magic, no website is magic. They all require human interaction, thought, and responsibility to work.

don't tell Warren I told you

don't tell Warren I told you Eye-wink

Newbie or not Newbie, there's always a question

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.