# Fixit Livefs: Exiting with Mounted Internal Drive



## boomer3200 (May 6, 2012)

My understanding has always been that FreeBSD syncs and unmounts any mounted internal drives at shutdown time.

What happens from Fixit Livefs recovery environment if a drive partition like the root at /dev/ad0s1a is mounted rw under /mnt when you exit?

This happened when I was copying a saved fstab after 
	
	



```
ahci_load="YES"
```
 did not change all my drive letters to ada* as expected (the reason why is another interesting hardware story).  Thought I was set until I remembered the umount later.

I'm curious in general about this issue in the Fixit environment though, since it seems useful for doing backups while I work on setting-up a live DVD or flashdrive.  The livefs CD and my installation are 8.2.


----------



## boomer3200 (Aug 8, 2012)

*Found Answer Re: Unmount on Shutdown/Reboot*

I found the answer after researching a bit and wanted to follow-up in case anyone had a similar question about mounted drives in the future.

Basically exiting out of sysinstall on the livefs cd caused a restart that took should have taken care of the unmount.

Both shutdown and reboot work as follows:


 Freebsd runs unmount on any drives listed in /etc/fstab as part of calling the rc.shutdown scripts at the start of shutdown or reboot.

 The shutdown and reboot commands also flush the cache, write any changes to disk, and unmount any remaining mounted drives by calling vfs_unmountall if you look into the sources.


----------

