[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is it possible to simply copy the kernel from one machine to another and use it?

On Friday 07 April 2006 02:39 pm, Yu,Glen [Ontario] wrote:
> Hello everyone,
> I was wondering if it's possible to copy the vmlinuz-x.y.z from one machine
> to another and have the other machine run properly with it.  Here's the
> scenario:
> I have 2 systems, both running Debian 3.1 (Sarge), and their hardware is a
> little different from each other.  Suppose my machine is running a 2.4.x
> kernel and the other a 2.6.x kernel, can I simply copy the
> /boot/vmlinuz-2.6.x kernel over to my machine's /boot directory, make the
> appropriate changes to /boot/grub/menu.lst and have it work as if I had
> installed it through apt or dpkg?
> If anyone has actually tried this and got their machines to work, I would
> like to know what and how you did it.

i am in the process of doing it to a machine where i had to use debootstrap to 
install the system from an ide drive to a scsi drive (long story).

it is pretty easy to get it to work as long as the root filesystem on both 
machine reside on similar hardware (best-case/simplest-case scenario is both 
machines use IDE  drives to boot). if that's the case, copy the kernel, the 
modules directory (look in /lib/modules/), the initrd file and you should be 

if the root fs resides on dissimilar hardware (eg. one has IDE and another 
machine has SCSI or even different SCSI cards etc..) then you'll need to fix 
your initrd to load the correct modules (or recompile the kernel to inline 
all needed modules). while this is doable, it is slightly more complicated to 
give a generic howto. google cramfs and initrd and you should find some 
discussion on the subject.

> Thanks,
> -Glen
> ----------------------------------------------------------------------
> Glen Yu | 416-739-4861 | glen.yu@ec.gc.ca
> ----------------------------------------------------------------------


anoop aryal

Reply to: