linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to compile on one machine and install on another?
@ 2001-06-19 20:32 McHarry, John
  2001-06-19 20:35 ` Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: McHarry, John @ 2001-06-19 20:32 UTC (permalink / raw)
  To: linux-kernel

I am trying to compile the 2.2.19 kernel one one machine for  installation
on another.  I believe I need to do more than just copy over  bzImage and
modify lilo.conf, but I don't know what.  Is there documentation somewhere
on how to do this?  Thanks.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:32 How to compile on one machine and install on another? McHarry, John
@ 2001-06-19 20:35 ` Alan Cox
  2001-06-19 20:55   ` Tom Diehl
  2001-06-19 21:32 ` Gabriel Rocha
  2001-06-20  7:58 ` Helge Hafting
  2 siblings, 1 reply; 21+ messages in thread
From: Alan Cox @ 2001-06-19 20:35 UTC (permalink / raw)
  To: McHarry, John; +Cc: linux-kernel

> I am trying to compile the 2.2.19 kernel one one machine for  installation
> on another.  I believe I need to do more than just copy over  bzImage and
> modify lilo.conf, but I don't know what.  Is there documentation somewhere
> on how to do this?  Thanks.

Other than making sure you configure it for the box it will eventually run
on - nope you have it all sorted. If you use modules you'll want to install
the modules on the target machine too

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:35 ` Alan Cox
@ 2001-06-19 20:55   ` Tom Diehl
  2001-06-19 21:04     ` Steven Walter
                       ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Tom Diehl @ 2001-06-19 20:55 UTC (permalink / raw)
  To: linux-kernel

On Tue, 19 Jun 2001, Alan Cox wrote:

> Other than making sure you configure it for the box it will eventually run
> on - nope you have it all sorted. If you use modules you'll want to install
> the modules on the target machine too

What is the best way to install the modules? Is there a directory _all_ of
the modules exist in b4 you do "make modules_install". I usually end up
setting EXTRAVERSION to something unique and doing a make modules_install.
That way it does not hose up the modules for the build machine.
Is there a better way?

-- 
......Tom		INCOMPETIANCE: When You Earnestly Believe You Can
tdiehl@pil.net		Compensate for a Lack of Skill by Doubling Your
			Efforts, There's No End to What You Can't Do.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:55   ` Tom Diehl
@ 2001-06-19 21:04     ` Steven Walter
  2001-06-19 21:11     ` Raphael Manfredi
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 21+ messages in thread
From: Steven Walter @ 2001-06-19 21:04 UTC (permalink / raw)
  To: Tom Diehl; +Cc: linux-kernel

On Tue, Jun 19, 2001 at 04:55:10PM -0400, Tom Diehl wrote:
> What is the best way to install the modules? Is there a directory _all_ of
> the modules exist in b4 you do "make modules_install". I usually end up
> setting EXTRAVERSION to something unique and doing a make modules_install.
> That way it does not hose up the modules for the build machine.
> Is there a better way?

Not anymore there isn't.  You'll just have to run make modules_install
as 'INSTALL_MOD_DIR="/path/to/module" make modules_install'
-- 
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
			-- George Orwell

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:55   ` Tom Diehl
  2001-06-19 21:04     ` Steven Walter
@ 2001-06-19 21:11     ` Raphael Manfredi
  2001-06-19 21:50     ` John R Lenton
  2001-06-20 20:11     ` Maciek Nowacki
  3 siblings, 0 replies; 21+ messages in thread
From: Raphael Manfredi @ 2001-06-19 21:11 UTC (permalink / raw)
  To: linux-kernel

Quoting Tom Diehl <tdiehl@pil.net> from ml.linux.kernel:
:What is the best way to install the modules? Is there a directory _all_ of
:the modules exist in b4 you do "make modules_install". I usually end up
:setting EXTRAVERSION to something unique and doing a make modules_install.
:That way it does not hose up the modules for the build machine.
:Is there a better way?

Yes, there is.  I usually add the the following to the main Makefile:

export INSTALL_PATH=/nfs/lyon/home/ram/root-install/boot
export INSTALL_MOD_PATH=/nfs/lyon/home/ram/root-install

