Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo as network booting mythtv frontend?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Sat Nov 07, 2009 4:20 am    Post subject: Gentoo as network booting mythtv frontend? Reply with quote

Anyone know if it's possible to build gentoo so that it can network boot (diskless) and run in system ram as a mythtv frontend? I think it would be awesome if portage could be utilized to manage the packages for such a system. Yes I've tried minimyth but I find its features sorely lacking and the ability to make changes to it is not easy.
Back to top
View user's profile Send private message
Zooloo
n00b
n00b


Joined: 08 Nov 2009
Posts: 1
Location: Bærum, Norway

PostPosted: Sun Nov 08, 2009 12:57 pm    Post subject: Reply with quote

I've got a diskless gentoo with Mythfrontend running in my livingroom for a few years. It's been a while since I installed it, but remember starting with this guide: http://www.gentoo.org/doc/en/diskless-howto.xml.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Fri Nov 20, 2009 6:38 am    Post subject: Reply with quote

How about a diskless ramdisk howto (i.e. without the need for nfs)?
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Mon Nov 23, 2009 3:22 am    Post subject: Reply with quote

logistiker wrote:
How about a diskless ramdisk howto (i.e. without the need for nfs)?


you can prolly do that but why? Yould have to wait for the entire image of your root fs to be downloaded over the network. Could be a couple gigs everytime you boot up. What's wrong with nfs mount? Or you could mount it from a usb thumb drive. But I don't think you want to copy your entire fs to ram everytime you boot up.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Mon Nov 23, 2009 4:08 am    Post subject: Reply with quote

BonesToo wrote:
logistiker wrote:
How about a diskless ramdisk howto (i.e. without the need for nfs)?


you can prolly do that but why? Yould have to wait for the entire image of your root fs to be downloaded over the network. Could be a couple gigs everytime you boot up. What's wrong with nfs mount? Or you could mount it from a usb thumb drive. But I don't think you want to copy your entire fs to ram everytime you boot up.


I've decided on the nfs direction. I have it set up now and almost fully configured. It would help if the diskless documentation on gentoo was updated because it doesn't work and it suggested to share the file structure with the server which is crazy. You really need to set up a chroot environment with an entire new file structure for a new system because of hardware differences. It's also disappointing that there are no good nfs4 docs for gentoo. The best thing I could find was: http://www.brennan.id.au/19-Network_File_System.html

Another thing I've noticed about a rootfs nfs machine is try not to emerge much on it -- do it on the server with chroot. At best it segfaults a lot of the time and at worst, it freezes the whole machine requiring a reboot.

In regards to rootfs on ram, minimyth does it and you'd be surprised how fast it loads. The rootfs is only 86M. I have no idea how he gets it that small.
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Mon Nov 23, 2009 4:55 am    Post subject: Reply with quote

I have no problem emerging packages on my diskless system (def need a chroot env). Are you using a swap partition across nfs? I don't run any swap, but I have 2 gigs of ram so I actually mount /tmp and /var/tmp (where portage works) as tmpfs in ram. Compiling is sooo fast. The only package I've had trouble with is gcc, I don't have enough ram to compile it, so I unmount /var/tmp and compile on the nfs mount, slow as hell, but it works.

I've never looked at minimyth, so not sure about it. Is this a livecd you boot? Loading a rootfs image from cd or usb or something local is def an option, but a network load is a lot slower, well depending on what kind of network you are running across. But a gentoo os isn't 86M either ;)

good luck!
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Mon Nov 23, 2009 5:06 am    Post subject: Reply with quote

BonesToo wrote:
I have no problem emerging packages on my diskless system (def need a chroot env). Are you using a swap partition across nfs? I don't run any swap, but I have 2 gigs of ram so I actually mount /tmp and /var/tmp (where portage works) as tmpfs in ram. Compiling is sooo fast. The only package I've had trouble with is gcc, I don't have enough ram to compile it, so I unmount /var/tmp and compile on the nfs mount, slow as hell, but it works.

I've never looked at minimyth, so not sure about it. Is this a livecd you boot? Loading a rootfs image from cd or usb or something local is def an option, but a network load is a lot slower, well depending on what kind of network you are running across. But a gentoo os isn't 86M either ;)

good luck!



I don't have any swap. How do you mount /tmp and /var/tmp on the client as tmpfs in ram on the client? May be this is why compiling on my client is so slow.

