LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   fstab will not mount partitions (https://www.linuxquestions.org/questions/fedora-35/fstab-will-not-mount-partitions-429986/)

n926bb 03-30-2006 08:05 AM

fstab will not mount partitions
 
FC5 fstab fails to mount block devices. Running FC5 in multi-boot. FC4 mounts the partitions with no problem. The partitions mount from the command line with no problem.

During FC5 boot the following mesage is displayed:
Start service netfd [y]
Mounting other file systems: mount: block device /dev/hda7 is write-protected, mounting read-only
mount: cannot mount block device /dev/hda7 read-only
mount: block device /dev/hda8 is write-protected, mounting read-only
mount: cannot mount block device /dev/hda8 read-only

fstab content:
LABEL=/123 / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/hdd1 swap swap defaults 0 0
/dev/hda7 /home/Ldat ext3 defaults 0 0
/dev/hda8 /home/Wdat auto defaults 0 0

Any ideas?

Thanks,
Manny

augurseer 03-30-2006 08:52 AM

whats with the /123, your labeling seems odd.


go into init 1 and see if you can do it, you msut make sure that the partition is ok and see if you can manualy mount it, if you can then unmount it run fsck and check out your fstab again, your fstab other than the labeling seems fine.

realy i cant give you a 100% on whats wrong but jsut try check the obvious.

Keruskerfuerst 03-31-2006 01:38 AM

You can not boot from GPT partition table (label partitioning).
Change the entry LABEL=123 / ext3 defaults 1 1

to

I need to knwo the partitioning; please post with fdisk -l;

PTrenholme 03-31-2006 08:21 AM

You might also want to "check out" the new udev system which can greatly simplify what you need to put into fstab. Look at man udev for a description and here for a "How-to".

n926bb 03-31-2006 08:44 AM

Thank you augurseer, Keruskerfuerst, PTrenholme for your reply.

The fstab entry LABEL=/123 / ext3 defaults 1 1 is part of the fstab created by the original installation of FC5. This entry may be the reason for the program's behavior.
There are many new systems in FC5 I need to investigate such as udev, the implications of the default hal policy decisions, etc. I welcome your your help and sugestions. Do any of your FC5 fstab has the entry: LABEL=/123 / ext3 defaults 1 1 ?

The partition table:

Disk /dev/hda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1824 14651248+ c W95 FAT32 (LBA)
/dev/hda2 1825 3349 12249562+ 83 Linux
/dev/hda3 3350 5174 14659312+ 83 Linux
/dev/hda4 5175 24792 157581585 5 Extended
/dev/hda5 5175 6999 14659281 83 Linux
/dev/hda6 7000 8824 14659281 83 Linux
/dev/hda7 8825 12473 29310561 83 Linux
/dev/hda8 12474 16122 29310561 c W95 FAT32 (LBA)
/dev/hda9 16123 18555 19543041 83 Linux

Disk /dev/hdd: 3249 MB, 3249340416 bytes
16 heads, 63 sectors/track, 6296 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 3148 1586560+ 82 Linux swap / Solaris
/dev/hdd2 3149 6296 1586592 b W95 FAT32

Partition hda2 has FC4 OS, hda3 has FC5, hda7 has Linux data, hda8 has Windows data.

n926bb 03-31-2006 12:52 PM

Well... I got brave and did some experimentation, all results were negative.

This is what I did:
Commented out "LABEL=/123 / ext3 defaults 1 1". made no difference

Commented out devpts /dev/pts devpts gid=5,mode=620 0 0". This change kept the system from booting. Had to undo using FC4 to restore FC5 fstab.

Experimented with hal policy as follows:
mv /usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi /root/

/sbin/service haldaemon restart

This creates an interesting set up. Several partitions (hda1, hda2, hda6, hda9) were mounted and placed at the directory tree and desktop. However neither hda7 or hda8 were mounted. Considering this setup rather risky, the changes were removed.

In the interim I wrote a small shell script to do the mounting after the system is loaded.

PTrenholme 03-31-2006 02:55 PM

What do you see when you run /sbin/e2label /dev/hda2, etc, for each of you Linux partitions? (This should display the partition labels. See man e2label for details.)

This, at least, will tell you where the partition labeled "123" is located. (You can, as su, use the same command to change that label to something more descriptive if you wish. Just remember to change /etc/fstab as well.)

n926bb 04-03-2006 12:43 PM

Running /sbin/e2label /dev/hda2 gives the following results:

$ sudo /sbin/e2label /dev/hda1
/sbin/e2label: Bad magic number in super-block while trying to open /dev/hda1
Couldn't find valid file system superblock.

$ sudo /sbin/e2label /dev/hda2
/

$ sudo /sbin/e2label /dev/hda3
/123

$ sudo /sbin/e2label /dev/hda4
/sbin/e2label: Attempt to read block from filesystem resulted in short read while trying to open /dev/hda4

$ sudo /sbin/e2label /dev/hda5
/sbin/e2label: Bad magic number in super-block while trying to open /dev/hda5
Couldn't find valid filesystem superblock.

$ sudo /sbin/e2label /dev/hda6
/12

$ sudo /sbin/e2label /dev/hda7

$ sudo /sbin/e2label /dev/hda8
/sbin/e2label: Bad magic number in super-block while trying to open /dev/hda8
Couldn't find valid filesystem superblock.

]$ sudo /sbin/e2label /dev/hda9
/1

