[Techtalk] booting a diskless client

Rudy Zijlstra rudy at grumpydevil.homelinux.org
Wed Oct 1 11:07:45 UTC 2008


Maria McKinley wrote:
> Rudy Zijlstra wrote:
>   
>>>   
>>>       
>> Hi Maria,
>>
>> Can you share your pxe config?
>>
>> Also, what kernel level is the file server? And how is the kernel of the 
>> diskless client configured?
>>
>> I've been looking at my own diskless config, and would like to compare.
>>
>> Thanks,
>>
>> Rudy
>>     
>
> here is the rundown on how I have (almost) set up my pxe client:
>
> Compiled a kernel (debian 2.6.26) (this is explicit, I just copied from 
> my instructions)
>
> Top Level (Linux Kernel Configuration) -> Networking -> Networking 
> Options -> IP: kernel level autoconfiguration
> (once autoconfiguation is asterisked, these show up to put an asterisk in:
>          IP: DHCP support 
>
>          IP: BOOTP support  (maybe IP: RARP support?)
>
> Top Level -> Device Drivers -> Network Device Support -> appropriate 
> network card Ethernet
>
> Top Level -> Device Drivers -> Input device support -> Mice -> PS/2 mouse
>
> Top Level -> File systems -> Miscellaneous filesystems -> make sure 
> Compressessed ROM file system support has *
>
> Top Level -> File systems -> Network File Systems -> NFS file system support
>                                             -> Root file system on NFS 
>
>
> created initrd (used MODULES=netboot and BOOT=nfs options in 
> initramfs.conf):
>
> mkinitramfs -o /tftpboot/initrd.gz 2.6.26
>
> created a gpxe file for floppy:
> http://rom-o-matic.net/gpxe/gpxe-0.9.4/contrib/rom-o-matic/
> picked out my network card (which they don't make particularly easy), 
> created image, and stuck it on a floppy
>
> stuck the bzImage and initrd.gz on my webserver with a file boot.gpxe 
> with the following contents:
>
> #!gpxe
> # clocksource option added, because without it would get stuck during boot
> kernel http://www.shadlen.org/gpxe/bzImage init=/root/sbin/init 
> root=/dev/nfs nfsroot=10.208.108.19:/tftpboot/oscar ip=dhcp 
> clocksource=acpi_pm
> initrd http://www.shadlen.org/gpxe/initrd.gz
> boot
>
> (played around with all kinds of changes options in the above file, also 
> dhcpd.conf)
>
> added stuff to my dhcpd.conf:
> # computational cluster
> group {
>    filename "http://www.shadlen.org/gpxe/boot.gpxe";
>    server-identifier 10.208.108.19;
>    option subnet-mask 255.255.255.128;
>    use-host-decl-names on;
>    default-lease-time            86400; # 24 hours
>    max-lease-time                86400; # 24 hours
>    host nina {
>       hardware ethernet 00:04:23:e0:5f:9b;
>       fixed-address 10.208.108.19;
>    }
>    host oscar {
>      hardware ethernet 00:04:23:e0:5e:68;
>      fixed-address 10.208.108.28;
>      option root-path    "/tftpboot";
>    }
> }
>
> added to exports:
>
> /tftpboot       10.208.108.28(rw,sync,no_root_squash)
> /usr            10.208.108.28(rw,sync,no_root_squash)
>
> make directory /tftpboot/oscar and copied stuff from root directory of 
> server, with certain files changed (can be explicit about this if you 
> want) or omitted.
>
> restarted various services
>
> Probably more than you really wanted, and I probably forgot something, 
> but hope it is useful.
>
> cheers,
> maria
>   

The big difference i see, is i am using a kernel with all needed 
immediate support compiled in. Not only the network aspects, but also 
the filesystems i need. Subsequently i am not using any initrd... The 
one diskless i am booting is slackware based, but normally slackware 
also uses an initrd. I normally compile my own kernels though, and make 
sure i need no initrd :)

My pxe config file for the machine is:
------------
default operational

prompt 1
timeout 100
display tv-salon-msg.f1
F1 tv-salon-msg.f1
label operational
   kernel tv-salon-2.6.21.3
   append root=/dev/nfs rw,tcp 
nfsroot=192.168.1.1:/data/HomeData/hd-cd/pc-tv-salon2
   ipappend 1
label test-system
   kernel tv-salon-2.6.16.16
   append root=/dev/nfs rw,tcp 
nfsroot=192.168.1.1:/data/HomeData/hd-cd/pc-tv-salon2
   ipappend 1
label memtest
   kernel memtest86.img
---------------

This allows for some debug at need ;)

For comparison here a netboot config for a machine which has its own 
disks but is using a diskconfig that both lilo and grub do not like:

-----------------
default astra-2.6.19.1 noinitrd load_ramdisk=0 prompt_ramdisk=0 
root=/dev/md_d0p1 raid=part ro
prompt 1
timeout 1200
display astra.f1
F1 astra.f1
label slackware
  kernel sl-bzImage-2.6.18.2
  append initrd=sl-initrd.img-11.0 load_ramdisk=1 prompt_ramdisk=0 
ramdisk_size=6464 rw root=/dev/ram raid=part
  ipappend 1
label system-2.6.18.2
  kernel sl-bzImage-2.6.18.2
  append noinitrd load_ramdisk=0 prompt_ramdisk=0 ro root=/dev/md_d0p1 
raid=part
label system-2.6.19.1
  kernel astra-2.6.19.1
  append noinitrd load_ramdisk=0 prompt_ramdisk=0 ro root=/dev/md_d0p1 
raid=part
label memtest
  kernel memtest86.img

-------------------------

I hope this helps

Cheers,

Rudy




More information about the Techtalk mailing list