LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2006, 07:47 AM   #1
andybengurion
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Rep: Reputation: 0
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.

Please help.

Cheers,
Andy


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.
 
Old 09-25-2006, 09:19 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
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.
 
Old 09-25-2006, 09:52 AM   #3
andybengurion
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 0
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.


Cheers,
Andy
 
Old 09-29-2006, 05:16 PM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Ah.. Ok..

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qemu create disk image kpachopoulos Linux - General 3 11-29-2005 10:49 AM
How to create disk image with Linux? zaoka Linux - Software 3 07-14-2005 03:29 PM
Howto Create a Driver Disk Iggyboo Fedora - Installation 3 04-04-2005 11:56 AM
How to create image using PQDI boot disk? (rhel v2.1) namgor Red Hat 1 06-25-2004 08:26 AM
Gnu Parted Boot Disk: No Root Image ghborrmann Linux - General 2 05-16-2004 04:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration