knoppmyth.net Forum Index knoppmyth.net
The home of KnoppMyth.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Diskless Frontend - NFSroot
Goto page 1, 2, 3 ... 14, 15, 16  Next
 
Post new topic   Reply to topic    knoppmyth.net Forum Index -> Usage/HowTo
View previous topic :: View next topic  
Author Message
red321



Joined: 07 Mar 2004
Posts: 116
Location: UK

PostPosted: Thu May 18, 2006 9:33 am    Post subject: Diskless Frontend - NFSroot Reply with quote

I have added my NFSroot approach to the Diskless frontend "How to" over at the Wiki.

Works perfectly for me Smile

http://www.knoppmythwiki.org/index.php?page=DisklessFrontend
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Sat May 20, 2006 3:12 pm    Post subject: Reply with quote

I ran out of inodes on my /myth partition when I attempted to extract the tarball of the frontend into /myth/terminal_server/nfsroot.
How did you get around this?
From my backend:
Code:
root@mythtv:/myth/terminal_server# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/hda1             500992  149001  351991   30% /
/dev/hda3              47168    2221   44947    5% /myth

From my frontend:
Code:
root@fedell:~# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/hda1             500992  116063  384929   24% /
/dev/hda3               1024     587     437   58% /myth
10.1.1.6:/myth/video   47168    2221   44947    5% /myth/video

By deleting everything in /usr/src on the frontend, I got the inode requirement down from 116063 to 74000, but that is still not going to fit on my /myth partition.
Did you originally do a manual install on your backend?
/usr alone uses around 57000 inodes, so if you could find a way to mount the /usr directory on the backend instead of having a full copy of it, that would help.
Back to top
View user's profile Send private message
red321



Joined: 07 Mar 2004
Posts: 116
Location: UK

PostPosted: Sun May 21, 2006 12:28 am    Post subject: Reply with quote

Hmm,

Sorry Greg, not a problem I ran into, as I have upgraded so many times that my machine isn't a "clean install". I have moved /myth/tv off onto another physical disk, and my /myth partition has plenty of inodes to spare. Therefore didnt even see this one coming Sad

Code:
 /dev/hda6            16400384  600750 15799634    4% /myth


The easy solution is to reformat your /myth partition with lots more inodes Smile

A cleverer option would be to image your .usr directory, and then mount it as a loop. Apparently /usr is supposed to be read-only anyway. Kind of spoils the idea of not imaging things though.

You could also symlink /usr to another partition, or move the whole root. Nothing magic about where you put it, as long as it is exported.
[I havent proved this, so you might need to experiment]

So no reason for you not symlink to the backends /usr directory, as long as you export it. However be aware you will then be able to "mess" with the backend from the frontend.

post back if you get it working.
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Sun May 21, 2006 12:38 am    Post subject: Reply with quote

Quote:
So no reason for you not symlink to the backends /usr directory, as long as you export it. However be aware you will then be able to "mess" with the backend from the frontend.
Thanks, I had already started attempting to do this.
Quote:
edit /etc/fstab

remove any refrences to local disks, as on the frontend there arnt going to be any ! remove

/dev/hda1 / ext3 defaults,errors=remount-ro 0 1

replace with:

192.168.254.4:/myth/terminal_server/nfsroot / nfs defaults,auto,noatime 0 2

I assume that this bit is really asking me to edit /myth/terminal_server/nfsroot/etc/fstab and not /etc/fstab.
If that is the case, it might be worth clarifying it on the wiki before someone hoses their backend.
Back to top
View user's profile Send private message
red321



Joined: 07 Mar 2004
Posts: 116
Location: UK

PostPosted: Sun May 21, 2006 12:42 am    Post subject: Reply with quote

Good point !
I'll fix the Wiki

I tried symlinking /myth/terminal_services/nfsroot/usr to /usr. and exporting /usr. It didnt work for me because my backend installs and frontends are sufficiently diffrent now for ther eto be symlinks between /usr and other parts of the backend filesystem, which dont apear on the frontend filesystem. Bit of a managment nightmare to intertwine 2 file systems Smile
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Sun May 21, 2006 1:02 am    Post subject: Reply with quote

My tftp on the frontend timed out. When I went back to check /tftpboot/pxelinux.cfg/default on the backend, I found it wasn't there! On closer inspection it appears that /tftpboot was a symlink to /tmp/tftpboot, so rebooting the backend blew away the configuration. I ran prep-ts again and this time removed the tftpboot symlink and moved /tmp/tftpboot to /tftpboot.

