2002-11-06 21:53:56

by Matt Simonsen

[permalink] [raw]
Subject: build kernel for server farm

I am pretty familiar with the build process and kernel install for a
single Linux box, but I wanted to confirm I'm doing things in a sane way
for a large deployment. All the machines are the same hardware and
running standard setups.

First, I plan on compiling the kernel on a development box. From there
my plan is basically tar /usr/src/linux, copy to each box, untar, copy
bzImage and System.map to /boot, run make modules_install, edit
lilo.conf, run lilo.

Tips? Comments?

Thanks
Matt


2002-11-06 23:07:06

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: build kernel for server farm

On 6 Nov 2002, Matt Simonsen wrote:

> First, I plan on compiling the kernel on a development box. From there
> my plan is basically tar /usr/src/linux, copy to each box, untar, copy
> bzImage and System.map to /boot, run make modules_install, edit
> lilo.conf, run lilo.
>
> Tips? Comments?

Network file system?

--
function.linuxpower.ca


2002-11-06 23:48:16

by Matt Simonsen

[permalink] [raw]
Subject: Re: build kernel for server farm

On Wed, 2002-11-06 at 15:13, Zwane Mwaikambo wrote:
> On 6 Nov 2002, Matt Simonsen wrote:
>
> > First, I plan on compiling the kernel on a development box. From there
> > my plan is basically tar /usr/src/linux, copy to each box, untar, copy
> > bzImage and System.map to /boot, run make modules_install, edit
> > lilo.conf, run lilo.
> >
> > Tips? Comments?
>
> Network file system?

For /usr/src and the kernel distribution? Or for the whole boot process?

I use NFS already for several shared filesystems. NFS isn't quite
specific enough that I understand what you mean.

Could you give me a little more detail on exactly what you would use it
for? If I've overlooked a howto or obvious document please RTFM me- I'm
trying to learn from the pros here and would ideally like something that
will scale well to over 100 machines.

Matt


2002-11-07 02:25:17

by dee jay

[permalink] [raw]
Subject: Re: build kernel for server farm


Actually if they are exactly the same, why dont you just copy the
relevant files over? ie. /lib/modules/`uname -r`/*, and as mentioned
your bzImage, System.map, and lilo.conf (and of course remember to run
lilo)?

Any particular reasons why you would want to go through the process of
compiling again on each machine?

-dj

--- Matt Simonsen <[email protected]> wrote: > I am pretty
familiar with the build process and kernel install for a
> single Linux box, but I wanted to confirm I'm doing things in a sane
> way
> for a large deployment. All the machines are the same hardware and
> running standard setups.
>
> First, I plan on compiling the kernel on a development box. From
> there
> my plan is basically tar /usr/src/linux, copy to each box, untar,
> copy
> bzImage and System.map to /boot, run make modules_install, edit
> lilo.conf, run lilo.
>
> Tips? Comments?
>
> Thanks
> Matt
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!

2002-11-07 04:36:22

by James Bourne

[permalink] [raw]
Subject: Re: build kernel for server farm

On 6 Nov 2002, Matt Simonsen wrote:

> I am pretty familiar with the build process and kernel install for a
> single Linux box, but I wanted to confirm I'm doing things in a sane way
> for a large deployment. All the machines are the same hardware and
> running standard setups.
>
> First, I plan on compiling the kernel on a development box. From there
> my plan is basically tar /usr/src/linux, copy to each box, untar, copy
> bzImage and System.map to /boot, run make modules_install, edit
> lilo.conf, run lilo.

If all of your systems are *identical*, try something like rsync
or rdist (both can be told to use ssh too).

1) build your kernel and install it on your development box
2) do a test boot. Ensure everything is there for you as needed
3) build a Distfile like so:
##################
HOSTS = (
host1
host2
host3
)

KERNEL = (
/boot
/etc/lilo.conf
/etc/grub.conf
)

kernel:
${KERNEL} -> ${HOSTS}
install ;
# could use a cmdspecial after this to run lilo if needed

modules:
/lib/modules -> ${HOSTS}
install ;

################

Now, run rdist -P/usr/bin/ssh -overify -f Distfile

You should see it verify what will be updated on hosts[1234...]

Once that's done run a shell loop to reboot the systems as required

for i in host1 host2 host3 host4 ; do
ssh $i "shutdown -r now"
done

If they are not identical, you can do the same thing, only different /boot
and /lib/module directories to each host would be required as well
as seperate Distfile rules for each host or group of hosts.

Hope that helps.

Regards
James Bourne

>
> Tips? Comments?
>
> Thanks
> Matt
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

--
James Bourne, Supervisor Data Centre Operations
Mount Royal College, Calgary, AB, CA
http://www.mtroyal.ab.ca

******************************************************************************
This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal, and or privileged
information. Please contact the sender immediately if you are not the
intended recipient of this communication, and do not copy, distribute, or
take action relying on it. Any communication received in error, or
subsequent reply, should be deleted or destroyed.
******************************************************************************


"There are only 10 types of people in this world: those who
understand binary and those who don't."


Subject: Re: build kernel for server farm

Matt Simonsen <[email protected]> writes:

>Tips? Comments?

make rpm [1]

% rpm --install <your rpm>

[1] Either the genuine thing or the process of "go and build an rpm of
your kernel". YMMV.

Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [email protected]

Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [email protected]
D-91054 Buckenhof Fax.: 09131 / 50654-20

2002-11-07 10:34:23

by Denis Vlasenko

[permalink] [raw]
Subject: Re: build kernel for server farm

On 6 November 2002 20:00, Matt Simonsen wrote:
> I am pretty familiar with the build process and kernel install for a
> single Linux box, but I wanted to confirm I'm doing things in a sane
> way for a large deployment. All the machines are the same hardware
> and running standard setups.
>
> First, I plan on compiling the kernel on a development box. From
> there my plan is basically tar /usr/src/linux, copy to each box,
> untar, copy bzImage and System.map to /boot, run make
> modules_install, edit lilo.conf, run lilo.
>
> Tips? Comments?

You can avoid kernel version/config madness if you will
arrange your farm to boot from single TFTP server and keep small
readonly root fs with /boot/*, /lib/modules/* etc
on the NFS server (TFTP and NFS servers can be the same box).

You might want to have spare boot server, just in case ;)
--
vda