# /var/crash is empty after crash



## kenorb (Nov 15, 2010)

After kernel crash

```
> ll /var/crash
total 2
-rw-r--r--  1 root  wheel  5 Jul 19 03:17 minfree
```
is empty.
I've DDB and DEBUG=-g enabled.
How to enable it?

See:
http://www.gsp.com/cgi-bin/man.cgi?section=4&topic=gdb


----------



## SirDice (Nov 15, 2010)

See crash(8) and dumpon(8).


----------



## kenorb (Nov 15, 2010)

SirDice said:
			
		

> See crash(8) and dumpon(8).



Doesn't really help me.
Any command to run or file to change?


```
> sudo dumpon -v /dev/ad10s1a
dumpon: ioctl(DIOCSKERNELDUMP): Operation not supported by device
> sudo savecore
savecore: no dumps found
```


----------



## SirDice (Nov 15, 2010)

You really should read better:


> Calls to dumpon normally occur from the system multi-user initialization file /etc/rc, controlled by the ``dumpdev'' variable in the boot time configuration file /etc/rc.conf.


----------



## kenorb (Nov 15, 2010)

Thank you.
Added:

```
dumpdev="AUTO"
```
into my rc.conf


----------



## eye (Nov 15, 2010)

kenorb said:
			
		

> > sudo dumpon -v /dev/ad10s1a
> dumpon: ioctl(DIOCSKERNELDUMP): Operation not supported by device


Do you have a filesystem on that device? Not sure if DIOCSKERNELDUMP is allowed on any partition labeled other than swap, e.g. by a sanity check to prevent doadump() thrashing filesystem with data.


----------



## kenorb (Nov 15, 2010)

eye said:
			
		

> Do you have a filesystem on that device? Not sure if DIOCSKERNELDUMP is allowed on any partition labeled other than swap, e.g. by a sanity check to prevent doadump() thrashing filesystem with data.



Yes, it works for swap, thanks.

```
> sudo dumpon -v /dev/ad10s1b
kernel dumps on /dev/ad10s1b
```


----------



## richardpl (Nov 15, 2010)

There are some cases when dump can not be saved ...


----------



## DutchDaemon (Nov 17, 2010)

This topic is better suited for the FreeBSD developer mailing lists.


----------

