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
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Fri Jun 20, 2003 6:25 am    Post subject: Reply with quote

Of course you can !

As the system is booted, just mount your disk like explained in the standard installation doc.

But maybe it would be easier to use a distro like Knoppix to do that ... or also to use the Gentoo LiveCD remotly.
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
Zodiak
n00b
n00b


Joined: 23 Jun 2003
Posts: 25

PostPosted: Tue Jun 24, 2003 2:27 pm    Post subject: Reply with quote

I have been using about the same setup to boot 16 Redhat machines over the network for six months now. Figuring out how to do this on my own took me a long time, and I wish I had had this forum at that time. My compliments to swiss mage. :D

Anyway to answer a few questions. PXE is what has the limit, the PXE standard limits the size of disk image that can be downloaded to I think 512k. (Some cards do support 640k however.) So if you are using GRUB, make sure that your GRUB image is less then that. (If you follow the instructions in this forum this will not be a problem.)

After GRUB is booted, you can download a boot image of any size. I liked to use regular floppy boot disks, and just do a dd of the disk to build an image for the tftp server. (Easy to test, and build) Then I used syslinux memdisk to build a RAM disk and copy the boot image into the RAM disk and boot from there. I never had a problem with the size of the image, and did try up to 2.2MB images without any problems, so I am not sure about that.
My grub.lst looked like the following

title Network Boot
root(nd)
kernel /vmlinux root=/dev/nfs nfsroot=10.10.1.1:/clients/%s ip=dhcp
title Diskless FreeDos Boot
root(nd)
kernel /memdisk
initrd /dosfloppyimage.img

In getting Linux to work via a NFS server, you need to make sure that you compile the kernel with built in NFS-root support, and also build the network driver into the kernel, and remove all Network settings from other places. (i.e. initializing the network card during startup scripts gave me kernel panics since it was already initialized in the kernel.) I also liked to build a RAM drive into my kernel for my use, but I don't know if this is strictly required.

After that configuring my NFS server hosts.allow, and iptables scripts was all that I needed to do to get it to boot.

As a side note, in answer to a few posts, I have my tftp, dhcp, and nfs server on different machines (And even on different subnets), and it works just fine. It is by no means a requirement to have them all on the same machine. I also tried swaping via NFS, but it was so slow it was not even worth it. (I bet swapping to floppy would be faster, and from reading on the Internet most people have similar experience.) Just buy some more RAM, it's cheap and lots easier to setup too.
Back to top
View user's profile Send private message
zuluh
n00b
n00b


Joined: 19 Jun 2003
Posts: 3

PostPosted: Tue Jun 24, 2003 8:17 pm    Post subject: Re: Problem Reply with quote

Edweirdo wrote:
Mine seemed to work fine the first time, but everytime after that when I try to boot my client it dies at trying to mount my root filesystem R/W.

