How To FreeBSD Remount Partition

by Vivek Gite [Last updated: May 21, 2008]

Q. How do I remount partition under FreeBSD? How do I mount readonly partition as (remount) read write mode?

A. Linux or other Unixish oses need to pass -o remount option to mount command. However, FreeBSD does not require any special option to remount file system. It can use standard mount command. The mount utility calls the mount(2) system call to prepare and graft a special device or the remote node (rhost:path aka NFS) on to the file system tree at the point node. For example if your file system is mounted in read only mode then you can remount it using following command (log in as a root user):

Freebsd Remount Command

Type the following command as the root user (superuser):
# mount -o rw /dev/ad0s1a /
OR
# mount -o rw /
Where,

  • -o : Takes different options as follows:
  • rw : Read write
  • ro : Read only

Make sure you replace /dev/ad0s1a and / with appropriate values.

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 1 comment… read it below or add one }

1 Steve Kamerman 07.18.08 at 11:31 am

Your first example did not work for me on FreeBSD 6.1, but if I leave the device off (like in your second command), it does work properly as shown here:


frenzy:~# mount -o rw /dev/ad0s1a /mnt/ad0s1a.ufs/
mount: /dev/ad0s1a: Operation not permitted
frenzy:~# mount -o rw /mnt/ad0s1a.ufs/
frenzy:~#

Thanks for the tip (I’m a Linux geek, so these subtle differences are annoying)!

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , ,

Previous post: How To: Find Iut If MySQL Is Running On Linux Or Not

Next post: How to find out Router mac address