LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   my fstab listed wrong filesystem for a partition (http://www.linuxquestions.org/questions/linux-general-1/my-fstab-listed-wrong-filesystem-for-a-partition-4175460914/)

newbiesforever 05-06-2013 02:04 PM

my fstab listed wrong filesystem for a partition
 
Have you ever seen an fstab file list the wrong filesystem for a partition?--I haven't. For some reason, I couldn't mount one of my Linux partitions (from within the other Linux partition), so I examined fstab on the partition I tried to mount from. The partition I wanted to mount was in the dynamic entries, listed as ext3. But that distro was antiX and formatted to ext4. So I changed the listing, and immediately became able to mount the partition.

Could this have happened because before I installed a copy of antiX on that partition (a few days ago), I had had another distro installed there and it used ext3? Perhaps the fstab on this partition didn't detect the change to ext4 and adjust? I supposed it would; isn't that what the dynamic entries are for?

lleb 05-06-2013 04:28 PM

depends, when you installed antiX, did you perform a full clean install with formats on all partitions including creating a new boot and root partition? if not, then yes it is very possible that there were some residual effects from the earlier instal.

TobiSGD 05-06-2013 04:59 PM

fstab entries will not change if you change the filesystem on a partition, you have to do that manually. What do you mean with "dynamic entries"?

newbiesforever 05-06-2013 10:41 PM

Quote:

Originally Posted by lleb (Post 4946162)
depends, when you installed antiX, did you perform a full clean install with formats on all partitions including creating a new boot and root partition? if not, then yes it is very possible that there were some residual effects from the earlier instal.

No, I don't usually bother to format anything, for the simple reason that the antiX installer says it will format the partition itself, so formatting it seemed pointless. But...I realize I may have been making an obvious mistake. I usually don't want to erase the existing user account, so I usually tell the installer to preserve /home, which means it won't format the partition. Therefore, if it's possible for the old installation to survive, maybe it did. (I thought it never would, since I remember watching the installation messages and seeing "deleting old system." Could the deletion have simply failed? Again, I didn't think so.)

Quote:

Originally Posted by TobiSGD (Post 4946173)
fstab entries will not change if you change the filesystem on a partition, you have to do that manually. What do you mean with "dynamic entries"?

What, do Slackware fstab files not use dynamic entries? In all my distros since I learned what an fstab file was (which have almost all been Debian-based), fstab has a section labeled "dynamic entries" where the system generates its own information entries for any disk partitions that the user has not made a manual entry for above the "dynamic entries" line. Here is my current fstab:
Quote:

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda6 / ext4 defaults,relatime 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0622 0 0
/dev/sda4 swap swap sw,pri=1 0 0
/dev/sde2 swap swap sw,pri=1 0 0
# Dynamic entries below
/dev/sda1 /media/sda1 ext4 noauto,users,exec,relatime 0 0
/dev/sda2 /media/sda2 ext3 noauto,users,exec,relatime 0 0
/dev/sda5 /media/sda5 ext4 noauto,users,exec,relatime 0 0
/dev/sr0 /media/sr0 iso9660 noauto,users,exec,relatime 0 0
/dev/sdc1 /media/sdc1 vfat noauto,users,gid=users,dmask=002,fmask=113,relatime 0 0
/dev/sde1 /media/sde1 ext4 noauto,users,exec,relatime 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/sr0 /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0

Until now, I assumed the system reevaluated and changed the dynamic entries at boot depending on what disk partitions it found, but after this, I'm not sure.

TobiSGD 05-07-2013 03:10 AM

Quote:

Originally Posted by newbiesforever (Post 4946289)
What, do Slackware fstab files not use dynamic entries? In all my distros since I learned what an fstab file was (which have almost all been Debian-based), fstab has a section labeled "dynamic entries" where the system generates its own information entries for any disk partitions that the user has not made a manual entry for above the "dynamic entries" line.

I have never seen a dynamic behavior in fstab files, not on Ubuntu, not on Debian, not on Arch and not on Slackware. And I would immediately complain to the distro developers why they think they should mess with my fstab files (this is a rather important file and having errors in there caused by something automatic can seriously mess up your system). I rather think that these entries are generated at install time once.

chrism01 05-07-2013 04:41 AM

I'm with TobiSGD; I've never even heard of that before.

newbiesforever 05-07-2013 09:37 AM

Quote:

Originally Posted by TobiSGD (Post 4946418)
I have never seen a dynamic behavior in fstab files, not on Ubuntu, not on Debian, not on Arch and not on Slackware. And I would immediately complain to the distro developers why they think they should mess with my fstab files (this is a rather important file and having errors in there caused by something automatic can seriously mess up your system). I rather think that these entries are generated at install time once.

That could be true, and I'm not sure anyone ever told me otherwise--I probably assumed the entries would change if my disk partitions changed. I'll unplug my USB sticks and see if anything happens.

lleb 05-07-2013 03:03 PM

Quote:

Originally Posted by newbiesforever (Post 4946629)
That could be true, and I'm not sure anyone ever told me otherwise--I probably assumed the entries would change if my disk partitions changed. I'll unplug my USB sticks and see if anything happens.

no your fstab is a static file, it is built that way so things do not change on the fly. mount and df will show you what is mounted and how to your system. also fdisk -l (thats a lower case L btw) will show you all disks that are attached to the system mounted or not.

suicidaleggroll 05-07-2013 05:24 PM

Quote:

Originally Posted by TobiSGD (Post 4946418)
I have never seen a dynamic behavior in fstab files, not on Ubuntu, not on Debian, not on Arch and not on Slackware.

Same. fstab is a static file, that "# Dynamic entries below" line is just a comment, nothing more.

edorig 05-13-2013 03:02 PM

Quote:

Originally Posted by newbiesforever (Post 4946289)
What, do Slackware fstab files not use dynamic entries? In all my distros since I learned what an fstab file was (which have almost all been Debian-based), fstab has a section labeled "dynamic entries" where the system generates its own information entries for any disk partitions that the user has not made a manual entry for above the "dynamic entries" line. Here is my current fstab:


Until now, I assumed the system reevaluated and changed the dynamic entries at boot depending on what disk partitions it found, but after this, I'm not sure.

What you are calling "dynamic entries" are simply fstab entries for removable media to allow user mounts
(hence the "noauto, users" in the 4th column). You should look at the man page for fstab (man 5 stab) and the
one for mount (man 8 mount) to understand the precise meaning of those user mounts.


All times are GMT -5. The time now is 03:29 AM.