Partition hda1 is vfat, hda4 is the extended partition, hda5 is empty and hda8 is vfat.

The labels 123, 12 and 1 appear to refer to the root partition of the different operating systems installed. Note that hda2 was the first Linux partition installed, it contains FC4. For the sake of a test I will install a second FC5 in hda5 later today. Will let you know the results.

Now, hda7 shows no label, it was manually mounted at /home/Ldat and is fully accessible.

n926bb 04-04-2006 10:25 AM

OK friends the mystery of the Label 123, Label 12, etc. has been cleared. I installed a new FC5 OS in hda5, that system fstab is:
LABEL=/1234 / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/hdd1 swap swap defaults 0 0

Every time a Linux/Unix operating system is added in a multi OS system, the mounting point / (root) is identified by a "Label".

I added a line to the fstab (/dev/hda7 /home/Ldat ext3 defaults 0 0) to see if there was a problem with the other FC5 installation. Both installations shows the same behavior ie, none auto-load the partition.

I also tested a FC4 test OS in hda6 by adding the same line to its fstab, it does auto mount hda7. The FC4 test OS fstab:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/12 / ext3 defaults 1 1
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=SWAP-hdd1 swap swap defaults 0 0
/dev/hda7 /home/Ldat ext3 defaults 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0

This problem happens only with FC5.

TokyoYank 04-04-2006 09:15 PM

FWIW, I found the following entry in Fedora's list of known bugsunder "System Components"
  • Fixed disks are not mounted by default in GNOME anymore.

FWIW Part 2, I was having problems mounting a non-fixed drive. However, it seemed so similar to the problem this guy had mounting a floppy which was blamed on GNOME, I didn't report it.

If anyone finds a fix, please post up! Thanks

n926bb 04-05-2006 03:31 PM

TokyoYank, that is interesting. I am in the process of configuring a second installation of FC5 just for making tests. Thus if things go really wrong I will still be able to communicate. As soon as it is ready I will test the adding the environmental variable _POSIX2_VERSION=199209 to the environment. Will keep you posted

n926bb 04-06-2006 07:27 PM

TokyoYank I tryed setting environment variable for Posix2. It did not do any good. Still can not automount the partitions at boot. I reported it to bugzilla. I run into other problems with FC5, can detect hardware sensors nor mount cds. Well, will keep trying and post results.

PTrenholme 04-07-2006 10:44 AM

Friends, the use of udev in FC5 is, I think, not optional, and automount things generally require that you create an appropriate entry in /etc/udev.d/.

This is not, of course, a "bug." It is a new "feature."

Read the release notes for details.

TokyoYank 04-07-2006 07:58 PM

I read over the Fedora Core 5 Release Notes

Through the PCMCIA description, I found a link describing udev (FAQ therein)

In layman's terms, am I right that udev is the current method for recognizing fixed devices? Shouldn't it "just work" for something like a hard drive partition? I haven't found a link describing how to modify /etc/udev.d/ to fix n926bb's problem.

There is also a problem for some people (like me) whose USB devices won't mount properly. In the udev FAQ I found a link describing HAL, which is for removable devices.

However, I'm inclined to believe it's a GNOME thing for my case, and that it will get fixed with an update before too long. Were I not a lazy bum, I'd install KDE and see if my problem exists there too.

Again, if anyone has finds a fix, please post up! Thanks

n926bb 04-08-2006 07:29 AM

Thanks PTrenholme and TokyoYank. During the boot process the partitions are detected as write-only, however when I mount them with the mount command they mount with no problem. I also noticed that HAL seems to be started after the fstab is executed. There is a guide to write udev rules @ http://www.reactivated.net/udevrules.php, which I will be reading today. TokyoYank I will test for you KDE and usb in my two FC5 installs, will report results. (I am running FC4 at this time)


All times are GMT -5. The time now is 08:11 AM.