[Solved] I have an error in my /etc/fstab file, now I cannot get my rig to boot

Status
Not open for further replies.

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
Code:
//nameOfOtherNAS/Folder /media/nameOfFreeNASDirectory smbfs guest,rw,-n-Iip.address 0 0

Is the contents of the fstab file. It previously was functional with
Code:
//user@nameOfOtherNAS/Folder /media/nameOfFreeNASDirectory smbfs rw,-n-Iip.address 0 0

but I still had to enter the password.
 
Last edited:

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
Hmm. Most Youtube doesn't make it very easily thru the UTM here. But I guess the question is, what's the contents of /etc/fstab, and what's actually mounted. I'm not actually that familiar with FreeBSD systems booting from ZFS and where the magic happens in the boot sequence for a ZFS filesystem to mount. So, two things, show us the contents of /etc/fstab

Code:
# cat /etc/fstab


and then also

Code:
# df /


In theory you can twiddle a fs back and forth between rw and ro.

Code:
# df /
Filesystem                                        1K-blocks    Used    Avail Capacity  Mounted on
freenas-boot/ROOT/FreeNAS-9.3-STABLE-201506292332  29232715 1043211 28189503     4%    /
# mount -u -o ro freenas-boot/ROOT/FreeNAS-9.3-STABLE-201506292332 /
# mount -u -o rw freenas-boot/ROOT/FreeNAS-9.3-STABLE-201506292332 /
#


But I don't really know how that interacts with a broken /etc/fstab offhand.


Unfortunately that did not work. I'm currently exploring other options.
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
I give up. I was hoping to learn something about ZFS by maybe trying to mount this on a different machine but everything is either super buggy, super out of date, or not easy for me to understand. Time to reinstall and reconfigure.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Sorry to hear that. Without at least seeing what's gone awry in fstab, it is hard to know how to poke at things to see what might help you.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Perhaps a better way of persistently mounting a samba share is to create an init script that uses the "mount_smbfs" command to mount the samba share. It will then be part of your freenas config file (in case you have USB failure, or an upgrade changes /etc/fstab for some reason) and less likely to screw up your server.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
As long as there's no dependencies that would be a problem, yes, that's definitely a better way to go.
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
You know, I was thinking about this after wiped and started over
, https://forums.freenas.org/index.php?threads/mount-samba-smb-cifs-persistently-through-fstab.27331/ this is the tutuorial I followed to Mount shares, it never mentions /etc/fstab it has another file path which I used when I messed things up. I wonder if /etc/fstab is generated and that is why I wasn't able to fix the issue. I was editing /etc/fstab last night and every time my freenas box was rebooted, my changes were gone.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh, and, I demoted that thread out of the how-to area. It's just a train wreck of an idea.
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
Oh, and, I demoted that thread out of the how-to area. It's just a train wreck of an idea.
Well, it works just fine, it just needs a huge disclaimer with something on the lines of "if you have a typo, your machine won't boot, backup config before messing with it!" But if someone were to figure out a script that could run on boot, I would much prefer that too.
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
So I made a backup of my config after I messed with my /conf/base/etc/fstab again and when I updated today, I guess I had another error in it. Turns out, if I would have typed in nano /conf/base/etc/fstab instead of nano /etc/fstab I would have been able to boot. Lesson learned.
 
Status
Not open for further replies.
Top