/etc/fstab error, now don't start freebsd.

hi again.
i search in the forums the mode for "auto-mount" an ntfs disk and i found some method for do by /etc/fstab
i put the line:
Code:
/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
like i found in many post, in the /etc/fstab
I remain this

Code:
# Device		Mountpoint	FStype	Options		Dump	Pass#

/dev/ad10s3b		none		swap	sw		0	0

/dev/ad10s3a		/		ufs	rw		1	1

/dev/ad10s3e		/tmp		ufs	rw		2	2

/dev/ad10s3f		/usr		ufs	rw		2	2

/dev/ad10s3d		/var		ufs	rw		2	2

/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0

the problem is that now it does not start the system.
it arrives at a part that says:

Code:
/dev/ad10s3f: UN ALLOCATED I=5 OWNER=root MODE=0
/dev/ad10s3f: SIZE=0 MTIME=Feb 14 00:34 2010
/dev/ad10s3f: NAME=/lost+found
/dev/ad10s3f: UNEXETED SOFT UPDATE INCOSISTENCY; RUN fsck MANUALLY.
the followin file system had an unexpede incosistency
UFS: /dev/ad10s3f (/usr)
Automatic file system check failed, help!
error aborting boo (sending sigtem to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode.
enter full pathname of shell or RETURN for /bin/sh:

if i put return: say me all again.
if i put "enter": i have a same mode like an "Standar user" but with a lot of less option. i want to enter in root mode for edit the /etc/fstab/ and remobe the last line i put, but i can't.
 
When there's an error in /etc/fstab nothing will get mounted and the root (/) filesystem will be mounted read-only. To fix this:

Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a

Now you can edit /etc/fstab and fix the error. To continue booting just exit the shell.
 
Thanks

Sr. SirDice:
thanks_for_the_info.jpg


Thanks! it's work. i can login again.

can ask you other think?
if i put
Code:
/dev/ad11s1		/media/data	ntfs	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0
and don't work... do you know what i must put for "auto-mount" my second harddrive (ntfs) for read&write?
 
As SirDice already pointed out you should use ntfs-3g instead of ntfs. ntfs is FreeBSD's default driver which should be used with the ro (read-only) flag instead of rw (read/write).

Also, next time you need to modify /etc/fstab, don't reboot. It's not necessary and will lead to the problem you got if you have an error. Instead test the new entry by mounting it manually: # mount /media/data.
 
Like this i must put?

Code:
/dev/ad11s1	/media/data ntfs-3g	rw,mountprog=/usr/local/bin/ntfs-3g,late	0	0

Sorry, i am very new, a few mouth i start use freebsd, i never use any linux and i always use windows, i read the handbook of FreeBSD, but somethings escapes me.
 
Remove the mountprog option, it doesn't exist in FreeBSD's fstab.
 
mmm.. like this i must put in /etc/fstab?
Code:
/dev/ad11s1 /media/data ntfs-3g rw,,late 0 0
 
i put in /etc/fstab:
Code:
/dev/ad11s1            /media/data           ntfs-3g           rw,late
but nothing. Don't auto-mount to read&write :(
 
Auto mounting is going to be tricky. The 'default' filesystems shouldn't be a problem but I never tried it with ntfs-3g. I think this largely depends on the DE you're using.

The HAL FAQ is more or less written from a Gnome point of view but most of it (everything except the gconf bits) also works for KDE and XFCE.
http://www.freebsd.org/gnome/docs/halfaq.html
 
Beastie said:
It's not going to magically mount itself. Mount it manually: # mount /media/data.
i do that but don't work :S
Code:
mount: /media/data: No such file or directory

SirDice said:
Auto mounting is going to be tricky. The 'default' filesystems shouldn't be a problem but I never tried it with ntfs-3g. I think this largely depends on the DE you're using.

The HAL FAQ is more or less written from a Gnome point of view but most of it (everything except the gconf bits) also works for KDE and XFCE.
http://www.freebsd.org/gnome/docs/halfaq.html

mmmm.. i see...
 
Did you create the /media/data directory? "No such file or directory" usually means that the mountpoint doesn't exist.
 
Code:
# mkdir /media/data
# mount /media/data
Yes sr... i do that.
mmmmmmmmmm.....
wait.. i do something for the automount.. i do this:

i Enable vfs.usermount
Code:
FBSD# 	sysctl -w vfs.usermount=1
Configure vfs.usermount to be enabled on boot.
Code:
FBSD# 	echo vfs.usermount=1 >> /etc/sysctl.conf
Open the following file with an editor: /etc/devfs.conf
Code:
FBSD# 	ee /etc/devfs.conf
add this lines:
Code:
perm /dev/acd0 0666
perm /dev/acd1 0666
perm /dev/cd0 0666
perm /dev/cd1 0666
# Allow all USB Devices to be mounted
perm /dev/da0 0666
perm /dev/da1 0666
perm /dev/da2 0666
perm /dev/da3 0666
perm /dev/da4 0666
# Misc other devices
perm /dev/pass0 0666
perm /dev/xpt0 0666
perm /dev/agpart 0666
perm /dev/uscanner0 0666

Edit the following file: /usr/local/etc/PolicyKit/PolicyKit.conf
I change this:
Code:
	<config version="0.1">
	    <match user="root">
	        <return result="yes"/>
	    </match>
	    <define_admin_auth group="wheel"/>
	</config>
For this:
Code:
	<config version="0.1">
	        <define_admin_auth group="operator"/>
	        <match action="org.freedesktop.hal.storage.mount-removable">
	                <return result="yes"/>
	        </match>
	        <match action="org.freedesktop.hal.storage.mount-fixed">
	                <return result="yes"/>
	        </match>
	        <match action="org.freedesktop.hal.storage.eject">
	                <return result="yes"/>
	        </match>
	</config>
Edit the following file: /etc/fstab
And delete the line:
Code:
#/dev/acd0 /cdrom cd9660 ro,noauto 0 0
i do something bad?
 
Did you do
# mkdir /media/data
# mount /media/data
yet?
This will mount /dev/ad11s1 right away, and since you already have a line in /etc/fstab (/dev/ad11s1 /media/data ntfs-3g rw,late 0 0), it will "auto-mount" every time you boot the machine.



Now for the rest. In /etc/devfs.conf, remove all the /dev/. Device nodes are enough. Also add an ownership entry for every perm line you have, e.g. own acd0 root:eek:perator for the first one.

Add your user to the operator group, e.g. # pw group mod operator -m rokpa



Post the output of these commands:
% ls /dev/acd*
% ls /dev/cd*
% ls /dev/da*



Add these lines to /etc/rc.conf:
Code:
dbus_enable="YES"
hald_enable="YES"
Don't forget to start both:
# /usr/local/etc/rc.d/hald start
# /usr/local/etc/rc.d/dbus start
 
i have this

Beastie said:
Did you do
# mkdir /media/data
# mount /media/data
yet?
This will mount /dev/ad11s1 right away, and since you already have a line in /etc/fstab (/dev/ad11s1 /media/data ntfs-3g rw,late 0 0), it will "auto-mount" every time you boot the machine.

In /etc/fstab
i have this:
Code:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad10s3b            none            swap    sw              0       0
/dev/ad10s3a            /               ufs     rw              1       1
/dev/ad10s3e            /tmp            ufs     rw              2       2
/dev/ad10s3f            /usr            ufs     rw              2       2
/dev/ad10s3d            /var            ufs     rw              2       2
/dev/ad11s1             /media/Data     ntfs-3g rw,late         0       0

------------------------------------------------------------------------------------------------------​

Beastie said:
and when do this:
# mkdir /media/Data
Code:
mkdir: /media/Data: File exists
# mount /media/Data
Code:
mount: /media/Data: unknown special file or file system
Note: The name it's Data, no data. but i try with the two options.

------------------------------------------------------------------------------------------------------​

Beastie said:
Now for the rest. In /etc/devfs.conf, remove all the /dev/. Device nodes are enough. Also add an ownership entry for every perm line you have, e.g. own acd0 root:eek:perator for the first one.

i have this in /etc/devfs.conf
Code:
perm /dev/acd0 0666
perm /dev/acd1 0666
perm /dev/cd0 0666
perm /dev/cd1 0666


# Allow all USB Devices to be mounted
perm /dev/da0 0666
perm /dev/da1 0666
perm /dev/da2 0666
perm /dev/da3 0666
perm /dev/da4 0666
perm /dev/da5 0666
perm /dev/da6 0666
perm /dev/da7 0666
perm /dev/da8 0666
perm /dev/da9 0666

# Misc other devices
perm /dev/pass0 0666
perm /dev/xpt0 0666
perm /dev/agpart 0666
perm /dev/uscanner0 0666
Note: With this, i plug an USB-Drive/USB-Key and mount automatically with NTFS or FAT32 partition, but only for Read.

------------------------------------------------------------------------------------------------------​

Beastie said:
Add your user to the operator group, e.g. # pw group mod operator -m rokpa

Yes, my user are [wheel,operator] group

------------------------------------------------------------------------------------------------------​

Beastie said:
Post the output of these commands:
% ls /dev/acd*
Code:
/dev/acd0
% ls /dev/cd*
Code:
ls: No match.
Note: when i put a cd/dvd my DVDburner don't recognize any CD/DVD in KDE4, but if i put the DVD installation of FreeBSD and enter in # sysinstall for install some packet, the DVD work, but only for # sysinstall
% ls /dev/da*
Code:
ls: No match.


------------------------------------------------------------------------------------------------------​

Add these lines to /etc/rc.conf:
Code:
dbus_enable="YES"
hald_enable="YES"
Don't forget to start both:
# /usr/local/etc/rc.d/hald start
# /usr/local/etc/rc.d/dbus start

yes, i do that befor install Xorg and Kde4. it's the first i do (after [CMD=""]freebsd-update[/CMD])
 
Okay, try this instead: # ntfs-3g /dev/ad11s1 /media/Data.
I think you should have fusefs_enable="YES" in /etc/rc.conf. Start it with # /usr/local/etc/rc.d/fusefs start.


Since you only have 1 ATAPI CDROM drive, no SCSI drive, and potentially 1 or 2 USB pen/drives, your /etc/devfs.conf should only contain:
Code:
own acd0 root:operator
perm acd0 0666
In /etc/rc.conf add devfs_system_ruleset="localrules", and create a file named /etc/devfs.rules containing the following data:
Code:
[localrules=5]
add path 'da*' mode 0660 group operator
Start it with # /etc/rc.d/devfs start.
 
doing

Beastie said:
Okay, try this instead: # ntfs-3g /dev/ad11s1 /media/Data.
I think you should have fusefs_enable="YES" in /etc/rc.conf. Start it with # /usr/local/etc/rc.d/fusefs start.
Yes sr. I have fusefs_enable)"YES" in /etc/rc.conf (and it's started too)

------------------------------------------------------------------------------------------------------​
Beastie said:
Since you only have 1 ATAPI CDROM drive, no SCSI drive, and potentially 1 or 2 USB pen/drives, your /etc/devfs.conf should only contain:
Code:
own acd0 root:operator
perm acd0 0666
OK! I only have now in the /etc/devfs.conf
that 2 lines line. now reboot and say what happens

Beastie said:
In /etc/rc.conf add devfs_system_ruleset="localrules", and create a file named /etc/devfs.rules containing the following data:
Code:
[localrules=5]
add path 'da*' mode 0660 group operator
Start it with # /etc/rc.d/devfs start.

created too.
Rebooting.
 
ok, that give me an error.
reportedly, missing partitions.
i do:
# fsck -y
mount -u /
mount -a -t ufs
swapon -a

and nothing.
i think and think and i decided to remove "Data" dir you say me to create, ( /etc/Data )
ok, the loading it's resumed and finish the load of the system, and can logme again.
now, only with # ntfs-3g /dev/ad11s1 /media/Data give me and error, (but mount only for read). it's say:
Code:
mount_fusefs: /media/Data: No such file or directory
fuse: failed to mount file system: Unknown error: 0
The "auto-mount"?
No, no "auto-mount" yet.
i try to think but I have no idea either.
what can i do?
 
rokpa92 said:
ok, that give me an error.
What error exactly?

rokpa92 said:
( /etc/Data )
Unless this is a typo, the directory should be /media/Data since that's what you have in /etc/fstab. So again, if you don't have that directory, create it and keep it. The system needs a mountpoint.

rokpa92 said:
now, only with # ntfs-3g /dev/ad11s1 /media/Data give me and error, (but mount only for read). it's say:
Code:
mount_fusefs: /media/Data: No such file or directory
fuse: failed to mount file system: Unknown error: 0
1. Does % kldstat return fuse.ko among other things?
2. Post the output of % ls /dev/ad*.
3. Post the output of % fdisk ad11.
 
Beastie said:
What error exactly?

Unless this is a typo, the directory should be /media/Data since that's what you have in /etc/fstab. So again, if you don't have that directory, create it and keep it. The system needs a mountpoint.

this:
Code:
mounting late file systems: mount: /dev/ad11s1 :operation not suported by device.
mounting /etc/fstab filesystems failed, startup aborted, error aborting boot (sending SIGTERM to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single use mode.
Enter full pathname of shell or return for /bin/sh

so.. i remove /media/Data to continues. i can't continue in the loading process of the system. so, i remove that and load good as usualy.

Beastie said:
1. Does % kldstat return fuse.ko among other things?
2. Post the output of % ls /dev/ad*.
3. Post the output of % fdisk ad11.
wait me, doing now...
 
Back
Top