(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) MkLinux :
How do I run a second vmlinux?
Okay, so you think you know what you're doing, and you want to run a second linux server?

First, check out http://www.macintosh.net/mklinux for some background, but DO NOT run a second server right away.

*WARNING* if you're not careful, running a second server is a *REALLY* good way to hose up a system, as the second copy doesn't really acknowledge the existance of the first. Also be prepared to have a few crashes if you do this very much. You also want to have a decent amount of RAM to do this.

First, make sure you have a second root partition!! Don't run a second vmlinux server on the same filesystem as the first is running, unless you enjoy watching fsck try to repair the damage. Also make sure that any partitions you have mounted by one are NOT mounted by the other. It's probably safe to have some non-root partitions mounted read-write by one server and read-only by the other. (That's what I've been doing)

You can probably get by with a 50-100mb partition to get the basic stuff you need for a second server's root partition.

You can use a ramdisk as a second boot partition, however you probably will not be able to fit all of the tools that you would like into that ramdisk!

After you've gotten a second partition all set up, and you've gotten the mach tools referenced on the web page above, you're ready. You'll want to save anything important, and possibly back up your whole system if you're really paranoid. If you've got less than 30-40mb of RAM, you probably want to get out of X-windows, and any other programs that take a lot of space.

The procedure that I follow is this... Run the mach name_server program, the machid program, and mach-aware gdb


> /mach_servers/name_server &

> /usr/mach3/bin/machid &

> /usr/mach3/bin/gdb.mk

If you're in X, the console messages make your screen look real pretty ;v)

Now, from another xterm, or virtual console,

> vmlinux -l -c "root=/dev/'your second root partition'"

Then you'll see all the fun kernel messages as it boots up. You can then attach to the running kernel with gdb. I've found that if I attach after the kernel is up and running, I can get a backtrace when the kernel crashes. There's probably a better way though.

Now you can have fun by showing off to your monolithic-kernel friends by crashing the second server and debugging it. 8-)

If you don't know, as I didn't, you will need to add the -g flag when compiling to make code with debug symbols, otherwise gdb doesn't show you particularly human readable output when debugging.

[Append to This Answer]
hozer@dodds.net, fray@kernel.crashing.org
Previous: (Answer) How do I build a new kernel and a new vmlinux server from sources?
Next: (Answer) My x machine won't boot. Why?
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=295
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo