# Unmounting / ?



## alanlarsen-dk (Jun 10, 2009)

Hi, whenever I start my system it tells me that I failed to dismount / when I last closed down my system and as consequence there is at lot of turmoils and problems.

Should I unmout / before closing down?

And if so what is the correct command?

I use freebsd 7.1 on an old T20 IBM notebook with KDE 3.5 as GUI. 

When I close down I usually use the graphical interface in KDE, but I have tried with varius orders in the terminal, such as shutdown -h now, shutdown -p now, shutdown -r now (for restarting), but I get the same result.

Thanks!

/Alan


----------



## vivek (Jun 10, 2009)

Run fsck(8) to see if you have any problem on file system. Usually, done booting into a single user mode. At welcome to FreeBSD! boot menu press [spacebar] key to pause default booting. Type number 4 key (4 number) to boot into single user mode. Hit [enter] or type /bin/sh for default shell and finally type:

```
# fsck /dev/YOUR-DEV
```


----------



## SirDice (Jun 10, 2009)

The problem with / is that you can fsck it in single user mode but you can't fix the errors. That's because / is mounted (read-only). To fix any errors on the partition that has / you will need to boot of a live cd.


----------



## trev (Jun 10, 2009)

SirDice said:
			
		

> The problem with / is that you can fsck it in single user mode but you can't fix the errors. That's because / is mounted (read-only). To fix any errors on the partition that has / you will need to boot of a live cd.



Rather than booting with a live CD, I simply re-mount the root partition r/w (with mount -u) and then rerun fsck (if needed).


----------



## SirDice (Jun 10, 2009)

trev said:
			
		

> Rather than booting with a live CD, I simply re-mount the root partition r/w (with mount -u) and then rerun fsck (if needed).



IIRC certain filesystem errors can't be fixed when the partition is mounted.


----------



## phoenix (Jun 11, 2009)

You can fix filesystem errors on filesystems that are unmounted, or mounted read-only.  You cannot fix errors on filesystems that are mounted read-write (rechnically you can, but you can render the filesystem unusable by doing so).

Otherwise, how would the automatic fsck at boot work, as you need to be able to access / in order to load/run fsck.  

(Well, you can, by using UFS snapshots and background fsck, but that's technically working on the snapshot and not the live filesystem.)


----------



## alanlarsen-dk (Jun 16, 2009)

Hi all, Thanks so far for alle your heltp. I've tried some of the suggestions (just typing fsck, or umount -u then fsck), but nothing as such happened - no fixing  I still get the message on every startup that "/ wasn't properly dismounted".

Now I'm ready to try to boot of a live CD. But how is that done? How do I acquire the live CD?

When I installed FreeBSD I used 3 CDs with everything on. I have tried to boot from them, but got the message that the system couldn't locate the live CD. So I suppose that the live CD isn't "on" them. So how to proceed?

Thanks

Alan


----------



## Beastie (Jun 16, 2009)

The live CD is in the same directory as the 3 you got:
ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/7.2/

This is the one for the i386:
ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/7.2/7.2-RELEASE-i386-livefs.iso


----------



## Gkarfield (Jun 16, 2009)

hm, i use freebsd for 4 years, finally i found that  installation cd works as live cd.
 [i did some wrong setting  at some file , so  i fixed it that way]

by the way, you can get dvd instead cd so you dont have to change the discs  many times for the istallation


----------

