views:

77

answers:

4

Hi

i Just got the book Linux Kernel Development by Robert Love . It has lots of places where you are required to modify and build the kernel . So how should i go with it . Is it better to use a VM , or should i somehow get a proper test machine for it , since i dont want to goof up on my system and data.

+2  A: 

You could do either or both. An alternative somewhere in between is to setup a dual boot. This is a little riskier than a VM, but not too much.

Matthew Flaschen
+5  A: 

A VM has the advantage of offering snapshots. These allow you to save the state of the machine - if the kernel build doesn't work you simply restore the snapshot, and you are able to take as many snapshots as you have disk space to store them. You are also able to clone and re-deploy the VM image, so you have many identical systems to test on.

The same experiment on a physical machine would require far greater effort (ghosting/cloning the disk, re-installing the OS etc).

VirtualBox is free, cross-platform virtualisation software.

Andy
Yes, use a VM. Even if you don't need snapshots, a VM will not screw up your main machine, and generally boots a lot faster than real hardware. If you are messing with boot-time code, or crashing the kernel a lot, you may spend a lot of time waiting for bootup on real hardware.
MarkR
+3  A: 

There are a lot of tutorials on the web about this topic, e.g. here:

The MYYN
+2  A: 
  1. coLinux

  2. or run linux iso image using QEMU on windows

plan9assembler