I then proceed as usual, and the modules get copied over NFS to
the target machine, in root-install/lib/modules, etc...

If you don't have NFS mounts to the remote machine, you'll have to
rcp the tree, that's all.

Raphael

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:32 How to compile on one machine and install on another? McHarry, John
  2001-06-19 20:35 ` Alan Cox
@ 2001-06-19 21:32 ` Gabriel Rocha
  2001-06-19 21:45   ` Eli Carter
  2001-06-20  0:24   ` Kelledin Tane
  2001-06-20  7:58 ` Helge Hafting
  2 siblings, 2 replies; 21+ messages in thread
From: Gabriel Rocha @ 2001-06-19 21:32 UTC (permalink / raw)
  To: McHarry, John; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

you could always compile on one machine and nfs mount the /usr/src/linux
and do a make modules_install from the nfs mounted directory...

,----[ On Tue, Jun 19, at 04:32PM, McHarry, John wrote: ]--------------
| I am trying to compile the 2.2.19 kernel one one machine for  installation
| on another.  I believe I need to do more than just copy over  bzImage and
| modify lilo.conf, but I don't know what.  Is there documentation somewhere
| on how to do this?  Thanks.
| -
| To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
| the body of a message to majordomo@vger.kernel.org
| More majordomo info at  http://vger.kernel.org/majordomo-info.html
| Please read the FAQ at  http://www.tux.org/lkml/
`----[ End Quote ]---------------------------

-- 
Gabriel Rocha (grocha@onesecure.com) - 1-877-4-1SECURE
OneSecure, Inc. Sunnyvale Security Operations Center (GMT -0700)

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia

mQCNAzrYQA8AAAEEAL/fjYD12U8QNO0PJX30zYd+0Wg1aZq+jPp34hTiMXrGg2bv
VE2hwrcz4iILCaQ5KlncteycMx6VL7u0tnIkxnT0M8fAPuS4VpqB/tS/mr3RcHLa
52+TRZ45KnZt/6pp+pc9zJM8STJvGatfF+YPYKtzEM3mFL4OEnMJdtsEFkx1AAUT
tCRHYWJyaWVsIFJvY2hhIDxncm9jaGFAb25lc2VjdXJlLmNvbT6JAJUDBRA62EAP
cwl22wQWTHUBATrVA/9Z+/pUsd0nV6ZtOn014Q9hJ1TUzhzVcNVF1zUufTHTwLO1
gnKaomNj1Fb+pwGK3ZxNqomUTAnCXCU3HxQ0DkG8OIjzuOIr08Lv57pA9u/yjlTR
IOV5REUNFWD0ogKLAlVG9wp3IsSgntjToB/rj75siVrBapqzbgR+Dcs3nb8Ijg==
=HwqX
-----END PGP PUBLIC KEY BLOCK-----

