Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My Gentoo diskless install howto
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
cable_guy
n00b
n00b


Joined: 08 Jan 2005
Posts: 17
Location: Smithers, BC

PostPosted: Sun Mar 27, 2005 8:26 pm    Post subject: Reply with quote

I'm just posting thies here in hopes that other people who have the same problem can find it. There isn't currently anything posted about it on the net.

I originally set up my diskless nodes basically the same as this how to, using nfs to serve all the systems, and pxe to boot. I upgraded my cards to dlink dge-530t gigabit cards, and they don't support pxe boot. Then to my nasty surprise, etherboot doesn't support them either. The cure was to dissect a gentoo livecd installation cd.

I copied the iso image into /mnt/tmp, then did:

Code:

mkdir /mnt/loop0
mount /mnt/tmp/isoname.iso /mnt/loop0 -o loop
mkdir /mnt/iso
cd /mnt/loop0
find | cpio -pdm /mnt/iso
cd /mnt
umount /mnt/loop0
rm -r /mnt/loop0


This gave me a folder with the exact cd contents. Take everything out of the root cd folder, except the isolinux folder and livecdsquash file. In the lisolinux folder delete everything except the isolinux.bin and isolinux.cfg. Then take your kernel for your diskless node and copy it to the isolinux folder. Edit the isolinux.cfg and take all the extra junk out, mine looks like:

Code:

default gentoo
timeout 5

label gentoo
   kernel omkernel
   append ip=dhcp root=/dev/nfs nfsroot=192.168.0.2:/diskless/192.168.0.201 looptype=squashfs loop=/livecd.squashfs


where omkernel is the name of my kernel file, and nfsroot="server ip":"root folder on server".

Then:
Code:

cd /mnt/iso
mkisofs -no-emul-boot -boot-load-size 4 -boot-info-table -r -b isolinux/isolinux.bin -c isolinux/boot.cat -o /mnt/newgentoo.iso .


And you now have a bootable cd image that will boot your kernel, and load everything up the way it used to. Just don't forget to change the MAC address in your server config files to the MAC address of the new card first.
_________________
What, Windows isn't 64bit yet? :)
Back to top
View user's profile Send private message
skarecrow
n00b
n00b


Joined: 03 Nov 2003
Posts: 25
Location: $HOME

PostPosted: Mon Apr 18, 2005 9:36 pm    Post subject: pxe booting with windows DHCP Reply with quote

I have a network which uses Windows 2000 DHCP servers. I setup a reservation for the NIC in my diskless linux box and configured DHCP options 66 and 67 for the pxe boot info. When booting, the client grabs the appropriate IP address, and leaves me at a grub prompt. When I use a linux DHCP server, the diskless workstation boots perfectly. What is the difference here? It seems like when the system gets the IP from the windows DHCP server that it isnt loading grub.lst. Any ideas?
Back to top
View user's profile Send private message
caar
n00b
n00b


Joined: 24 Apr 2005
Posts: 2
Location: Zurich

PostPosted: Sun Apr 24, 2005 10:04 pm    Post subject: Reply with quote

I've been following this trak. I also set up a few diskless client configurations. I set them up more or less like it is described here. It all works. So far so good - till it comes to emerge!

Does anybody know a way to run emerge separately for the root (/) and the /usr part of a package?

I used to work quite intensive with Solaris about 10 years ago. The package system on Solaris destinguishes between the part which goes to root (normally /bin and /sbin) and the part that goes to /usr (/usr/bin, /usr/sbin, /usr/share, ...). Well, Solaris keeps architecture dependencies in root (/)...

