• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved [Solved]: mount -o rw / doesn't work



Messages: 28

I wanted change the default shell of the only user on my testing installation of FreeBSD which is root...and used to from linux I didn't even bother to look where was bash actually installed and put /bin/bash in passwd file and now I cannot log in :)

First I tried in rescue mode:
mount -o remount,rw /
which does not work on FreeBSD and then I tried
mount -o rw /
and also nothing. I googled up this: http://www.cyberciti.biz/faq/howto-freebsd-remount-partition/ so it should work - what am I doing wrong?


Staff member

Thanks: 6,101
Messages: 26,992

Re: mount -o rw / doesn't work

Those commands are for UFS. I'm guessing you have ZFS? In that case it's zfs set readonly=off zroot.



Thanks: 453
Messages: 1,276

Re: mount -o rw / doesn't work

As mentioned there is no remount option on FreeBSD. To be honest, having that as an option doesn't make much sense either.

In rescue mode the root file system is already mounted, in read-only mode. Trying to remount the file system will not work, because you cannot un-mount root. You need to use the -u option to change the options of an already mounted file system.

mount -u w /
-u The -u flag indicates that the status of an already mounted file
system should be changed. Any of the options discussed above
(the -o option) may be changed; also a file system can be changed
from read-only to read-write or vice versa.