View Full Version : duplicated entries in fstab
pcbsdusr
12-26-2005, 02:07 AM
i have all update patches installed and i now have duplicated mount points on my fstab and drives list for the same hard drives.
I had three drives showing up as "Windows" (1 is my windows XP setup, the second my FAT32 Windows-PC-BSD interchange partition and a third NTFS partition where i backup stuff from windows) and one named "linux" from my ubuntu setup.
I now have the same hard drives listed on fstab and drives list as "Hard Disks".
This should be fixed with the next patch.
*UPDATE*
My "Hard drive" mount point for the linux partition is not working. I press the icon and a window opens in: "/mnt/ad0s2" but it is empty. Can someone check for this please?
Thanks!
Cheers,
Renato Flórido
Majorlag
12-26-2005, 03:45 AM
I don't know how duplicate entries got into fstab, but the drive detection subsystem created the "Hard Disk" entries in drives. Did you add the Windows and and Linux drives, and there entries in fstab by hand?
I don't know why your "Linux" drive entry won't work. Tell me, does its corresponding "Hard Disk" entry work?
Anyway, theres two ways I think you can go about this:
1) The "natural" way. Edit /etc/fstab and remove all the dublicate entries (both entries for each duplicated drive). Delete all "Hard Disk", "Windows", and "Linux" drive entries from /PCBSD/Computer/Drives. As root, run /PCBSD/Scripts/refresh_fstab.sh.
2) Edit /etc/fstab and remove the duplicate entries, just the ones that look like this:
/dev/### /mnt/### rw, noauto 0 0 where ### is the device name (like "ad0s2) in both instances. Remove the "Hard Disk" entries from /PCBSD/Computer/Dirves/.
If those don't work I'll need some more information, like the contents of /etc/fstab, and the contents of the .desktop entries in /PCBSD/Computer/Drives for starters.[/quote]
pcbsdusr
12-26-2005, 10:15 AM
The old entries were already there before the fstab.orig removal patch and stayed there. They were automaticaly placed there by the sysem before the fstab change. I know the new entries were placed there by the auto detection mechanism, i just dont know why didn't the older entries stayed.
Of course, i have deleted those old entries on my system (wish i had left the linux one) by hand on my fstab and also deleted the mount icons on the drives list.
The correspondent entry opens the mnt/ad0s2 directory as it should but the directory appears to be empty. The hard drive itself (hardware) is the same where my Windows and BSD partitions are hosted.
I have even removed all instances of a ad0s2 drive so it could be created fresh but the behavior remained the same.
"/dev/### /mnt/### rw, noauto 0 0" seems to be correct just like it is displayed there so i can't really get it (that's why i asked for help)
I'll display the extra information you ask for in a couple of minutes as soon as i log off from xp.
***UPDATE***
Fstab:
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s3b none swap sw 0 0
/dev/ad0s3a / ufs rw 1 1
/dev/ad0s1 /mnt/ad0s1 auto rw,noauto 0 0
/dev/ad1s1 /mnt/ad1s1 auto rw,noauto 0 0
/dev/ad1s2 /mnt/ad1s2 auto rw,noauto 0 0
/dev/acd0 /mnt/acd0 auto ro,noauto 0 0
/dev/fd0 /mnt/fd0 auto rw,noauto 0 0
/dev/ad0s2 /mnt/ad0s2 auto rw,noauto 0 0
The last partition listed is the one i have problems with... As you see, it s just as you wrote.
The drives mount point icon directory has the folowing icons in it:
Floppy, CDrom and four hard drives, one of them being the linux partition i mention.
I have renamed the entries of the hard drives to:
Ubuntu
WinXP
Fat32
NTFS
Those are simply links so this is no problem at all. Also, i have removed the
"/dev/ad0s2 /mnt/ad0s2 auto rw,noauto 0 0"
entry from fstab once and the new entry (plus respective new mount icon) dont work correctly either...
I remember the old entry for the linux partition created on fstab mentioned the ext2 format and the new one doesnt. could this be the problem?
The windows partition entries also had "ntfs" and "msdos" there and dont have now but still work...
Thanks mate!
Cheers,
Renato Flórido
Majorlag
12-26-2005, 07:49 PM
I remember the old entry for the linux partition created on fstab mentioned the ext2 format and the new one doesnt. could this be the problem?
The windows partition entries also had "ntfs" and "msdos" there and dont have now but still work...
Thats normal. FreeBSD has no built in support for autdetecting what filesystem to use for any given drive, so I had to hack together a script to do it (mount_auto). So entries created by the drive detection subsystem have their filesystem type lised in fstab as "auto". Its possible that something is wrong with mount_auto causing it to not mount ext2 filesystems correctly...
Can you mount ad0s2 manually (mount -t ext2fs /dev/ad0s2 /mnt/ad0s2)?
If so, try changing the line in fstab from "/dev/ad0s2 /mnt/ad0s2 auto rw,noauto 0 0" to "/dev/ad0s2 /mnt/ad0s2 ext2fs rw,noauto 0 0". But before you do that, try to mount the drive normally and rund "dmesg | tail" and send me the output.
pcbsdusr
12-26-2005, 09:06 PM
Yes, it works correctly now. i am going to manually edit the fstab.
now we need to tell kris to fix this. It was working well before the fstab.orig removal patch.
Kris should also delete older duplicated entries on fstab and drives list with the next patch.
Here is what you asked for.
PCBSD# dmesg | tail
Timecounters tick every 1.000 msec
acd0: DVDR <HL-DT-ST DVDRAM GSA-4082B/A201> at ata1-master UDMA33
ad0: 190782MB <Seagate ST3200822AS 3.01> at ata2-master SATA150
ad1: 114473MB <Seagate ST3120026AS 3.18> at ata3-master SATA150
SMP: AP CPU #1 Launched!
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GSA-4082B A201> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s3a
Thanks mate! :D
Charles
12-26-2005, 09:10 PM
Same problem here BTW...
Majorlag
12-26-2005, 09:22 PM
Same problem here BTW...
which part, the inability to mout ext2 filesystems, or both?
Oh, and pcbsdusr, thanks for the dmesg, but I needed the output after a failed mount. Could you post the output of this command for me?
mount -t auto /dev/ad0s2 /mnt/ad0s2 If it is successful, then can you access the data in /mnt/ad0s2, or is it empty?
pcbsdusr
12-26-2005, 09:29 PM
Add a third problem i am sure came after Patch#3:
here is the output of "dmesg | tail" when my fat32 drive is mounted:
PCBSD# dmesg | tail
ad0: 190782MB <Seagate ST3200822AS 3.01> at ata2-master SATA150
ad1: 114473MB <Seagate ST3120026AS 3.18> at ata3-master SATA150
SMP: AP CPU #1 Launched!
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GSA-4082B A201> Removable CD-ROM SCSI-0 device
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s3a
mountmsdosfs(): bad FAT32 filesystem
mountmsdosfs(): bad FAT32 filesystem
PCBSD#
The partition has no problems under windows or pcbsd so i can't tell why the error...
I have posted about it here:
http://www.pcbsd.org/forums/viewtopic.php?t=2387
Charles
12-27-2005, 12:00 AM
I have duplicated entries in my fstab for other partitions.
Majorlag
12-27-2005, 01:17 AM
Charles, I'm going to hazzard a guess that the only duplicated partitions are the ones that are not the primary PCBSD and are not CD-ROMs. Am I correct?
If so, this sounds like a problem with the patch not properly removing all the effects of fstab.orig. The only fix that I can think of is to simply delete the extra entries as I mentioned above.
pcbsdusr
12-27-2005, 08:03 AM
That is correct. Deleting the extra fstab entries and respective icons on the drive list takes care of the problem of duplication.
However, there is also the bug with ext2 mounting i found which needs some attention.
Charles
12-27-2005, 04:14 PM
Majorlag: That's right.
pcbsdusr
12-27-2005, 09:06 PM
i reinstalled to check about a possible error so i got the chance to copy my original fstab.
RC1 no patches:
# File Auto-Generated by PC-BSD from /PCBSD/conf/fstab.orig
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s3b none swap sw 0 0
/dev/ad0s3a / ufs rw 1 1
/dev/ad0s1 /mnt/ad0s1 ntfs ro,noauto 0 0
/dev/ad0s2 /mnt/ad0s2 ext2fs ro,noauto,acls=777 0 0
/dev/ad1s1 /mnt/ad1s1 msdos ro,noauto,acls=777 0 0
/dev/ad1s2 /mnt/ad1s2 ntfs ro,noauto 0 0
/dev/acd0 /mnt/cdrom cd9660 ro,noauto 0 0
anyone know what "acls=777" means?
And here it is after i updated up to patch#4
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s3b none swap sw 0 0
/dev/ad0s3a / ufs rw 1 1
/dev/ad0s1 /mnt/ad0s1 auto rw,noauto 0 0
/dev/ad0s2 /mnt/ad0s2 auto rw,noauto 0 0
/dev/ad1s1 /mnt/ad1s1 auto rw,noauto 0 0
/dev/ad1s2 /mnt/ad1s2 auto rw,noauto 0 0
/dev/acd0 /mnt/acd0 auto ro,noauto 0 0
/dev/fd0 /mnt/fd0 auto rw,noauto 0
strangely, this time i got no duplicated entries here but the drive icons on the drive list are duplicated for sure.
if you look close, the fs type is set to auto now and some other changes are easily visible.
to acess my ubuntu partition formatted in ext2 i have to manually edit fstab changing the fs type from auto to ext2fs otherwise it doesnt work correctly.
it seems the detection mechanism is failing to set the fs type correctly...
Majorlag
12-28-2005, 12:35 AM
The acls=777 bits have to do with access control lists, a more advanced form of security than the standard permissions. Looks to me like they're basically just allowing users all permissions on those drives, overriding their read-only mount status.
Your /PCBSD/Computer/Drives entries are duplicated because the new detection system names things differently than the old one and didn't know they were already there. Same fix as before. Not really worth patching since (I think) 1.0 final will use the new system exclusively and it will never come up.
That bit with ext2 really bothers me. Theres no reason I can think of that auto shouldn't work. It probably has to do with the hackish nature of mount_auto, which basically just keeps trying to mount with different FSs until one works, which I am rewriting anyway. So hopefully that will be fixed in the next patch.
Speaking of which, the new version of the drive subsystem:
Will have a rewritten mount_auto, supporting more filesystems in a cleaner way
Should handle extended partitions (aka Logical Drives) properly
Might be able to handle vinum disks and other crazy configurations, if I can get some suckers^W testers to help me.
Amigamerlin
01-02-2006, 10:24 AM
I don't know if this can be a bug but ....
In my first installation of PC-BSD in my HD I setup 3 primary partition where I installed Winxp on the first, PC-BSD on the second an leaved free the third partition for data sharing. All went ok: PC-BSD recognized all the partition correctly. Well after a while I decided to change the 3th partition, removing it and create a new partition, logical this time, with assigned 3 other partition. On this first 2 logical partion I installed Ubuntu linux distro (one for swap and one for root with RaiserFs) and I've leaved the third logical partion free for use with Fat32 FS. Well, PC-BSD is unable to read no one of this 3 logical partion and the "driver menù" is not updated let me select a driver then can't be mounted because don't exist anymore.
Anyone know how to fix it ? I would like to have at least the Fat32 (logical partion) accessible from PC-BSD.
Is available any script that do the job? I've tried refresh_fstab.sh but seems don't have any effect updating the Fstab configuration.
Thanks in advance.
Majorlag
01-03-2006, 12:50 AM
refresh_fstab.sh doesn't support extended partitions yet. Your best bet would be to maually add the entries into fstab and manually create the icons in /PCBSD/Computer/Drives.
Amigamerlin
01-03-2006, 06:53 AM
refresh_fstab.sh doesn't support extended partitions yet. Your best bet would be to maually add the entries into fstab and manually create the icons in /PCBSD/Computer/Drives.
Thanks,
please how this should be done? how I can collect the data to add the entry manually ? Is there a procedure to detect the assigned partition name correctly? And please, can you explain how to create a mount icons in /PCBSD/Computer/Drives ?
Sorry I'm a newbie :(
Thanks in advance.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.