August 8th, 2002, 12:41
So you want to hash out all those devices in your GENERIC kernel to make a smaller, quicker kernel but you just hate hashing through that damn file and commenting out devices one by one?

Everyone does! Your solution is dmassage:

This tool parses the dmesg of your OpenBSD system, and can do three things
with that information:
- to make the kernel boot faster
- to reduce kernel size
- to show all devices in a tree-like hierarchy (example)

Grab it here:

NOTE: This tool does not deal with any kernel options, devices only, so you still gotta do those by hand but then... that's the safer bet anyway.

Kewl, so how do I use it??? Easy:

1) Download the file and untar it. I prefer to move the dmassage script right into /usr/src/sys/arch/i386/conf

2) Once you've done that you can simpy run:
./dmassage -s GENERIC | more

This command assumes it is to use the default dmesg found at /var/run/dmesg.boot If you want to use another simply specify it with the -d /path/to/dmesg

3) After issuing the dmassage have a look at the output and make sure it looks sane, it should, since it simply parses your dmesg, determines what devices your box is using then comments out unused devieces.

4) If you're happy with the look of it, just run the command again and pipe it into a new config:

5) Rebuild your kernel using the new, compact SMALLKERNEL!

You can also use dmassage to use config to alter your currently booted kernel. For more RTFM:



August 9th, 2002, 20:00
I use the config option of dmassage all the time - heres how I do it:

[code:1:f7ee9ae408]dmassage -f /bsd | config -e -o /bsd.fast /bsd
mv /bsd /bsd.generic
mv /bsd.fast /bsd

Then if I run into trouble I can simply boot /bsd.generic

- sob

April 3rd, 2003, 12:16
Very nice Minion. I always thought that something like this should be fairly straight-forward to do.

sob is right, always have a fall-back.

April 7th, 2003, 13:57
works great... had to re-enable a couple things when it was done but verry nice.. i would like to see something like this for fbsd also..

December 12th, 2004, 09:44
Hello world;
Have anybody tried run this tool with OpenBSD 3.6? and does tool work well (full) with OpenBSD 3.6;

May 13th, 2005, 16:32
Good article!
Being a relatively fng to Openbsd (3.6) I was wondering;
Where exactly do you untar dmassage at? Do you have to do some further chmod voodoo on it?


May 13th, 2005, 17:12
I would just untar it in your home directory, then move it to /usr/local/sbin, or maybe /root/bin

May 13th, 2005, 19:09
Tanks! Wilco ...