# How to remove boot manager  in freebsd 8.0 ?



## riku (Apr 13, 2010)

I can not use this command 


```
fdisk -B -b /boot/boot0 ad0
```

error info


```
fdisk: Class not found
fdisk: Faild to write sector zero
```


----------



## Bunyan (Apr 13, 2010)

You'll never do that as long as the filesystems are mounted (*fdisk* operates on unmounted filesystems only).
You need a *FreeBSD LiveFS CD*.
I am not sure whether it works in *single-user* mode.


----------



## vermaden (Apr 13, 2010)

@riku

Try that:

```
# sysctl kern.geom.debugflags=16
# kldload geom_mbr
# fdisk -B -b /boot/boot0 ad0
# sysctl kern.geom.debugflags=0
# kldunload geom_mbr
```

@Bunyan

*fdisk(1)* does not operate on filesystems ... no matter if mounted or unmounted.


----------



## Bunyan (Apr 13, 2010)

Perhaps I should have said *devices* i.e files that are in use.


----------



## phoenix (Apr 13, 2010)

And, depending on the version of FreeBSD, you may need to set debugflags to 17 before you can manipulate an in-use device.


----------



## riku (Apr 14, 2010)

vermaden said:
			
		

> @riku
> 
> Try that:
> 
> ...



Thanks !


----------