[-- Attachment #2: Type: application/pgp-signature, Size: 290 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 21:32 ` Gabriel Rocha
@ 2001-06-19 21:45   ` Eli Carter
  2001-06-19 21:53     ` Gabriel Rocha
  2001-06-19 22:42     ` Mike Castle
  2001-06-20  0:24   ` Kelledin Tane
  1 sibling, 2 replies; 21+ messages in thread
From: Eli Carter @ 2001-06-19 21:45 UTC (permalink / raw)
  To: Gabriel Rocha; +Cc: McHarry John, linux-kernel

Gabriel Rocha wrote:
> 
> you could always compile on one machine and nfs mount the /usr/src/linux
> and do a make modules_install from the nfs mounted directory...

Which would require exporting that filesystem with root permissions
enabled...any security bells going off?

C-ya,

Eli 
-----------------------.   No wonder we didn't get this right first time
Eli Carter             |      through. It's not really all that horribly 
eli.carter(at)inet.com `- complicated, but the _details_ kill you. Linus

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:55   ` Tom Diehl
  2001-06-19 21:04     ` Steven Walter
  2001-06-19 21:11     ` Raphael Manfredi
@ 2001-06-19 21:50     ` John R Lenton
  2001-06-23  4:53       ` Anuradha Ratnaweera
  2001-06-20 20:11     ` Maciek Nowacki
  3 siblings, 1 reply; 21+ messages in thread
From: John R Lenton @ 2001-06-19 21:50 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Tue, Jun 19, 2001 at 04:55:10PM -0400, Tom Diehl wrote:
> 
> What is the best way to install the modules? Is there a directory _all_ of
> the modules exist in b4 you do "make modules_install". I usually end up
> setting EXTRAVERSION to something unique and doing a make modules_install.
> That way it does not hose up the modules for the build machine.
> Is there a better way?

make-kpkg takes care of all that for you (it's part of kernel-package)

-- 
John Lenton (john@grulic.org.ar) -- Random fortune:
No doubt Jack the Ripper excused himself on the grounds that it was
human nature.

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 21:45   ` Eli Carter
@ 2001-06-19 21:53     ` Gabriel Rocha
  2001-06-19 22:42     ` Mike Castle
  1 sibling, 0 replies; 21+ messages in thread
From: Gabriel Rocha @ 2001-06-19 21:53 UTC (permalink / raw)
  To: Eli Carter; +Cc: Gabriel Rocha, McHarry John, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

hey, how and where you export the filesystem is an exercise left for the
reader, i have no problem exporting nfs filesystems in my internal
network, what you do or dont, is up to you. and there is always
cfs...

,----[ On Tue, Jun 19, at 04:45PM, Eli Carter wrote: ]--------------
| Gabriel Rocha wrote:
| > 
| > you could always compile on one machine and nfs mount the /usr/src/linux
| > and do a make modules_install from the nfs mounted directory...
| 
| Which would require exporting that filesystem with root permissions
| enabled...any security bells going off?
| 
| C-ya,
| 
| Eli 
| -----------------------.   No wonder we didn't get this right first time
| Eli Carter             |      through. It's not really all that horribly 
| eli.carter(at)inet.com `- complicated, but the _details_ kill you. Linus
`----[ End Quote ]---------------------------

-- 
Gabriel Rocha (grocha@onesecure.com) - 1-877-4-1SECURE
OneSecure, Inc. Sunnyvale Security Operations Center (GMT -0700)

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia

mQCNAzrYQA8AAAEEAL/fjYD12U8QNO0PJX30zYd+0Wg1aZq+jPp34hTiMXrGg2bv
VE2hwrcz4iILCaQ5KlncteycMx6VL7u0tnIkxnT0M8fAPuS4VpqB/tS/mr3RcHLa
52+TRZ45KnZt/6pp+pc9zJM8STJvGatfF+YPYKtzEM3mFL4OEnMJdtsEFkx1AAUT
tCRHYWJyaWVsIFJvY2hhIDxncm9jaGFAb25lc2VjdXJlLmNvbT6JAJUDBRA62EAP
cwl22wQWTHUBATrVA/9Z+/pUsd0nV6ZtOn014Q9hJ1TUzhzVcNVF1zUufTHTwLO1
gnKaomNj1Fb+pwGK3ZxNqomUTAnCXCU3HxQ0DkG8OIjzuOIr08Lv57pA9u/yjlTR
IOV5REUNFWD0ogKLAlVG9wp3IsSgntjToB/rj75siVrBapqzbgR+Dcs3nb8Ijg==
=HwqX
-----END PGP PUBLIC KEY BLOCK-----

[-- Attachment #2: Type: application/pgp-signature, Size: 290 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 21:45   ` Eli Carter
  2001-06-19 21:53     ` Gabriel Rocha
@ 2001-06-19 22:42     ` Mike Castle
  1 sibling, 0 replies; 21+ messages in thread
From: Mike Castle @ 2001-06-19 22:42 UTC (permalink / raw)
  To: linux-kernel

On Tue, Jun 19, 2001 at 04:45:24PM -0500, Eli Carter wrote:
> Gabriel Rocha wrote:
> > you could always compile on one machine and nfs mount the /usr/src/linux
> > and do a make modules_install from the nfs mounted directory...
> 
> Which would require exporting that filesystem with root permissions
> enabled...any security bells going off?

Why would you need to have nfs root access?

You're reading from the nfs mount, not writing to it.

mrc
-- 
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 21:32 ` Gabriel Rocha
  2001-06-19 21:45   ` Eli Carter
@ 2001-06-20  0:24   ` Kelledin Tane
  2001-06-20  0:42     ` Gabriel Rocha
  1 sibling, 1 reply; 21+ messages in thread
From: Kelledin Tane @ 2001-06-20  0:24 UTC (permalink / raw)
  To: linux-kernel

Gabriel Rocha wrote:

> you could always compile on one machine and nfs mount the /usr/src/linux
> and do a make modules_install from the nfs mounted directory...

The way I've always managed this sort of thing is to tar up your kernel source,
transfer it to the "compile box" however you please, then do all the compile
steps except the "make modules_install" and the copying of the kernel image.
Then tar up the compiled source tree, transfer it over to the box you want to
install on, untar it, and do the rest of the steps (the "make modules_install"
and the copying of the kernel image).  Just make sure that all the systems
involved have about the same system time, else you'll get the message, "Clock
skew detected.  Your build may be incomplete."

One day I managed to get egcs-2.91.66 to compile against glibc-2.2, and I never
had to do that stuff again. ;)

Kelledin

bash-2.05 $ kill -9 1
init: Just what do you think you're doing, Dave?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-20  0:24   ` Kelledin Tane
@ 2001-06-20  0:42     ` Gabriel Rocha
  0 siblings, 0 replies; 21+ messages in thread
From: Gabriel Rocha @ 2001-06-20  0:42 UTC (permalink / raw)
  To: Kelledin Tane; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]

the 'compile in one place and export the product via nfs' mentality
really kicks in under *bsd, where you may have a server farm and want to
upgrade all at once...the tarball idea works for one machine, but for
multiples, its all about exporting it... just my 2 cents. --gabe


,----[ On Tue, Jun 19, at 07:24PM, Kelledin Tane wrote: ]--------------
| Gabriel Rocha wrote:
| 
| > you could always compile on one machine and nfs mount the /usr/src/linux
| > and do a make modules_install from the nfs mounted directory...
| 
| The way I've always managed this sort of thing is to tar up your kernel source,
| transfer it to the "compile box" however you please, then do all the compile
| steps except the "make modules_install" and the copying of the kernel image.
| Then tar up the compiled source tree, transfer it over to the box you want to
| install on, untar it, and do the rest of the steps (the "make modules_install"
| and the copying of the kernel image).  Just make sure that all the systems
| involved have about the same system time, else you'll get the message, "Clock
| skew detected.  Your build may be incomplete."
| 
| One day I managed to get egcs-2.91.66 to compile against glibc-2.2, and I never
| had to do that stuff again. ;)
| 
| Kelledin
| 
| bash-2.05 $ kill -9 1
| init: Just what do you think you're doing, Dave?
| 
| -
| To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
| the body of a message to majordomo@vger.kernel.org
| More majordomo info at  http://vger.kernel.org/majordomo-info.html
| Please read the FAQ at  http://www.tux.org/lkml/
`----[ End Quote ]---------------------------

-- 
Gabriel Rocha (grocha@onesecure.com) - 1-877-4-1SECURE
OneSecure, Inc. Sunnyvale Security Operations Center (GMT -0700)

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia

mQCNAzrYQA8AAAEEAL/fjYD12U8QNO0PJX30zYd+0Wg1aZq+jPp34hTiMXrGg2bv
VE2hwrcz4iILCaQ5KlncteycMx6VL7u0tnIkxnT0M8fAPuS4VpqB/tS/mr3RcHLa
52+TRZ45KnZt/6pp+pc9zJM8STJvGatfF+YPYKtzEM3mFL4OEnMJdtsEFkx1AAUT
tCRHYWJyaWVsIFJvY2hhIDxncm9jaGFAb25lc2VjdXJlLmNvbT6JAJUDBRA62EAP
cwl22wQWTHUBATrVA/9Z+/pUsd0nV6ZtOn014Q9hJ1TUzhzVcNVF1zUufTHTwLO1
gnKaomNj1Fb+pwGK3ZxNqomUTAnCXCU3HxQ0DkG8OIjzuOIr08Lv57pA9u/yjlTR
IOV5REUNFWD0ogKLAlVG9wp3IsSgntjToB/rj75siVrBapqzbgR+Dcs3nb8Ijg==
=HwqX
-----END PGP PUBLIC KEY BLOCK-----

[-- Attachment #2: Type: application/pgp-signature, Size: 290 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:32 How to compile on one machine and install on another? McHarry, John
  2001-06-19 20:35 ` Alan Cox
  2001-06-19 21:32 ` Gabriel Rocha
@ 2001-06-20  7:58 ` Helge Hafting
  2001-06-21  2:42   ` Keith Owens
  2 siblings, 1 reply; 21+ messages in thread
From: Helge Hafting @ 2001-06-20  7:58 UTC (permalink / raw)
  To: McHarry, John; +Cc: linux-kernel

"McHarry, John" wrote:
> 
> I am trying to compile the 2.2.19 kernel one one machine for  installation
> on another.  I believe I need to do more than just copy over  bzImage and
> modify lilo.conf, but I don't know what.  Is there documentation somewhere
> on how to do this?  Thanks.

This is enough if you don't use modules.  If you use modules you
need to copy them too, which is trickier.  Several good methods
have been demonstrated, here is another if you can't use the nfs
approach:

1. If you are running the same kernel revision on the compile machine,
   temporarily rename /lib/modules/<version> to something else.
   Yes - this could be dangerous but tend to work well on a "home
machine"
2. Do the "make modules_install" on the compile machine.
3. Rename the /lib/modules/<version> to something else, and
   rename your proper module directory back to what it should be.
4. Transfer the installed module tree to the target machine along with
   the bzImage.

The "dangerous part" happens if the kernel on the compile machine
tries to load a module between step 1 and step 3.
This can be avoided in a number of ways, such as:

* Make sure the target and compile machines run different kernel
revisions.
  If you're upgrading both, compile for the target machine first.
  Or edit the makefile, append something like "target" to the
"extraversion",
  you will then get the modules installed in
/lib/modules/<version>target
  which is different from what your compile machine uses.

* Use "chroot" so make modules_install will install somewhere else.
  info|man chroot for details.
 
Helge Hafting

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 20:55   ` Tom Diehl
                       ` (2 preceding siblings ...)
  2001-06-19 21:50     ` John R Lenton
@ 2001-06-20 20:11     ` Maciek Nowacki
  2001-06-21  3:10       ` Keith Owens
  3 siblings, 1 reply; 21+ messages in thread
From: Maciek Nowacki @ 2001-06-20 20:11 UTC (permalink / raw)
  To: Tom Diehl; +Cc: linux-kernel

On Tue, Jun 19, 2001 at 04:55:10PM -0400, Tom Diehl wrote:
> On Tue, 19 Jun 2001, Alan Cox wrote:
> 
> > Other than making sure you configure it for the box it will eventually run
> > on - nope you have it all sorted. If you use modules you'll want to install
> > the modules on the target machine too
> 
> What is the best way to install the modules? Is there a directory _all_ of
> the modules exist in b4 you do "make modules_install". I usually end up
> setting EXTRAVERSION to something unique and doing a make modules_install.
> That way it does not hose up the modules for the build machine.
> Is there a better way?

Change MODLIB in $(TOPDIR)/Makefile (e.g. /usr/src/linux/Makefile). I do this
to compile the kernel and modules without root priviledges at all. make
modules_install will fail at the end when trying to run 'depmod', but that's
okay - you can do that yourself:

(TOPDIR=${HOME}/linux, MODLIB=${HOME}/kernel/<revision>/modules)

cd $TOPDIR
make config dep clean bzImage modules && cp arch/i386/boot/bzImage System.map \
${MODLIB}/../ && make modules_install || echo modules_install failed as expected
cd ${MODLIB}/../
mkdir -p lib/modules
ln -s ${PWD}/modules lib/modules/`uname -r`
depmod -F System.map -C /dev/null -b $PWD -r -a

Note that Joe Average user can do all of this, root need not be involved at
all.

Then fix up the resulting modules.dep with sed, I don't remember what depmod
gives you exactly so I can't type out the exact command.. then clean up:

rm lib/modules/`uname -r` ; rmdir lib/modules lib

Now you have a nice kernel package ready to go in $HOME/kernel. Don't forget
to copy $MODLIB into the right spot (rename the directory to the kernel's
revision) and chown -R root or modutils will pout, unless you are making a
romfs or such where the only user is root :-)  nfs will work just fine without
security qualms since the kernel installation is non-root owned. (for
large-scale deployment, you probably can't beat having machines booting from
a server and fetching new romfs images each boot.)

btw, the abuse of depmod in this way isn't very nice, but afaics there is no
other way. I would personally like depmod to dump dependency information for
any valid module tree, expanding the definition of valid to include trees not
prefixed by /lib/modules/`uname -r`, but oh well, it gets by in the end as so
many other things do ;-)

Maciek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-20  7:58 ` Helge Hafting
@ 2001-06-21  2:42   ` Keith Owens
  0 siblings, 0 replies; 21+ messages in thread
From: Keith Owens @ 2001-06-21  2:42 UTC (permalink / raw)
  To: Helge Hafting; +Cc: McHarry, John, linux-kernel

On Wed, 20 Jun 2001 09:58:54 +0200, 
Helge Hafting <helgehaf@idb.hist.no> wrote:
>This is enough if you don't use modules.  If you use modules you
>need to copy them too, which is trickier.  Several good methods
>have been demonstrated, here is another if you can't use the nfs
>approach:
>
>1. If you are running the same kernel revision on the compile machine,
>   temporarily rename /lib/modules/<version> to something else.
>   Yes - this could be dangerous but tend to work well on a "home
>machine"
>2. Do the "make modules_install" on the compile machine.

The correct way of installing for a target machine is to use
  make INSTALL_MOD_PATH=foo modules_install
You need to mkdir -p foo/lib/modules first.  Everything is installed in
foo/lib/modules/`uname -r` instead of /lib/modules so you do not
disturb your compile system.

There is also make INSTALL_PATH to specify where vmlinuz and System.map
are stored for make zlilo and make install.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-20 20:11     ` Maciek Nowacki
@ 2001-06-21  3:10       ` Keith Owens
  0 siblings, 0 replies; 21+ messages in thread
From: Keith Owens @ 2001-06-21  3:10 UTC (permalink / raw)
  To: Maciek Nowacki; +Cc: Tom Diehl, linux-kernel

On Wed, 20 Jun 2001 14:11:20 -0600, 
Maciek Nowacki <maciek@Voyager.powersurfr.com> wrote:
>Change MODLIB in $(TOPDIR)/Makefile (e.g. /usr/src/linux/Makefile). I do this
>to compile the kernel and modules without root priviledges at all. make
>modules_install will fail at the end when trying to run 'depmod', but that's
>okay - you can do that yourself:

That is not OK, it requires user hacks and causes errors.  Use
  make INSTALL_MOD_PATH=foo modules_install
and everything works.  Create $(INSTALL_MOD_PATH)/lib/modules first.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-19 21:50     ` John R Lenton
@ 2001-06-23  4:53       ` Anuradha Ratnaweera
  0 siblings, 0 replies; 21+ messages in thread
From: Anuradha Ratnaweera @ 2001-06-23  4:53 UTC (permalink / raw)
  To: John R Lenton; +Cc: linux-kernel

On Tue, Jun 19, 2001 at 06:50:33PM -0300, John R Lenton wrote:
> 
> make-kpkg takes care of all that for you (it's part of kernel-package)

It does. But only for Debian users like you and me.

Regards,

Anuradha

-- 

Penguin : Linux 2.4.6-pre5 on an i586

"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-20  2:23   ` John Weber
  2001-06-20  2:50     ` Mike Castle
@ 2001-06-20  2:58     ` Keith Owens
  1 sibling, 0 replies; 21+ messages in thread
From: Keith Owens @ 2001-06-20  2:58 UTC (permalink / raw)
  To: John Weber; +Cc: linux-kernel

On Tue, 19 Jun 2001 22:23:47 -0400, 
John Weber <weber@nyc.rr.com> wrote:
>On a related note... is System.map also necessary?  Anyone care to explain 
>what System.map does?  I have noticed that my kernel works with or 
>without that file, but just figured it was a good question to ask in 

Used by assorted user space utilities, ps, ksymoops, klogd and others.
It is not needed for booting, so its presence in /boot is a mistake.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
  2001-06-20  2:23   ` John Weber
@ 2001-06-20  2:50     ` Mike Castle
  2001-06-20  2:58     ` Keith Owens
  1 sibling, 0 replies; 21+ messages in thread
From: Mike Castle @ 2001-06-20  2:50 UTC (permalink / raw)
  To: linux-kernel

On Tue, Jun 19, 2001 at 10:23:47PM -0400, John Weber wrote:
> On a related note... is System.map also necessary?  Anyone care to explain 

Debugging.  ksymoops and klogd can both make use of it.

mrc
-- 
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to compile on one machine and install on another?
       [not found] ` <fa.go24tnv.1v60h9a@ifi.uio.no>
@ 2001-06-20  2:23   ` John Weber
  2001-06-20  2:50     ` Mike Castle
  2001-06-20  2:58     ` Keith Owens
  0 siblings, 2 replies; 21+ messages in thread
From: John Weber @ 2001-06-20  2:23 UTC (permalink / raw)
  To: linux-kernel

Alan Cox wrote:

>>I am trying to compile the 2.2.19 kernel one one machine for  installation
>>on another.  I believe I need to do more than just copy over  bzImage and
>>modify lilo.conf, but I don't know what.  Is there documentation somewhere
>>on how to do this?  Thanks.
>>
> 
> Other than making sure you configure it for the box it will eventually run
> on - nope you have it all sorted. If you use modules you'll want to install
> the modules on the target machine too

On a related note... is System.map also necessary?  Anyone care to explain 

what System.map does?  I have noticed that my kernel works with or 
without that file, but just figured it was a good question to ask in 
this thread.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* RE: How to compile on one machine and install on another?
@ 2001-06-19 21:04 McHarry, John
  0 siblings, 0 replies; 21+ messages in thread
From: McHarry, John @ 2001-06-19 21:04 UTC (permalink / raw)
  To: 'Tom Diehl', linux-kernel



 -----Original Message-----
From: 	Tom Diehl [mailto:tdiehl@pil.net] 
Sent:	Tuesday, June 19, 2001 4:55 PM
To:	linux-kernel@vger.kernel.org
Subject:	Re: How to compile on one machine and install on another?

On Tue, 19 Jun 2001, Alan Cox wrote:

> Other than making sure you configure it for the box it will eventually run
> on - nope you have it all sorted. If you use modules you'll want to
install
> the modules on the target machine too

What is the best way to install the modules? Is there a directory _all_ of
the modules exist in b4 you do "make modules_install". I usually end up
setting EXTRAVERSION to something unique and doing a make modules_install.
That way it does not hose up the modules for the build machine.
Is there a better way?

I found it puts the new ones in a unique directory under /lib/modules.  I
just copied that also.  


I didn't go into the issues, but I am getting an error message from the
target box that "/dev/md0 must be a nonpersistent RAID0 or LINEAR array!"
This is OK in 2.2.17, which is currently running on the machine.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-06-24  4:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-19 20:32 How to compile on one machine and install on another? McHarry, John
2001-06-19 20:35 ` Alan Cox
2001-06-19 20:55   ` Tom Diehl
2001-06-19 21:04     ` Steven Walter
2001-06-19 21:11     ` Raphael Manfredi
2001-06-19 21:50     ` John R Lenton
2001-06-23  4:53       ` Anuradha Ratnaweera
2001-06-20 20:11     ` Maciek Nowacki
2001-06-21  3:10       ` Keith Owens
2001-06-19 21:32 ` Gabriel Rocha
2001-06-19 21:45   ` Eli Carter
2001-06-19 21:53     ` Gabriel Rocha
2001-06-19 22:42     ` Mike Castle
2001-06-20  0:24   ` Kelledin Tane
2001-06-20  0:42     ` Gabriel Rocha
2001-06-20  7:58 ` Helge Hafting
2001-06-21  2:42   ` Keith Owens
2001-06-19 21:04 McHarry, John
     [not found] <fa.o4pbsqv.26md2n@ifi.uio.no>
     [not found] ` <fa.go24tnv.1v60h9a@ifi.uio.no>
2001-06-20  2:23   ` John Weber
2001-06-20  2:50     ` Mike Castle
2001-06-20  2:58     ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).