danallen46 at airwired.net
Mon Sep 29 17:05:49 UTC 2008
In messing around trying to get a bootable FreeBSD system on a memory
stick I messed up and deleted my fstab file on my main FreeBSD STABLE
machine. Actually a script I was writing overwrote it... arrggghh.
I feel so stupid.
Anyway, my system now boots and then dies midway in boot because there
is no /etc/fstab. I get the mountroot prompt, I type in ufs:ad0s2a
(my main root partition) and it begins booting fine. So far so good.
It then goes into single user mode, which is fine, but it leaves my
main root filesystem as readonly, which is not so fine. This is
because of the missing /etc/fstab file.
I have a backup of my fstab file on a USB memory stick. I can mount
the stick on /mnt and then I type
/sbin/mount -F /mnt/fstab -f -u -w /
thinking that it will now update the drive to readwrite. It does
not. The command appears to succeed but running mount again shows the
file system is still read-only. It will not mount my main root file
system readwrite. I believe my main file system is fine. I can see
all of my files readonly.
I cannot change my root file system in order to copy my backup fstab
back to /etc/fstab because the file system refuses to be updated to
readwrite. This is my core problem.
fsck will not run because there is no /etc/fstab and there is no
option that I can find that will allow a different fstab to be used,
although running fsck is not my central problem.
Any ideas on how to force the file system to be readwrite long enough
for me to replace my /etc/fstab file?
More information about the freebsd-stable