Quote:
* Root filesystem could not be mounted R/W :( [ !! ]


My export file looks like:

Code:
/diskless/nc001 *(rw,sync,no_root_squash)


Any help would be welcome.


I got that problem too, after adding a line in fstab it was fixed.
that line should go something like this:
Code:

/dev/nfs / ext3 noatime 0 0
Back to top
View user's profile Send private message
snafoo
n00b
n00b


Joined: 22 Jan 2003
Posts: 39

PostPosted: Fri Jun 27, 2003 5:55 pm    Post subject: problems Reply with quote

i followed the instructions to the letter, but when my kernel boots, it gets to the 'freeing kernel memory' part and never switches over to the gentoo scripts. just sits there.

the root mounts perfectly over NFS.

:?

thanks.
Back to top
View user's profile Send private message
vibidoo
Guru
Guru


Joined: 27 Nov 2002
Posts: 409

PostPosted: Tue Jul 15, 2003 7:49 am    Post subject: Reply with quote

Hello Mr Swiss.made

Thanks a lot for this topics :D .

I followed your instruction and everything was going well .

Until I reset the node client .

I sucess to boot normaly the node client only one time .
And because I didn't plug a keyboard I reset (hardware reset) the client .

And still now I have the following error on boot (node client) :

Code:

* Checking root filesystem
 fsck.ext2: Is a directory while trying to open /
/:
the superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contaiins an ext2
filesystem (and not swap or ufs or something else) , then the superblock is
corrupt , and you might try running e2fsck with an allternate superblock :
  e2fsck -b 8193 <device>

* Filesystem repaired
*Remounting root filesystem read/write ...
* Root filesystem could not be mounted R/W :(

(Control D for normal setup)



With Control D I finish to boot normaly but I have some errors

Any idea ??
Back to top
View user's profile Send private message
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Tue Jul 15, 2003 8:55 am    Post subject: Reply with quote

I had the same problem yesterday :roll:

I did the following and now it's working again :

1. Check the /etc/fstab file of the diskless client. Mine looks like this :

Code:
# <fs>                                  <mountpoint>    <type>          <opts>                  <dump/pass>
 
192.168.1.20:/diskless/eta              /               nfs             defaults                1 1
/dev/cdroms/cdrom0                      /mnt/cdrom      iso9660         noauto,ro               0 0
 
none                                    /proc           proc            defaults                0 0
none                                    /dev/shm        tmpfs           defaults                0 0


2. If this is not enough, check your DHCP server config file and add the root-path option :

Code:
host eta {
        hardware ethernet ...;
        fixed-address 192.168.1.10;
        option option-150 "/eta/grub.lst";
        filename "/eta/pxegrub";
        option root-path "/dev/root";
}


3. If it does not work now, post a message again.

++
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
vibidoo
Guru
Guru


Joined: 27 Nov 2002
Posts: 409

PostPosted: Tue Jul 15, 2003 11:28 am    Post subject: Reply with quote

thanks for your quick answer .

the line on the fstab resolve the boot problem .
and I just had to emerge portmap and now I can boot completely.

But there are still an error on the boot . It seems to not affect the system but if you have any idea .

Code:

* Checking root filesystem
fsck: fsck.nfs: not found
fsck: Error 2 while executing fsck.nfs for 192.68.0.1:diskless/eta

Back to top
View user's profile Send private message
-=Beelzebub=-
n00b
n00b


Joined: 02 Apr 2003
Posts: 30
Location: ~beelzebub

PostPosted: Tue Jul 15, 2003 3:09 pm    Post subject: Reply with quote

vibidoo wrote:
thanks for your quick answer .

the line on the fstab resolve the boot problem .
and I just had to emerge portmap and now I can boot completely.

But there are still an error on the boot . It seems to not affect the system but if you have any idea .

Code:

* Checking root filesystem
fsck: fsck.nfs: not found
fsck: Error 2 while executing fsck.nfs for 192.68.0.1:diskless/eta



You can get around that by putting "touch /fastboot" in your /etc/conf.d/local.start
_________________
One down, six billion to go.
Back to top
View user's profile Send private message
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Tue Jul 15, 2003 8:39 pm    Post subject: Reply with quote

It's seems there're numerous problems concerning the boot of the client.

Here's a summary of all the problems I had and their solution :

Various errors during kernel boot (before the "Gentoo Linux" tag) :

Check your kernel configuration (make menuconfig in the kernel source tree)

System freez just after USB detection

Just reboot the client.

Unable to mount the filesystem read/write

This is an issue with the /etc/fstab. Add an entry for your NFS root filesystem and it should work

fsck.nfs not found

This is not vital and can be let as is ...

Various errors during system services start

I have no solution for this and I cannot find what gives this errors. But I already have one answer : modprobe complaining about strange missing modules. This is a baselayout problem, don't worry about this.

But I have several others errors and some services are started one or three times ... If someone found a solution for this please post !
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
vibidoo
Guru
Guru


Joined: 27 Nov 2002
Posts: 409

PostPosted: Fri Jul 18, 2003 4:45 pm    Post subject: Reply with quote

Now I would like to use 2 NIC cards on a client

Could you help me to setup the Dhcpd.conf file's ?

I really have no idea on how to setup this .

Do I have to setup like this ?

Code:

host eta {
        hardware ethernet1 ...;
        fixed-address 192.168.1.10;
        option option-150 "/eta/grub.lst";
        filename "/eta/pxegrub";
        hardware ethernet2 ...;
        fixed-address 192.168.0.20;
}



:?:
Back to top
View user's profile Send private message
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Sun Jul 20, 2003 7:56 pm    Post subject: Reply with quote

Nop ...

You just have to create two different host {} blocs ...

For example :

host pc1 {
hardware ethernet ...;
fixed-address 192.168.1.10;
option option-150 "/pc1/grub.lst";
filename "/pc1/pxegrub";
}

host pc2 {
hardware ethernet ...;
fixed-address 192.168.1.20;
option option-150 "/pc2/grub.lst";
filename "/pc2/pxegrub";
}

++
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
mark
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2002
Posts: 119

PostPosted: Sat Jul 26, 2003 1:53 pm    Post subject: netboot with existing DHCP router Reply with quote

I have root over nfs working, I boot the kernel off of a cd. My bios supports net booting.

Has anyone done a net boot in combination with a hardware router. My SMC router currently provides ip addresses via DHCP. I think I may regret it if I try to run two DHCP servers, what do people think?

I may need to figure out how to use static ip's with my reouter?

Mark
_________________
Regards

Mark
Back to top
View user's profile Send private message
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Wed Aug 06, 2003 10:30 am    Post subject: Reply with quote

Hi all,

I'm very proud of announcing that my diskless howto has been integrated in the official "Gentoo Linux alternative installation method HOWTO" available at :

http://www.gentoo.org/doc/en/altinstall.xml#doc_chap6

Thanks to the author that has me integrated as contributor :D

CU soon (and nice holidays for who is in holidays :wink: )
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
Galle
n00b
n00b


Joined: 12 Aug 2003
Posts: 3

PostPosted: Tue Aug 12, 2003 9:53 pm    Post subject: LiveCD and reboot Reply with quote

Hey all,

Why do I have to reboot using the LiveCD to install the stages for my diskless clients?
What is the difference from that and just chrooting on the running system?

Regards
Galle
Back to top
View user's profile Send private message
Swiss.Mage
n00b
n00b


Joined: 24 Mar 2003
Posts: 49
Location: Switzerland

PostPosted: Wed Aug 13, 2003 8:22 am    Post subject: Reply with quote

From the howto :

Quote:
I have tried many ways to install the base system of my diskless client. But the only one that really succeded is the following :

2.1 Reboot the server on a Gentoo LiveCD


As said I've try many ways to install the base system but I always had problems ...

Try to run bootstrap or to emerge a new version of GCC on a chrooted environment ... It could work for you but not for me !
_________________
EPFL
http://www.epfl.ch
Swiss Federal Institute of Technology
Back to top
View user's profile Send private message
lucasjb
Tux's lil' helper
Tux's lil' helper


Joined: 10 Mar 2003
Posts: 123
Location: Melbourne, Au

PostPosted: Tue Aug 19, 2003 12:28 am    Post subject: LTSP Reply with quote

Hi All,

In case anyone was wondering, somebody has already thought about all of these issues and created an easy to install and configure suite of software known as LTSP. It makes server setup very easy and client setup trivial. I take it there's no ebuild for it at this stage, but since LTSP-4, a complete build environment (known as LBE) for the application has been included that would probably make creating an ebuild quite easy for somebody who is skilled and so inclined. I'm not sure how well it would integrate with Gentoo, but it's fantastic software and really worth checking out if you're interested in thin-client linux systems.

Lucas
Back to top
View user's profile Send private message
heini
n00b
n00b


Joined: 20 Sep 2002
Posts: 32

PostPosted: Tue Aug 19, 2003 6:37 am    Post subject: Reply with quote

Hi,

nice tutorial, but it seems there is a little misunderstanding about X.
Swiss.Mage wrote:
Something I can add about this setup is that it will need about 1 GB including the X server.

To connect to a remote X server, the only thing you have to do is to run "X -broadcast" on the client.


"X -broadcast" starts the X server on the client machine. The server machine serves dhcp, tftp and nfs only, but not X. You don't even need to start X on the server machine.

Bye...

Dirk
Back to top
View user's profile Send private message
carambola5
Apprentice
Apprentice


Joined: 10 Jul 2002
Posts: 214
Location: Madtown, WI

PostPosted: Tue Aug 19, 2003 12:02 pm    Post subject: Re: LTSP Reply with quote

lbarbuto wrote:
Hi All,

In case anyone was wondering, somebody has already thought about all of these issues and created an easy to install and configure suite of software known as LTSP. It makes server setup very easy and client setup trivial. I take it there's no ebuild for it at this stage, but since LTSP-4, a complete build environment (known as LBE) for the application has been included that would probably make creating an ebuild quite easy for somebody who is skilled and so inclined. I'm not sure how well it would integrate with Gentoo, but it's fantastic software and really worth checking out if you're interested in thin-client linux systems.

Lucas


I've been trying to use LTSP recently but it simply isn't working for me. Also, the goal of LTSP isn't quite the same as what the original howto in this thread was going for:

LTSP is radically slanted towards building X terminals. Essentially, you use LTSP to get the client machine up and running, then run every single program on the server (including X).

This document explains how to get a client up and running such that, once running, it is a normal Linux workstation except that the filesystem is mounted via NFS. This is ideal if your client has the necessary processing speed and RAM to get the job done (as in my case).
_________________
Get Firefox!

Proper Web Development

I'm done at 999.
Back to top
View user's profile Send private message
albancrequy
n00b
n00b


Joined: 19 Aug 2003
Posts: 1
Location: Grenoble - France

PostPosted: Tue Aug 19, 2003 12:02 pm    Post subject: diskless Reply with quote

Hi all!

I have tested an diskless install and I have written a documentation:
http://alban.apinc.org/index.php?article=documentation/diskless
(80 pages)
but:
1/ the documentation is in french (sorry...)
2/ the distrib is not Gentoo but Mandrake. (sorry again)

The documentation contains the scripts to configure the diskless
and some config files (fstab, grub.lst, dhcpd.conf, etc.).

If you want a translation, do it yourself: the documentation is under
the GPL license.
You can write me (alban.crequy@laposte.net) if you want more infos.

darookee says:
> is there a way to do this without a bootable network card?

Yes. I use either a PXE card or a bootable CDROM. I use isolinux
to boot from a CDROM as a diskless. Ok, the CDROM contains the linux
kernel and isolinux.cfg (isolinux.cfg is to isolinux as grub.lst is to
grub). I use only 2MB of the CDROM. But all the system is on the NFS
server.

kermitjunior says:
> How does this differ from LTSP? Any advantages or disadvantages?

AFAIK, all programs on LTSP run on the server. With these diskless, all
programs run on the diskless.

ctford0 says:
> Why use tftp and not something like ssh?

Because the program inside the chip of the PXE card want tftp. Why not FTP?
Because FTP is too complex (more than TFTP) for the chip.

GurliGebis says:
> Well, Isn't there a way to be able to have swap on this system?

If you have a hard disk on your diskless, you can. I have tested it
and it works. In my tests, the hard disk was used only to swap.

ctford0 says:
> Ok, say I decide to setup 6 diskless clients. What directories can
> be shared between them all?

Well, I guess it depends of the distrib. I have only tested the mandrake.
Hope it is the same for gentoo.

> /usr
> /bin
> /sbin
> /opt

yes; no problem.

> /etc ?????

no, you can't. Because of:
/etc/fstab: the root mount point is not the same on 2 diskless.
/etc/modules: the modules to be loaded are not the same on 2 diskless.
/etc/cups.conf: this file contains the IP of the diskless...
/etc/sysconfig/network: (only on mandrake but I assume there is another
config file for gentoo) the file contains the static IP of the diskless.
No, it is not possible to use DHCP in this step (because of... hum if
someone want to know, ask me, i'm lazy).
etc.

If you want share /etc/passwd and some other, see below.

> /lib ???

yes, I share it.... but not /lib/dev-state! I don't know if this problem
exists in gentoo but /lib/dev-state can't be shared on mandrake.
So, I share /lib (with a NFS mount point in fstab) and I replace the directory
dev-state to a symbolic link to /dev-state. (symbolic link are resolved
by the diskless, not by the NFS server). So all /lib is shared but not
/lib/dev-state.

> I really dont want to have duplicates of things that I dont need
> to. I know that these I will have to have for each terminal.
>
> /dev

In my tests, I have not shared /dev. I wonder if /dev can be shared if
the diskless use devfs since the devfs mount point hide the files inside
the directory /dev... not tested.

> /tmp

Can't be shared because of some programs which place locks in /tmp.

> /var

Can't be shared because of some programs which place locks in /var.
For example, NFS locks are in /var/lib/nfs in mandrake.

> Any others to add to this list?

On all my diskless, I share /common with a NFS mount point. And
/etc/passwd and some other are in /common.
On the NFS server side, the files passwd of each diskless are shared
with hard links. It's not possible to use symbolic links because of:
1/ symbolic links are resolved by the diskless (hard links are
"resolved" by the NFS server).
2/ The /common mount point is mounted after the system use passwd.
Some init scripts want to read passwd before /etc/fstab is read.

Of course, /home is shared.

Swiss.Mage says:
> If the users, groups, ... are the same on each machine, you could even try sharing /etc and /home ...
> I have to "confess" I have never try to share all of this system dirs ...
> So if you do it, post a message here to provide feedback for the other users (and me too).

In my tests, I don't use NFS: I used normal passwd, group and shadow.
They are shared with hard links on the server and it works !

Swiss.Mage says:
> I think the in.tftpd server must be on the same machine than the
> DHCP server ... but I'm not sure !

If your TFP server is not on the same machine than the DHCP server, the DHCP
server MUST say to the diskless where is the TFTP server. This is done via the
"next-server" option in the file dhcpd.conf. Example:
host eta {
...
next-server 192.168.1.11; # TFTP server's IP
filename "/eta/boot/pxegrub";
}

If the NFS server is on the same machine than the DHCP machine, you can
simplify the file grub.lst:
Put:
"kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=/diskless/eta"
Instead of:
"kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=192.168.1.20:/diskless/eta"

The linux kernel will assume that the NFS server has the same IP than the DHCP
server.

Moreover: if you put this line:
"kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=/diskless/%s"
the linux kernel will replace "%s" with the IP adress of the diskless given
by the DHCP server.

Alban Crequy
alban.crequy@apinc.org
http://alban.apinc.org/
Back to top
View user's profile Send private message
Munter
n00b
n00b


Joined: 22 Aug 2003
Posts: 1
Location: Denmark

PostPosted: Fri Aug 22, 2003 6:49 am    Post subject: Reply with quote

lbarbuto: I got LTSP Running on gentoo with 12 Thin Clients, works great. Dont have PXE on the netcards though, so right now we are using floppys to boot the thin clients untill we get our hand on some real thin clients and not just old junk boxes :)
Back to top
View user's profile Send private message
vibidoo
Guru
Guru


Joined: 27 Nov 2002
Posts: 409

PostPosted: Wed Aug 27, 2003 10:01 am    Post subject: Reply with quote

I am using the dikless system with success since one month already

But sometimes one of my system use to stop just before the init
it stop on :
Code:


Mounted devfs on /dev
Freeing unused kernel memory: 100k freed



And if I reboot I start normaly and boot to the login .

But now it always stop at this point , even I reboot many time the system it doesn't want to boot completely .
Back to top
View user's profile Send private message
Ninjabucket
n00b
n00b


Joined: 19 Jul 2003
Posts: 22

PostPosted: Fri Aug 29, 2003 4:01 am    Post subject: Reply with quote

Code:
Mounted devfs on /dev
Freeing unused kernel memory: 100k freed


I am having this exact same problem...anyone know a fix?
Back to top
View user's profile Send private message
antik
Apprentice
Apprentice


Joined: 01 Oct 2002
Posts: 212

PostPosted: Sat Sep 13, 2003 11:06 am    Post subject: Reply with quote

Ninjabucket wrote:
Code:
Mounted devfs on /dev
Freeing unused kernel memory: 100k freed


I am having this exact same problem...anyone know a fix?


Search in mailing list.

If you want some robust terminal, look here: http://www.thincan.com/
_________________
"Yes, I know Linux runs faster, but they can do that because they have thrown out the weight of the airbag, collision frame and safety belt." —Poul-Henning Kamp
Back to top
View user's profile Send private message
patsonrt1
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 104
Location: Somewhere in my head

PostPosted: Wed Oct 29, 2003 1:31 am    Post subject: Reply with quote

Great How-To ...and thread :)
Works great with suggestion by karch and I burnt my own prom to my Linksys card for a completely disk free P233 8O
Now off to install Distcc :wink:

Thanks!
_________________
"Well fine, go ahead and miss church, and when you die and go to hell you can answer to SATAN!"

"Ok"

-fortune
Back to top
View user's profile Send private message
syadnom
Guru
Guru


Joined: 09 May 2002
Posts: 531

PostPosted: Sat Nov 01, 2003 11:33 pm    Post subject: suggestions Reply with quote

First, the initial setup of this system is just right. But things I would change are the following:

Mount / via NFS, but mount all other folders via NBD, export image files from the server as NBD devices and then mount every other directory as NBD, except /usr/portage;/var, , because then you can share /usr/portage and /var, NBD only allows(safely) one machine to mount an image r/w.

advantages:
1)NBD allows ANY file system to be used, NFS does not. This gives you local journaling wither ext3 or reiserfs etc. Much better
2)SWAP can be mounted via NBD and it works quite well.
3)NFS has its own error correction, which is redundant because TCP/IP has very good error correction, this causes overhead, NBD does not do internat corrention and allows TCP/IP's build in error correction handle this, this allows more efficient data transfers.
4)your system believes that the NBD is a local piece of hardware, you can fdisk to your hearts content on these mounted drive images..
(BTW: NBD = network block device)
5)each directory would be its own file on the server, allowing quick and easy backups. Simply tar up the disk file and your set.
6) NBD is much faster that NFS, and has support for recovering a disconnected disk. If your NFS / fails, you lock and must reboot, if your NBD fails, you can fix the network error and NBD will remount the disk and allow operation to continue.

also, 3com has a NBD-on-floppy product available that can completely mount a remote volume and pass boot on to a windows bootloader so you can boot windows via the network. I have this and it works very well, I only need 1 copy of windows that iI can run anywhere on the network(only 1 instance at a time).
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 3 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