I'll reconfigure and let you know how I get on.

I'm a little confused about this:
Quote:
ALLOW Root access - If you dont do this, you will end up with a Read Only access to the root filesystem, and it will all go horribly wrong.
I didnt see any option to "allow root access" when running prep-ts.
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Sun May 21, 2006 1:17 am    Post subject: Reply with quote

Well, I still get a TFTP open timeout. You say tftp should be taken care of by inetd. Looking at /etc/inetd.conf, there is a line for tftpd that is commented out.
Quote:
#tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /boot
Do I need to uncomment this and configure tftp somehow?
This is what I see in /var/log/syslog:
Code:
May 21 18:52:08 mythtv dhcpd: DHCPDISCOVER from 00:06:5b:7c:8e:5e via eth0
May 21 18:52:09 mythtv dhcpd: DHCPOFFER on 10.1.1.250 to 00:06:5b:7c:8e:5e via eth0
May 21 18:52:10 mythtv dhcpd: DHCPREQUEST for 10.1.1.250 (10.1.1.6) from 00:06:5b:7c:8e:5e via eth0
May 21 18:52:10 mythtv dhcpd: DHCPACK on 10.1.1.250 to 00:06:5b:7c:8e:5e via eth0
May 21 18:52:10 mythtv in.tftpd[5272]: connect from 10.1.1.250 (10.1.1.250)
May 21 18:52:11 mythtv in.tftpd[5273]: cannot set groups for user nobody
May 21 18:52:12 mythtv in.tftpd[5274]: cannot set groups for user nobody
May 21 18:52:16 mythtv in.tftpd[5275]: cannot set groups for user nobody
May 21 18:52:22 mythtv in.tftpd[5276]: cannot set groups for user nobody
May 21 18:52:30 mythtv in.tftpd[5277]: cannot set groups for user nobody
May 21 18:52:40 mythtv in.tftpd[5278]: cannot set groups for user nobody
May 21 18:53:16 mythtv in.tftpd[5279]: cannot set groups for user nobody
May 21 18:54:16 mythtv ntpd[4838]: synchronized to LOCAL(0), stratum 13
May 21 18:54:16 mythtv ntpd[4838]: kernel time sync disabled 0041
May 21 18:54:28 mythtv in.tftpd[5280]: cannot set groups for user nobody
May 21 18:55:20 mythtv ntpd[4838]: synchronized to 218.214.129.61, stratum 2
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Sun May 21, 2006 1:49 am    Post subject: Reply with quote

Ok, I got past that problem. I needed to edit /etc/inetd.conf and replace
Code:
#tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /boot
with
Code:
tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd -s /tftpboot
Then restart inetd. I have updated the wiki accordingly.
I am getting a kernel panic now because it can't mount the root filesystem, but I'll keep looking to see if I have hammed something up.
Back to top
View user's profile Send private message
red321



Joined: 07 Mar 2004
Posts: 116
Location: UK

PostPosted: Sun May 21, 2006 6:28 am    Post subject: Reply with quote

Shows why good How-tos are hard to find Smile

I ran this on my own main system, then ran a clean install on another machine, but only as a autoupdate. This leaves /myth on the root partition if you dont allready have one.

Thats why I didnt spot the inodes gotcha.

Not sure why you are seeing a kernel panic.

If you have got that far , then I guess:

DHCP, PXE, TFTP are all working. You should be seeing a NFS access request in your syslog, unless:

1) You dont have nfs-kernel-server running
2) You are not exporting the root filesystem.
3) your default config is wrong.

Cant think of anything else.

Oh yes Ican. Did you read the "dont run knoppix-terminalserver" ever again, ever, I really mean it bit Very Happy Very Happy Very Happy

You might be running with th eoriginal vmlinuz file, rather than the new shiny one that you built with NFSroot support. The big problem her eis that as soon as you run Terminalservices it happily undoes all your good work. In fact I just di that myself while checking out one of your questions Sad

Quote:
'm a little confused about this:
Quote:
ALLOW Root access - If you dont do this, you will end up with a Read Only access to the root filesystem, and it will all go horribly wrong.
I didnt see any option to "allow root access" when running prep-ts.


the actual wording is [] secure Disable root access for clients.

That adds the word SECURE to the append options in the default pxelinux.cfg. It makes the NFSroot ro effectively. However as this is now irrelevant, as we rwrite a complete new append line, I will remove it from the wiki.

[ I was originally trying to be less intrusive, and us the treminalservices setup to configure some of the options I have now done by hand. Gave up in the end ]
Back to top
View user's profile Send private message
mgrassi99



Joined: 27 Jan 2004
Posts: 68

PostPosted: Wed Jun 14, 2006 10:47 pm    Post subject: Reply with quote

GREAT howto; I had already been playing around with TFTP and LTSP and other diskless solutions without success, and this got me over the hump. Smile

One hiccup I encountered using the NFSroot method: my kernel loaded, and the setup scripts started to execute, but I got loads of:

Code:

nfs: RPC call returned error 101
RPC: sendmsg call returned error 101


errors, and the system would hang. After a few google searches, I came upon an article that said when using an NFS root you must NOT re-run your /etc/init.d/networking script as you've already brought your net interface up by that point, and by running that you actually take your interface down briefly thus losing your root FS. I got around this by simply adding a "exit;" at the top of the NFS root's /etc/init.d/networking script, and all is well. Not sure if anyone else has seen this...

-Mike
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Fri Jun 16, 2006 11:03 pm    Post subject: Reply with quote

I had a go at getting this going again. Because of my inode problem on the /myth partition, I just put the NFS root on the root partition of the backend. That worked fine. I then ran into the problem that mgrassi99 had. Thanks for posting a solution. That worked a treat for me.

Now I'm trying to work out how to get the frontend to mount the backend's /usr directory so that I dont need a whole extra copy of it (its 1.2G which takes a fair chunk out of the root partition).
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Fri Jun 16, 2006 11:57 pm    Post subject: Reply with quote

So here's what I did:
In the nfs root: rename usr to usr2 so it will not be used. Create an empty usr directory to be used as a mount point.
In /etc/exports on the backend, add this:
Code:
/usr *(ro)
In etc/fstab in the nfsroot add this line:
Code:
10.1.1.6:/usr /usr nfs defaults,auto,noatime 0 2
Now when I netboot the frontend, I see some errors during the initial stages of the boot where /usr is not available. Then, after X starts and when the frontend would normally show up, I get the xterm asking me to enter the root password that you get when you do an install. I suspect that some of the tuner detection code that checks if a card has been added or removed is not working properly which is causing that to run.

The good news is, if I quit that xterm and start the frontend, it just works. So I guess I'm almost there if I can resolve the issue of mounting /usr soon enough.

Does anyone know what during the boot process causes the additional nfs mount points to be mounted?
Back to top
View user's profile Send private message
red321



Joined: 07 Mar 2004
Posts: 116
Location: UK

PostPosted: Thu Jun 29, 2006 1:30 pm    Post subject: Reply with quote

Greg,

Quick fix would be to edit ~/.fluxbox/apps

change out the knoppmyth-run entry (cant rememner the exact syntax)

change it to just mythfrontend

Then your login willl not be reqested, as that is due to the knoppmyth-run script detecting ( or not detecting) flags that it expects set.
Back to top
View user's profile Send private message
Greg Frost



Joined: 10 May 2004
Posts: 1888
Location: Adelaide, Australia

PostPosted: Thu Jun 29, 2006 7:40 pm    Post subject: Reply with quote

Thanks, but I just changed the startup numbers for mountall and mountnfs in /etc/rcS.d so that they were before the knoppmyth script that checks for tuners and it all worked beautifully.
Back to top
View user's profile Send private message
sinspot1



Joined: 22 Dec 2005
Posts: 198

PostPosted: Sun Jul 09, 2006 12:27 pm    Post subject: Reply with quote

I had a question...... I am setting up the disklessfe and was wondering to all of the FE have to use the same image or could I have different ones. For example that one FE is set to use the digital out and another is using the analog outs or one is using the S-VIDEO and the other is using the DVI out. You see what I mean.



Thanks
_________________
Marty

Long live Myth and Knoppmyth!!!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    knoppmyth.net Forum Index -> Usage/HowTo All times are GMT - 8 Hours
Goto page 1, 2, 3 ... 14, 15, 16  Next
Page 1 of 16

 
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


Powered by phpBB © 2001, 2005 phpBB Group