I was using network boot with gpxe serving the rootfs and kernel over http. It was quite fast. I'm moving away from minimyth though because of stability issues. It locks up quite a bit when running the ram version of it.
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Mon Nov 23, 2009 5:08 am    Post subject: Reply with quote

logistiker wrote:

I don't have any swap. How do you mount /tmp and /var/tmp on the client as tmpfs in ram on the client? May be this is why compiling on my client is so slow.


Add these two lines to your fstab
Code:
tmpfsTmp        /tmp    tmpfs   mode=1777       0 0
tmpfsVarTmp     /var/tmp        tmpfs   mode=1777       0 0


Will supercharger your compiling.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Mon Nov 23, 2009 5:20 am    Post subject: Reply with quote

BonesToo wrote:
logistiker wrote:

I don't have any swap. How do you mount /tmp and /var/tmp on the client as tmpfs in ram on the client? May be this is why compiling on my client is so slow.


Add these two lines to your fstab
Code:
tmpfsTmp        /tmp    tmpfs   mode=1777       0 0
tmpfsVarTmp     /var/tmp        tmpfs   mode=1777       0 0


Will supercharger your compiling.


You got that right! That made all the difference. The configure used to be extremely slow and would lock up or cause the client to lock up. Thanks!
Back to top
View user's profile Send private message
Floppe
n00b
n00b


Joined: 27 Feb 2003
Posts: 50
Location: Finland

PostPosted: Mon Nov 23, 2009 7:11 am    Post subject: Reply with quote

I've also been running a diskless myth for some years now. But I'm only mounting /var/tmp/portage as tmpfs and it works great. Also can compile gcc with 2 gigs of ram in the box.


my fstab line
Code:
none            /var/tmp/portage        tmpfs           size=1000M,nr_inodes=1M 0 0

// Floppe
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Wed Nov 25, 2009 6:42 am    Post subject: Reply with quote

BonesToo wrote:
logistiker wrote:

I don't have any swap. How do you mount /tmp and /var/tmp on the client as tmpfs in ram on the client? May be this is why compiling on my client is so slow.


Add these two lines to your fstab
Code:
tmpfsTmp        /tmp    tmpfs   mode=1777       0 0
tmpfsVarTmp     /var/tmp        tmpfs   mode=1777       0 0


Will supercharger your compiling.


Ok this is mixed. Compiling is much faster but I periodically get segmentation faults which crashes emerge on my diskless frontend. Sometimes the fault is so bad it crashes the kernel forcing reboot. Any idea what might be going on with this?
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Wed Nov 25, 2009 3:10 pm    Post subject: Reply with quote

Never mind. I found the problem. Apparently clocking my ddr1066 ocz modules to run at 1066 is possibly a stretch or I need to tweak it some more. I set the clock auto (800) and I haven't had any crashes since.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Wed Nov 25, 2009 5:02 pm    Post subject: Reply with quote

After searching around, I found that this is a much better explanation on how to gpxe boot using nfs root:

http://www.fit-pc.com/wiki/index.php?title=How_to_use_Etherboot

One caveat that I've noticed on diskless install instructions for gentoo is that they forget to mention to remove "network" from all runlevels. Apparently network mucks with the routes and does not preserve the route properly when the client booted off the network. If you don't disable this, the default gateway won't be set even if eth0 is set to noop and net.eth0 is removed from /etc/init.d.
Back to top
View user's profile Send private message
BonesToo
Apprentice
Apprentice


Joined: 19 Aug 2003
Posts: 153

PostPosted: Wed Nov 25, 2009 7:58 pm    Post subject: Reply with quote

logistiker wrote:
One caveat that I've noticed on diskless install instructions for gentoo is that they forget to mention to remove "network" from all runlevels. Apparently network mucks with the routes and does not preserve the route properly when the client booted off the network. If you don't disable this, the default gateway won't be set even if eth0 is set to noop and net.eth0 is removed from /etc/init.d.


Cool, good to hear you figured it out.

I just set config_eth0=( "noop" ) in /etc/conf.d/net
and yea I remove net.eth0 from the runlevel using rc-update. Boom it works. Don't really have to delete the init.d script, but that works too.

Side note: if you want wake-on-lan to work set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc
That will keep your network card powered during shutdown.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
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