Diskless: Howto create a root-disk image
I have a simple 2-PC LAN at home. I want to make one of them boot from the other over the network. I am trying this out because I plan to write some basic provisioning and maintenance routines for hardware which can be run on individual server over the network without booting them with their Disk OS.
I have come across enough HOWTOs over the internet describing how to setup DHCP on the boot server or how to configure NFS share to share the root-disk image. What I cannot make out however is how to create a root disk image which can be used by the diskless PC as a read-only disk source of OS files and utilities.
I tried installing RedHat Enterprise Linux 4.3 for this purpose using "--root <netboot_root>" switch on rpm. But it did not work out. There seemed to be too many cyclic dependencies between packages and even when the packages did get installed, they threw %post(...) errors, and sometimes failed with %pre errors. Not sure where I am going wrong. I am really looking for a standard HOWTO or manual which describes setting up such a root-disk image.
P.S. The specs of the two PCs
Boot server: PIII 733 MHz w/ 133 MHz FSB, 512 Megs SDRAM @133MHz, 40 Gigs hard drive - Linux on (hd0,1). Dual boots to FreeBSD 6.1 and RHEL 4u3.
Client: PIV 2.4 GHz, 512 MB DDR SDRAM, 40 Gigs hard drive - Linux on (hd0, 1). Dual boots to Win2k AS and Fedora Core 2.
Connected via a small 5-port switch using 100T network cables.
When you boot you need to load a kernel and then some drivers and then some operating system.
Usually a floppy drive or boot cd is used, or you could also change your BIOS to Linux-BIOS and boot from there.
At minimal, use a boot rom on a network card using BOOTP protocol.
Other files are downloaded via tftp..
It depends how minimal you want to go..
Investigate boot roms for some network cards first, 3M and Intel have easy tools for that.
The boot image depends on the media you choose, floppy/cd, boot rom, bios, hd etc.
Umm well ... I guess I did not put my question with the correct emphasis on the correct points.
I have a network card and a BIOS that is capable of booting from the NIC. In other words I can configure my bios in such a way that my NIC can broadcast its MAC address through the RARP protocol. I can also configure my RHEL4 boot server with DHCP, rarpd, tftp, etc. so that this RARP message broadcast can be picked up by my DHCP server and then the suitably-built kernel can be sent across to my diskless client by tftp, following which it can start booting that kernel.
What I am _really_ bothered about here, and clueless to, is how to get beyond that point and load meaningful OS services, possibly run an X terminal, etc on that diskless client. In other words * I am not trying to be too minimal* but yes I don't need to run KDevelop on my diskless client. I do need at least a working a UNIX system with bash etc and a few basic services too - to run on the diskless client.
1. For that I am assuming that I need to keep an installation of whatever OS I am trying to load on the remote diskless client, on my boot server and share it using NFS.
2. Before I do that, I ought to have that installation done under some directory on my boot server - say /netboot/remote_rhel4. My question is how to do that directly without copying it from somewhere else. I tried the approach outlined here:
http colon dblslash www dot intra2net dot com/de/produkte/opensource/diskless-howto/howto.html
These guys install FC1 from a CDROM. What these guys essentially do is set the root of the rpm installation to whatever is the root folder for my NFS shared installation - say /netboot/remote_rhel4 and they initialize the rpm database. They do this with:
rpm --root /netboot/remote_rhel4 --initdb
Thereafter, they do an installation of the whole series of packages using:
rpm --root /netboot/remote_rhel4 -iv "... list of packages ..."
This is the script they use:
http colon dblslash www dot intra2net dot com/de/produkte/opensource/diskless-howto/mkfedora.sh
I tried to do something similar from RHEL4, modifying appropriately the list of packages installed. That did not seem to work and I got several "%post" and a few "%pre" rpm errors. Don't know what they are but I guess some kind of pre / post-processing which failed with some packages including the kernel.
I wanted to know a better way to do this - or may be the right way to do this so that it does not fail the way it did with my previous few attempts.
Net booting wasn't intended for downloading a whole operating system, unless it was a small one of course.
A typical example would use an initrd image for regular kernel booting.
It has a script to start things moving, including downloading files, and if necessary then doing a root pivot from the boot "fake-root" to a "real-root".
You would need an OS that was small enough to stay in ram, eg DSL, damn small linux at 50MB
Net booting works best with a Terminal Server configuration, as in the LTSP Project.
|All times are GMT -5. The time now is 05:29 PM.|