If they are using pxelinux.0 and tftp, they can specify in their config
multiple targets where each initrd has a different NFS root. They can
specify which target gets what OS using MAC addresses.
e.g.
LABEL RHEL5-initrd1
kernel /images/RHEL5/vmlinux
append ... initrd=/images/RHEL/initrd1 ...
LABEL RHEL5-initrd2
kernel /images/RHEL5/vmlinux
append ... initrd=/images/RHEL/initrd2 ...
LABEL other-secure-os
kernel /images/OOS/other-secure-os-kernel
If this does not satisfy your requirements, you can also change the
initrd generated by mkinitrd. The init script itself is a nash script.
You can add anything you need provided it is statically linked or you
provide the libraries for it. (The main reason for the section below is
so they can also learn how RHEL5/Fedora systems using PXE work.)
Here are two scripts:
explode.sh: takes 1 argument, the initrd.img. Creates an initrd
directory, extracts the initrd and changes directory into it.
-----------------------------------
rm -rf initrd
mkdir initrd
cp $1 initrd
cd initrd
gzip -dc $1 | cpio -id
rm -rf $1
ls -l
-----------------------------------
create.sh: takes 1 argument, the target. It creates a new initrd at the
target and appends .new to target.
-----------------------------------
cd initrd
find ./ | cpio -H newc -o > ../$1.new
cd ..
gzip $1.new
mv $1.new.gz $1.new
-----------------------------------
You are able to modify the init script. The commandline options that are
passed to the kernel at boot are stored in /proc/cmdline. If they need
something more powerful than nash, they can always add a blackbox or a
statically built bash + other utils into the initrd.
The important section in init is this line:
mkrootdev -t nfs -o defaults,ro myserver:/nfs/root
I'm not sure if there are any size limitations to the initrd that they
might run into.
-- Frederick F. Kautz IV
-- University of Texas at El Paso
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kent Baxley
Sent: Tuesday, August 28, 2007 9:20 AM
To: [email protected]
Subject: ltsp related initrd questions
Los Alamos National Lab's security team has been asked to integrate LTSP
version 5 into RHEL 4 and 5 to support their high security environments,
and have been taking a look at how things are done in the stateless
project for any clues that might help them out.
While perusing the stateless linux stuff over at Fedora they noted a
command to setup an initrd for diskless boot with NFS root:
$> mkinitrd --with=XXX --rootopts=ro,nolock --net-dev=eth0
--rootdev=myserver:/export/NFSroots/FC6 --rootfs=nfs
initrd-2.6.18-1.2798.fc6.img 2.6.18-1.2798.fc6
For their purposes, they need to dynamically determine the root device
at boot time. This would be passed using the DHCP "option root-path"
directive. The --rootdev, --rootopts, and --rootfs are not documented
in the man page for mkinitrd. Is there any way do what they need to
do? If so, how? Or (better yet) what other information from the lab
would help?
Thanks.
_______________________________________________
Stateless-list mailing list
[email protected]
http://www.redhat.com/mailman/listinfo/stateless-list
_______________________________________________
Stateless-list mailing list
[email protected]
http://www.redhat.com/mailman/listinfo/stateless-list