LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-12-2009, 08:11 AM   #1
paul4
LQ Newbie
 
Registered: Mar 2009
Distribution: RHEL 5
Posts: 1

Rep: Reputation: 0
Diskless client question


I am trying to create a pxe boot configuration that allows clients to boot with a complete system resident in RAM without using NFS.

The clients can see the tfpt server and load the desired kernel but the init file is not functioning correctly and the kernel panics.

The process I am going through to build the loadable kernel is as follows:

1) Unarchive the existing loadable kernel
2) Copy system files into structure
3) Copy modified init file to structure
4) rebuild loadable kernel

The process I am using to unarchive / copy / rebuild loadable kernel is:

#!/bin/bash

basedir=/tftpboot/images/x86_64
initrd_dir=$basedir/initrd-base

rm -rf $basedir/initrd_new.img
rm -rf /boot/initrd_new.img
rm -rf $initrd_dir

cd $basedir

echo " "
echo " "
echo " "
echo " "
echo " "
echo "Making initrd-base directory"
mkdir $initrd_dir
cd $initrd_dir

echo "Restoring initrd_new.img to initrd-base"
#gzip -cd /boot/initrd_new.img | cpio -imd --quiet
gzip -cd /boot/initrd-2.6.18-92.el5.img | cpio -imd --quiet

echo "initrd-base has been restored"

mk_directories="/home /export /proc /tmp /lib64 /lost+found /usr/tmp /var/crash /var/cvs /var/db /var/empty /var/gdm /var/lo
ck /var/log /var/tmp /var/www /var/yp"

echo "Creating directories:"
for dir in $mk_directories ; do echo "... $initrd_dir$dir"
mkdir -p $initrd_dir$dir
done

copy_directories="/bin /etc /lib /sbin /lib64"
for dir in $copy_directories ; do
echo "Copying $dir to $initrd_dir$dir"
cp -a $dir $initrd_dir$dir
done

echo "Copying init from /root/configuration_files"
cp /root/configuration_files/init ${initrd_dir}/init

cd $initrd_dir

rm -rf usr/share/man usr/share/locale
echo "Creating new image file from $PWD to file ${basedir}/initrd_new.img"

find . | cpio --quiet -H newc -o | gzip -9 -n > ${basedir}/initrd_new.img

The init file:

#!/bin/nash
/bin/mount /proc
/bin/umount /proc
showlabels
pivot_root /dev/ram0



The pxelinux.cfg/default looks likeEFAULT menu
PROMPT 0
MENU TITLE Diskless Client Testing
TIMEOUT 50
TOTALTIMEOUT 6000
ONTIMEOUT x86_64

LABEL local
MENU LABEL (local)
LOCALBOOT 0

LABEL x86_64
kernel images/x86_64/vmlinuz
MENU LABEL x86_64
MENU DEFAULT
append initrd=images/x86_64/initrd_new.img ramdisk_size=20485760 root=/dev/ram0



Any examples that I can be pointed to on how set up the init file correctly would be appreciated.

Thanks,
Paul
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to setup thin client just for telnet or ssh client use using boot diskless PXE. hocheetiong Linux - Newbie 3 05-21-2008 08:02 PM
How can i add a diskless client ZAMO Linux - Server 3 05-07-2007 11:31 AM
Stuck for 2 weeks on diskless client french_hustler Linux - Networking 9 01-05-2007 11:39 AM
Diskless Client Over NFS Using DHCP Question geogecko Linux - Newbie 1 01-11-2004 12:48 AM
Prefered motherboard for diskless client ? Snooze Linux - Hardware 1 06-25-2003 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration