# Issue with fstab FreeBSD9.2



## zongosaiba (Nov 30, 2013)

Greetings, 

I have just installed a fresh FreeBSD9.2 & KDE 4.10 (Fantastic) in a VM using VMware 10. The host is Windows 8.1. I have installed the tools with some success. the copy and drag are not activated but that is not the issue I have.  I noticed at boot an issue with fstab. 

Error message:

```
Nov 30 15:16:46 sakura kernel: fstab: /etc/fstab:7: Inappropriate file type or format
Nov 30 15:16:46 sakura kernel: fstab: /etc/fstab:6: Inappropriate file type or format
```

Copy of fstab:

```
Device        Mountpoint      FStype  Options Dump    Pass#
/dev/da0p2      /                      ufs     rw             1       1
/dev/da0p3      none            swap    sw             0       0
/dev/da0p4      /tmp                ufs     rw             2       2
/dev/da0p5      /usr                 ufs     rw             2       2
/dev/da0p6      /var/log           ufs     ufs            2       2
/dev/da0p7      /var/mail          ufs     ufs            2       2
/dev/da0p8      /var                 ufs     rw              2       2
```

First the boot did not occur because fstab complained about not being able to find /var/log. I changed the FStype of both /var/log and /var/mail to ufs (prior to changing to UFS, both had FStype empty), proceeded to relaunch the VM and succeeded to log into graphical mode.  I knew I had not resolved the fstab issue but just found a workaround to enable me to boot into graphical  mode. BTW, KDE 4.10 on FreeBSD, that is my dream desktop 

I've been strolling the Internet since this morning but could not find the solution to my problem.  I have to admit that my knowledge of the FreeBSD system does not extend very far  :e 

Could anyone help me find a solution?  I really do not feel like reinstalling the entire system. 

zongo saiba


----------



## Juanitou (Nov 30, 2013)

It would be easier to read (and maybe help) if you used the *code* tags. What are the two _VM_ characters doing at the end of the last line of fstab?


----------



## zongosaiba (Nov 30, 2013)

Thanks for your reply. That was an error when pasting.  Below is the corrected fstab.

```
/dev/da0p2      /                      ufs     rw             1       1
/dev/da0p3      none            swap    sw             0       0
/dev/da0p4      /tmp                ufs     rw             2       2
/dev/da0p5      /usr                 ufs     rw             2       2
/dev/da0p6      /var/log           ufs     ufs            2       2
/dev/da0p7      /var/mail          ufs     ufs            2       2
/dev/da0p8      /var                 ufs     rw              2       2
```


----------



## Juanitou (Nov 30, 2013)

You should replace ufs by rw in the fourth column of lines 5 and 6.


----------



## zongosaiba (Nov 30, 2013)

First all @Juanitou, thanks for your reply.

Second sorry to all for the pasting (format). I have just noticed how messy it is. First time to post 

I have replaced the fourth column (Options) with "rw" but to no avail. I still get the same error message as before.

```
Nov 30 15:16:46 sakura kernel: fstab: /etc/fstab:7: Inappropriate file type or format
Nov 30 15:16:46 sakura kernel: fstab: /etc/fstab:6: Inappropriate file type or format
```

I have emptied the third column (FStype) as it was when created by the system, rebooted and it did not produce the error message above but a different one and the system could not boot but in single user mode. The error message mentioned that it could not mount /var/log/ because it could not find it.  

I have to admit that I am lost here.  I will keep looking. I could try to get rid of /var/log and /var/mail. That would defeat the purpose.  The idea behind building the FreeBSD box is to create a server. 

Kind regards, 

zongo saiba


----------



## protocelt (Nov 30, 2013)

Hi, 

From my understanding, you're using separate partitions for your child file systems which prevents the system from mounting /var/log and /var/mail as /var isn't mounted and doesn't exist yet when trying to mount them. I'm not sure however as I've only ever used ZFS. Try changing your fstab entries to the following and see if that alleviates the problem.


```
/dev/da0p2	/			ufs			rw		1	1
/dev/da0p3	none			swap			sw		0	0
/dev/da0p4	/tmp			ufs			rw		2	2
/dev/da0p5	/usr			ufs			rw		2	2
/dev/da0p8	/var			ufs			rw		2	2
/dev/da0p6	/var/log		ufs			rw		2	3
/dev/da0p7	/var/mail		ufs			rw		2	3
```


----------



## fonz (Dec 1, 2013)

protocelt said:
			
		

> From my understanding, you're using separate partitions for your child file systems which prevents the system from mounting /var/log and /var/mail as /var isn't mounted and doesn't exist yet when trying to mount them.


That's a good shout. From fstab(5):


> The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.


----------



## zongosaiba (Dec 1, 2013)

Thank you guys for all your replies: my issue is solved.


----------