Why I bother about this:
- diskless clients do not have to be of the same CPU architecture as the master or host;
different CFLAGS etc in /etc/make.conf could be used for clients.
- the part of a software that goes to /usr needs only be compiled once (the part that's common
to all the clients
- the part that goes to root (/) might be different on each client (e.g. for /etc)

A possible solution might be, if each client has only the client specific files in its file tree (/diskless/<hostname>) and there is a default file tree (/diskless/default). On the client a merge is needed of the client specific file tree and the default tree. This way most packages have to be applied only once and all clients profit from it. Unfortunately, I don't know of such a file system...
_________________
---caspar
Back to top
View user's profile Send private message
Camisa
n00b
n00b


Joined: 10 Jun 2005
Posts: 5
Location: North America

PostPosted: Fri Jun 10, 2005 8:48 am    Post subject: Idle Client Reply with quote

Does anybody else notice that their diskless client is mostly idle? I run emerge system or emerge world and observe the idle time at mostly 70%...

I also have determined when the kernel mounts the NFS / it mounts it NFSVERS=2... even though I have specified it to use version 3 in both the kernel config and in the fstab.

This is a new problem for me... I had a diskless jukebox running for about 9 months.. and I never had the compile time slowdown like I'm experiencing now.. Back then it was the 2.4. kernel and the system was built from stage 1.


Well this time, I'm still doing stage 1; but I'm using the 2.6.11.11 kernel.

Is anyone else aware of their NFS root using version 2? Do an "nfsstat" check on your server to see if the traffic is all from version 2 or version 3.

Final question: Should I be doing the NBD thing instead of NFS...?
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Tue Jun 28, 2005 8:47 am    Post subject: Reply with quote

I installed gentoo successfully for a diskless node. But I have a problem while shutting down the machine: The init-skript nfsmount unmounts my root partition, so the rest of shutdown fails, for example shutting down portmap afterwards (I need nfsmount because I mount other filesystems over nfs, too). Any ideas how to solve this?
Back to top
View user's profile Send private message
blackphiber
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 86
Location: IL

PostPosted: Tue Jun 28, 2005 6:43 pm    Post subject: Reply with quote

cp /usr/lib/grub/pxegrub /diskless/eta/boot/pxegrub
cp: cannot stat `/usr/lib/grub/pxegrub': No such file or directory

I have grub 0.96, where else would pxegrub be? or am I doing something wrong? thanks.
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Tue Jun 28, 2005 6:52 pm    Post subject: Reply with quote

Mine was at /boot/grub/pxegrub
Back to top
View user's profile Send private message
blackphiber
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 86
Location: IL

PostPosted: Tue Jun 28, 2005 7:14 pm    Post subject: Reply with quote

ls: /boot/grub/pxegrub: No such file or directory
using locate pxegrub turns up nothing. I have grub 0.96-r1. thanks again.
Back to top
View user's profile Send private message
dapsaille
Advocate
Advocate


Joined: 02 Aug 2004
Posts: 2366
Location: Paris

PostPosted: Fri Jul 01, 2005 9:43 am    Post subject: Reply with quote

Hi all

First Thanks for this howto ...

but i've a little problem at boot it give me

RAMDISK: Compressed image found at block 0
VFS : Mounted root (ext2 filesystem).
/linuxrc has to be run as the init process as the one
with a PID of 1. Try adding init="/linuxrc" to the
kernel command line or running "exec /linuxrc"
VFS: Cannot open root device "nfs" or unknow-block(0,255)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknow-block(0,255)

Do you have any clue ?

I can post config files if necessary but i don't want to polluate this thread :p
Back to top
View user's profile Send private message
Slammer
Moderator
Moderator


Joined: 28 Mar 2003
Posts: 270
Location: Greece

PostPosted: Sat Jul 02, 2005 12:48 pm    Post subject: Reply with quote

I succesfully finished a diskless gentoo installation, following this How-To. Now the client runs normally. The only problem is during shutdown I receive multiple error messages while the services are closed. (write not permitted in /var/lib/init.d directory). I am sure that the /var directory is mounted as r/w.

Additionally, I want to build a second diskless client using as more as possible common directories with the first client. I understand that is very easy to create a second client in a different directory, but how is possible to share common parts? NFS can not share symlinks (for example /diskless/client2/usr cannot symlinked to /diskless/client1/usr).
_________________
Keep Slamming...
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Wed Jul 06, 2005 5:11 pm    Post subject: Diskless Gentoo Client Reply with quote

For all who are interested setting up multiple Gentoo diskless clients wie have composed a little howto (currently only in german). The installation procesdure is similar to what is decribed in this thread. Bit it is much more flexible in that you have only to maintain a single chroot for all clients. And you can make the nfs-export ro !
The location:

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/diskless.pdf

We are working further on this topic and we now have an installtion with no interference to the normal gentoo baselayout (in contrast to the above how-to). Currently there is no actual documentation, but this is coming soon. The system can be used as a thin-client (remote login via XDMCP or RDP) or as a diskless-client (local login) or as a virtual-diskless-client running vmware with (potential) local cached images.

Of special interest in this topic ist also pam_cifs, which can mount and umount windows CIFS shares on the fly.

http://mozart.informatik.fh-kl.de/download/Software/pam_cifs/pam_cifs.html

pam_cifs is similar to pam_mount, but much more simpler and has a different architecture, which makes it a litlle bit more flexible. Currently there is no ebuild, but on Gentoo it compiles straight forward.

If you are interested don't hesitate to contact me.

I will post a follow up if the documentation is ready.

--
Wilhelm
Back to top
View user's profile Send private message
krani1
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2004
Posts: 76

PostPosted: Sun Aug 28, 2005 7:47 pm    Post subject: Reply with quote

so i've followed this article, but my dhcpc server doesn't wake up, and I've got this in logs :S

Code:
Aug 28 20:13:54 server dhcpd: /etc/dhcp/dhcpd.conf line 33: unknown option dhcp.option-150
Aug 28 20:13:54 server dhcpd:            option option-150 "/diskless/eta/boot/grub.lst"
Aug 28 20:13:54 server dhcpd:                ^


any help?
Back to top
View user's profile Send private message
krani1
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2004
Posts: 76

PostPosted: Mon Aug 29, 2005 9:57 am    Post subject: Reply with quote

* bump *
Back to top
View user's profile Send private message
rsala
Apprentice
Apprentice


Joined: 27 Jul 2003
Posts: 160
Location: Pittsfield, MA

PostPosted: Mon Sep 12, 2005 7:39 pm    Post subject: Reply with quote

I'm having the same problem as Slammer. I assume that the nfsroot is getting umounted as part of the shutdown and then the system no longer has access to /var for some last minute bookkeeping/cleanup. I'm just not sure why no one has reported this problem before. Perhaps it has to do with some of the changes to the base layout over the years.

Has anyone come across an elegant solution to this problem?
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Wed Sep 28, 2005 10:08 am    Post subject: Diskless Gentoo Client Reply with quote

I have made a new version of the diskless gentoo client guide (see below). This installation uses unionfs to leave the normal gentoo-chroot-installation as is. Only minimal modifications are required and the setup is independent of the number of diskless clients or network setup.

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/diskless2.pdf

Of special interest in this topic ist also pam_cifs, which can mount and umount windows CIFS shares on the fly.

http://mozart.informatik.fh-kl.de/download/Software/pam_cifs/pam_cifs.html

pam_cifs is similar to pam_mount, but much more simpler and has a different architecture, which makes it a litlle bit more flexible. Currently there is no ebuild, but on Gentoo it compiles straight forward.

If you need to print to authenticated printers via SMB (Windows or Samba) pam_cups comes in handy:

http://mozart.informatik.fh-kl.de/download/Software/pam_cups/pam_cups.html

--
Wilhelm
Back to top
View user's profile Send private message
corn
n00b
n00b


Joined: 19 Apr 2002
Posts: 15
Location: Vancouver BC

PostPosted: Wed Sep 28, 2005 11:24 pm    Post subject: Reply with quote

Thanks for this great HOWTO. I used it at work to set up a number cruncher farm. Currently the farm has 88 nodes up and running with 150 more coming online soon.

Some caveats were having each worker having its own / filesystem. Mirroring /diskless/192.168.1.1 to all 255 /'s in the subnet was a pain in the butt and now I am afraid to do an update as the root may end up not in sync with the mounted /usr partitions. Also to get each worker to mount its own slash I had to change the pxe default config file to not specify the root partition to mount.

Another thing I had to do was to make the system self configuring. The worker nodes will be rotated out and in and I did not want to edit the dhcp.conf file for every change. Not being a dhcp pro I ended up making a perl daemon that monitors syslog. When I see DHCPDISCOVER's that are not replied to I auto add a entry to dhcp. Once all the IP's in the subnet are full I ping old hosts and when I find one that is down I rewrite the entry for that host and restart dhcp.

Thanks again. This information provided a very valuable and functional solution to a large problem I was faced with.
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Thu Sep 29, 2005 5:35 am    Post subject: Reply with quote

If you have a look to my gentoo diskless description

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/diskless2.pdf

you'll find a methode using translucent filesystems (unionfs) where you have only ONE root-fs fpr ALL clients. Theres is no limiting factor. You only have to update ONE client-root for ALL your clients.

Regards,

Wilhelm
Back to top
View user's profile Send private message
corn
n00b
n00b


Joined: 19 Apr 2002
Posts: 15
Location: Vancouver BC

PostPosted: Fri Sep 30, 2005 8:52 pm    Post subject: Reply with quote

Thats excellent Wilhelm I look forward to learning more about your solution but unfortunately my german does not allow me to extract any information from your documentation.
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Wed Oct 05, 2005 10:06 am    Post subject: Gentoo Diskless Reply with quote

I've made an english version of the howto.

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/diskless2_en.pdf
Back to top
View user's profile Send private message
krani1
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2004
Posts: 76

PostPosted: Wed Oct 05, 2005 11:24 am    Post subject: Reply with quote

sorry it says 404 not found :(
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Wed Oct 05, 2005 11:43 am    Post subject: Reply with quote

should be done now
Back to top
View user's profile Send private message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 536

PostPosted: Thu Oct 13, 2005 4:30 pm    Post subject: Reply with quote

Diskless booting seems to be broken with the latest kernels/stages or with some NFS setups.

The following information might be necessary, from this thread https://forums.gentoo.org/viewtopic-t-240592-highlight-root+dev+nfs+nfsroot.html

rafo wrote:
A couple of days ago I wrote
Quote:
I have tried to change it to use udev, but I just can't get it to work. The diskless node semi-dies at the point where /sbin/rc calls /sbin/depscan.sh (it still responds to ping), and it does not seem to be entirely reproducible: Sometimes I see the green message "Caching service dependencies", sometimes not.


I now have it all sorted it out, I think. I have submitted a number of bug reports on the "Diskless Nodes with Gentoo" paper, September 16, 2005 (http://www.gentoo.org/doc/en/diskless-howto.xml). The Bugzilla numbers are 106525, 107258, 107260, 107262, 107263, 107264, 107271.
Back to top
View user's profile Send private message
Albert_Alligator
Apprentice
Apprentice


Joined: 12 May 2004
Posts: 193
Location: Okefenokee Swamp

PostPosted: Fri Oct 14, 2005 4:32 pm    Post subject: Re: Gentoo Diskless Reply with quote

wimalopaan wrote:
I've made an english version of the howto.

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/diskless2_en.pdf


Hi, I like the install guide, but the fonts you use in the PDF make it hard to read the scripts you've written. Can't copy them, and much of what I think are spaces look like brackets that are lying on their backs. Also, when I copied the scripts, all the letters pasted as individual words.

Stateless.sh

Code:

#!/bin/bash

MODPROBE=/sbin/modprobe
IFCONFIG=/sbin/ifconfig

ahostname(){
    MYHOST="$1'$IFCONFIG eth0 | awk '/HWaddr/{print$5}' | tr -d': '' "
    echo "STATELESS: Seting Host name to $MYHOST"
    echo "HOSTNAME=\"$MYHOST\" " > /etc/conf.d/hostname
    /bin/hostname "$MYHOST"
}
getparams(){
     local cmdline=$(dmesg | grep '^Kernel command line ' | sed 's/^Kernel command line://g')
     for pp in $cmdline ; do
        echo $pp | grep '^stateless=' >/dev/null 2>&1
        if [ $? -eq 0 ]; then
                 echo $pp | sed 's/stateless=//g'
                 return 0
        fi
    done
    echo ""
    return 1
}

isset () {
          for p in $ ( getparams | tr ',' ' ') ; do
              if [ "$p" == "$1" ]; then
                          return 0
              fi
          done
          return 1
}

aunionfs () {
         isset unionfs
                if [ $? -eq 0 ]; then
                   echo "STATELESS : Loading module unionfs . . . "
                   $MODPROBE unionfs
                   while[ "$1" != "" ]; do
                           echo "STATELESS : Mounting tmpfs $1 . . . "
                           mount -n -t tmpfs -o defaults none /mnt/unionfs/$1
                           echo "STATELESS:Mounting$1 unionfs . . . "
                           mount -n -t unionfs -o dirs=/mnt/unionfs/$1=rw:/$1=ro none/$1
                           shift
                   done
                else
                   echo "STATELESS: Not using unionfs as requested . . . "
                fi
}
aunionfs etc var
ahostname stateless
exec /sbin/init


You need to look at this and see if it is correct, I'm not much of a shell scripter my self, at least not yet, and so I'm not sure if that is correct.

This is what they look like without me fixing them.

Code:

# !/ sbin / r u n s c r i p t
g e t c m d () {
        for i in ‘ cat / proc / cmdline ‘; do
                if [ ‘ echo $i | grep xauto ‘ ]; then
                        echo ” $ i ”
                        return
                fi
        done
        echo ” x a u t o = a u t o ”
}
d e p e n d () {
        before xdm
}
start () {
        # define some variables
        X O U T F I L E =/ root / xorg . conf . new
        OUTPUT =/ etc / X11 / xorg . conf
        F I R S T P A R T =/ etc / X11 / a u t o c o n f / part1 . cfg
        L A S T P A R T =/ etc / X11 / a u t o c o n f / part2 . cfg
        # lets have a look what we should do
        if [ ‘ cat / proc / c md l in e | grep xauto ‘ ]; then
                ebegin ” S t a r t i n g X a u t o c o n f i g u r a t i o n . . . ”
                case ‘ g e t c m d | tr ’ = ’ ’ ’ | awk ’ { p r i n t $2 } ’ ‘ in
                        1)
                        cp / etc / X11 / a u t o c o n f / xorg .1. conf $ O U T P U T
                        ;;
                        auto )
                        # Run X - c o n f i g u r e to get c o n f i g u r a t i o n
                  X - configure
                  # D e t e r m i n i n g the start of the i n t e r e s i n g s e c t i o n
                  C O U N T E R = ‘ cat $ X O U T F I L E | wc | awk ’ { p r i n t $1 } ’ ‘
                  u n t i l [ ‘ cat $ X O U T F I L E | tail - n $ C O U N T E R | head - n 1 | awk ’ { p r i n t $1 $2 } ’ | grep ’ S e c t i o n ”
                             D e v i c e ” ’ ‘ ]; do
                          let COUNTER -=1
                  done
                  STARTLINES = $COUNTER
                  # D e t e r m i n i n g the end of the i n t e r e s t i n g s e c t i o n
                  C OU NT E R =1
                  u n t i l [ ‘ cat $ X O U T F I L E | tail - n $ S T A R T L I N E S | head - n $ C O U N T E R | tail - n 1 | awk ’ { p r i n t $1
                             } ’ | grep EndSection ‘ ]; do
                          let COUNTER +=1
                  done
                  ENDLINES = $COUNTER
                  # Write new configuration
                  cat $FIRSTPART > $OUTPUT
                  cat $XOUTFILE | tail - n $STARTLINES | head - n $ENDLINES > > $OUTPUT
                  cat $LASTPART > > $OUTPUT
                  ;;
             esac
             eend 0
      else
             ebegin ” S k i p p i n g X a u t o k o n f i g u r a t i o n . . . ”
             eend 0
      fi
}
stop () {
      ebegin
      eend 0
}
r es ta r t () {
      ebegin
      eend 0
}


That's what the other one looked like before I spent some time cleaning it up...and I haven't even tried it to see if it works. (crossing my fingers).

Anyhoo, I'll be cleaning up the above one as well and post my cleaned version.....of course, you'll have make sure its correct as you are the author.

Thanks again for the tutorial, yours is the best one yet, makes use of unionfs which I had been meaning to do.

Cheers,

Al
_________________
As Socrates once said "I drank what?"
Back to top
View user's profile Send private message
wimalopaan
n00b
n00b


Joined: 06 Jul 2005
Posts: 15

PostPosted: Mon Oct 17, 2005 6:59 am    Post subject: Gentoo Diskless Reply with quote

I've made the two scripts available as source:

http://mozart.informatik.fh-kl.de/download/Software/GentooDiskless/
Back to top
View user's profile Send private message
jamapii
Guru
Guru


Joined: 16 Sep 2004
Posts: 536

PostPosted: Wed Oct 19, 2005 3:22 pm    Post subject: Reply with quote

The diskless booting problem is with NFS wsize.

That mount option can't be changed by a remount, and it is (might be) 4096 by default. The kernel documentation is wrong (/usr/src/linux/Documentation/nfsroot.txt). If this doesn't work, it must be changed in pxelinux.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum