• 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

osp

Member


Messages: 28

#1
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:
Code:
mount -o remount,rw /
which does not work on FreeBSD and then I tried
Code:
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?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,692

#2
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.
 

usdmatt

Daemon

Thanks: 419
Messages: 1,210

#3
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.

Code:
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.