Mailing List Archive

Re: SOLVED: Questions on PXE booting a frontend
On Sat, Aug 1, 2009 at 6:04 PM, Jim Stichnoth <stichnot@gmail.com> wrote:

> I have a Zotac IONITX frontend that I'm interested in making
> completely diskless and PXE booting, and I have a bunch of questions.
> Currently it boots off a 4GB USB flash drive. It is running MythDora
> 10.21, using the kernel 2.6.27.9-159.fc10.i686. I have rsync'd the
> root file system to the backend machine, and that directory is
> NFS-exported. I understand that I will need to set up dhcp, tftp, and
> syslinux (i.e. pxelinux.0) on the server.
>
> 1. Should I expect to have to recompile the kernel to allow an NFS
> root file system? What config options should I look for?
>
> 2. Can the DHCP service in a home router and a Linux DHCP/PXE server
> coexist on the same network? I would prefer the home router to handle
> most DHCP requests and the Linux server to handle just the PXE-related
> requests for this frontend, so that e.g. my wife doesn't lose DHCP for
> her laptop computer when the Linux server is down.
>
> 3. How reliably does NFS work as a root file system, if the NFS server
> goes down and up? I had trouble using NFS to serve up
> videos/posters/pictures until I started using autofs.
>
> 4. Related to question #1, I tried setting up grub to boot off the
> flash drive but NFS-mount the root file system, to see if my kernel
> was capable. It appeared to do lots of things and boot up partially,
> until it reported that it couldn't mount /dev/root. Am I doing
> anything overtly wrong, or is it a kernel problem? I modified the
> frontend's /etc/fstab on the NFS server to mount the NFS version of
> the root file system. I modified grub.conf to look like the
> following, where the first boot option was already there and the
> second one was added:
>
> default=1
> timeout=0
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title MythDora (2.6.27.9-159.fc10.i686)
> root (hd0,0)
> kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro
> root=UUID=bb5aa553-5a5a-4c2c-8077-b6dcb9749223 rhgb quiet
> initrd /initrd-2.6.27.9-159.fc10.i686.img
>
> title MythDora with NFS root
> root (hd0,0)
> kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=/dev/nfs
> nfsroot=192.168.0.205:/storage1/frontends/mythfe2/ROOT
> initrd /initrd-2.6.27.9-159.fc10.i686.img
>
> I added this line to /etc/exports on the NFS server:
> /storage1/frontends/mythfe2/ROOT
> 192.168.0.0/255.255.255.0(rw,no_root_squash,sync)<http://192.168.0.0/255.255.255.0%28rw,no_root_squash,sync%29>
> and verified that I could mount it on the frontend.
>
> So you can see that I'm trying to load the kernel and the initrd image
> as before from the (hd0,0) partition of the flash drive but then use
> the NFS root file system.
>
> Any advice on this? Thanks,
>
> Jim
>

Thanks to everyone who helped me on this. I now have both Zotac IONITX
machines doing PXE boots from the master backend, with no attached storage
whatsoever. They are running MythDora 10.21 which is based on FC10. Here
is a summary for the record.

1. No kernel or kernel module recompilation was needed.

2. A lot of people reported success with two DHCP servers on the same
network, as long as care is taken to avoid conflicts. I set up a DHCP
server on the master backend to assign static IPs to the two frontends, with
PXE enabled, and nothing else. So far, so good.

3. I'm too busy basking in the success of PXE booting and NFS root mounting
to do torture testing on NFS fault tolerance...

4. The mkinitrd man page is 5 years out of date. The correct grub kernel
line for NFS-mounting root (without involving PXE) in my example above is
simply:
kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=192.168.0.205:
/storage1/frontends/mythfe2/ROOT
Also be sure to run mkinitrd against an /etc/fstab that lists an NFS root
file system type.

Other tips:

o Disable the NetworkManager service, otherwise the system will probably
hang during bootup.

o My files in the pxelinux.cfg directory look like this:
DEFAULT linux
LABEL linux
KERNEL vmlinuz-2.6.27.9-159.fc10.i686
APPEND ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT
initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img
Notice the addition of initrd=... to the kernel arguments. I have a
separate file for each frontend because each NFS root path is different.

o I noticed that mkinitrd and the associated nash program support a "dhcp"
root file system type, which seems basically the same as "nfs" except that
the root-path is taken from the DHCP server's response. It would probably
be better to add the root paths to /etc/dhcpd.conf, and then only have a
single "default" file in the pxelinux.cfg directory.

o The frontend now idles at 18 watts according to the Kill-a-Watt device.
I'm thinking of replacing the 2 1GB SDRAM modules with a single 2GB module,
which would leave more open space for passive cooling, and perhaps even drop
the power usage by a watt...

Jim
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
Thanks to everyone who helped me on this.  I now have both Zotac IONITX
machines doing PXE boots from the master backend, with no attached storage
whatsoever.  They are running MythDora 10.21 which is based on FC10.  Here
is a summary for the record.

1. No kernel or kernel module recompilation was needed.

2. A lot of people reported success with two DHCP servers on the same
network, as long as care is taken to avoid conflicts.  I set up a DHCP
server on the master backend to assign static IPs to the two frontends, with
PXE enabled, and nothing else.  So far, so good.

3. I'm too busy basking in the success of PXE booting and NFS root mounting
to do torture testing on NFS fault tolerance...

4. The mkinitrd man page is 5 years out of date.  The correct grub kernel
line for NFS-mounting root (without involving PXE) in my example above is
simply:
    kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro
root=192.168.0.205:/storage1/frontends/mythfe2/ROOT
Also be sure to run mkinitrd against an /etc/fstab that lists an NFS root
file system type.

Other tips:

o Disable the NetworkManager service, otherwise the system will probably
hang during bootup.

o My files in the pxelinux.cfg directory look like this:
    DEFAULT linux
    LABEL linux
    KERNEL vmlinuz-2.6.27.9-159.fc10.i686
    APPEND ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT
initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img
Notice the addition of initrd=... to the kernel arguments.  I have a
separate file for each frontend because each NFS root path is different.

o I noticed that mkinitrd and the associated nash program support a "dhcp"
root file system type, which seems basically the same as "nfs" except that
the root-path is taken from the DHCP server's response.  It would probably
be better to add the root paths to /etc/dhcpd.conf, and then only have a
single "default" file in the pxelinux.cfg directory.

o The frontend now idles at 18 watts according to the Kill-a-Watt device. 
I'm thinking of replacing the 2 1GB SDRAM modules with a single 2GB module,
which would leave more open space for passive cooling, and perhaps even drop
the power usage by a watt...

Jim

---------------

Jim,

I am using PXElinux with a Gentoo based system. I originally tried to get
PXEGrub to work but it failed for me. Instead of tracking down the issue I
switched to a method that I knew worked from others experience.

If you ever figure out how to get suspend to work with wake on USB, post to
the list.
I got suspend working, but as soon as I enable the USB ports, the machine
wakes automatically.
If I disable them again the machine stays in suspend but I have to hit the
power button to resume.

Enabling USB selective suspend/resume and wakeup in the kernel makes things
worse. The machine will only suspend to ram once per boot, even with USB
wakeup off.
I'm using a custom built 2.6.30, if the prebuilt 2.7.27 you have works with
wake on usb, I would like to get a copy of the kernel config to try and find
out why.

Marc

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
On Thu, Aug 6, 2009 at 3:28 AM, Marc Tousignant<drayson@net1plus.com> wrote:
> If you ever figure out how to get suspend to work with wake on USB, post to
> the list.

Unfortunately, I'm pretty sure both of my boards are the earlier
version that doesn't support wake-on-USB, so I don't think I have much
hope.

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
On Aug 6, 2009, at 4:35 AM, Jim Stichnoth wrote:

> Thanks to everyone who helped me on this. I now have both Zotac
> IONITX machines doing PXE boots from the master backend, with no
> attached storage whatsoever. They are running MythDora 10.21 which
> is based on FC10. Here is a summary for the record.

As long as we're putting things on the record... Only the dist tag in
packages is fc10, for historical reasons mostly revolving around rpm's
version comparison scheme. The distro itself is just Fedora 10, or F10
for short, no C in there, it got dropped as of Fedora 7, over two
years ago. :)


> o The frontend now idles at 18 watts according to the Kill-a-Watt
> device. I'm thinking of replacing the 2 1GB SDRAM modules with a
> single 2GB module, which would leave more open space for passive
> cooling, and perhaps even drop the power usage by a watt...

I wouldn't do it. At least with my Dell Studio Hybrid, video playback
got much smoother once I added a second stick of memory, so that it
was running in dual-channel mode. Remember that the system memory is
shared with the graphics controller here, so decreasing your memory
bandwidth could have a negative impact on video performance.

In related fun... I bought a matching set of 2G sticks when I got my
own zotac, with the plan being to put them in place of the 2x1G sticks
in my workstation, which also takes DDR2-800 memory, pushing it out to
8G total. The zotac board wouldn't boot with the 1G sticks, so its
currently got a pair of 2G sticks in it. Suckage of a low-end-ish
bios, the system only reports ~3.3G usable, never mind the fact that
4GB for a frontend box is gross overkill... Oh well. Memory is cheap.
Told the bios to just go ahead and give the video controller 512M.

--
Jarod Wilson
jarod@wilsonet.com



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
Jarod Wilson wrote:

>In related fun... I bought a matching set of 2G sticks when I got my
>own zotac, with the plan being to put them in place of the 2x1G
>sticks in my workstation, which also takes DDR2-800 memory, pushing
>it out to 8G total. The zotac board wouldn't boot with the 1G
>sticks, so its currently got a pair of 2G sticks in it. Suckage of a
>low-end-ish bios, the system only reports ~3.3G usable,

It's not the BIOS, it'll be a '32bit' chipset. 4GB is the total
addressable space with 32 address bits, and the chipset needs various
bits of space for IO and stuff - that's where your missing 0.7GB of
memory goes. Mind you, over half a gig for memory mapped IO does seem
a bit excessive ! There are quite a few machines that will physically
accept 4G of RAM, but only allow you to use "3 and a bit" of it.

Still, I bet 65536 bytes (64k, 2^16) probably seemed unfillable at one time ;-)

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
On Aug 6, 2009, at 6:28 AM, Marc Tousignant wrote:

> If you ever figure out how to get suspend to work with wake on USB,
> post to
> the list. I got suspend working, but as soon as I enable the USB
> ports, the machine wakes automatically. If I disable them again the
> machine stays in suspend but I have to hit the power button to resume.

I might finally set up suspend and resume on my own zotac frontend
box, just for giggles. However... I have a cheap trick to work around
any problems. The Antec Veris Premiere in my frontend case is actually
wired up to the power switch header on the board, so the power button
on my remote can even power the machine on when its completely off, no
need for usb tricks... :)

> Enabling USB selective suspend/resume and wakeup in the kernel makes
> things
> worse. The machine will only suspend to ram once per boot, even with
> USB
> wakeup off. I'm using a custom built 2.6.30, if the prebuilt 2.7.27
> you have works with wake on usb, I would like to get a copy of the
> kernel config to try and find
> out why.

The config file is included in the Fedora kernel packages themselves,
so simply unpacking the corresponding kernel rpm would get you what
you're after. Of course, that's not the most straight-forward or
efficient thing to do if you're not running Fedora, but its doable
(rpm2cpio is your friend)... Can also be obtained from Fedora's source
control system, though it would require some work to get to the right
version and generate the config file... Or someone else could just
post it somewhere.

--
Jarod Wilson
jarod@wilsonet.com



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
On Aug 6, 2009, at 10:40 AM, Simon Hobson wrote:

> Jarod Wilson wrote:
>
>> In related fun... I bought a matching set of 2G sticks when I got
>> my own zotac, with the plan being to put them in place of the 2x1G
>> sticks in my workstation, which also takes DDR2-800 memory, pushing
>> it out to 8G total. The zotac board wouldn't boot with the 1G
>> sticks, so its currently got a pair of 2G sticks in it. Suckage of
>> a low-end-ish bios, the system only reports ~3.3G usable,
>
> It's not the BIOS, it'll be a '32bit' chipset.

Ah, sorry, cheapo chipset then. Good to know.

> 4GB is the total addressable space with 32 address bits, and the
> chipset needs various bits of space for IO and stuff - that's where
> your missing 0.7GB of memory goes. Mind you, over half a gig for
> memory mapped IO does seem a bit excessive ! There are quite a few
> machines that will physically accept 4G of RAM, but only allow you
> to use "3 and a bit" of it.

Yup, I have three such systems now with 4G physically in them, where
available memory ranges from ~3.2 to 3.5G.

--
Jarod Wilson
jarod@wilsonet.com



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
Jarod Wilson wrote:
On Aug 6, 2009, at 10:40 AM, Simon Hobson wrote:

Yup, I have three such systems now with 4G physically in them, where available memory ranges from ~3.2 to 3.5G.


And with PAE enabled, you can access up to 64GB on a 32bit system:

http://en.wikipedia.org/wiki/Physical_Address_Extension"]http://en.wikipedia.org/wiki/Physical_Address_Extension

Doug
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
On Aug 6, 2009, at 11:02 AM, Doug Lytle wrote:

> Jarod Wilson wrote:
>>
>> On Aug 6, 2009, at 10:40 AM, Simon Hobson wrote:
>>
>> Yup, I have three such systems now with 4G physically in them,
>> where available memory ranges from ~3.2 to 3.5G.
>>
>
> And with PAE enabled, you can access up to 64GB on a 32bit system:
>
> http://en.wikipedia.org/wiki/Physical_Address_Extension

Yeah, um, that has nothing to do with anything here. All the systems
in question here have 64-bit processors, and are running 64-bit kernels.

--
Jarod Wilson
jarod@wilsonet.com



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: SOLVED: Questions on PXE booting a frontend [ In reply to ]
A couple of clarifications:

On Thu, Aug 6, 2009 at 1:35 AM, Jim Stichnoth<stichnot@gmail.com> wrote:
> Other tips:
>
> o My files in the pxelinux.cfg directory look like this:
>     DEFAULT linux
>     LABEL linux
>     KERNEL vmlinuz-2.6.27.9-159.fc10.i686
>     APPEND ro root=192.168.0.205:/storage1/frontends/mythfe2/ROOT
> initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img
> Notice the addition of initrd=... to the kernel arguments.  I have a
> separate file for each frontend because each NFS root path is different.
>
> o I noticed that mkinitrd and the associated nash program support a "dhcp"
> root file system type, which seems basically the same as "nfs" except that
> the root-path is taken from the DHCP server's response.  It would probably
> be better to add the root paths to /etc/dhcpd.conf, and then only have a
> single "default" file in the pxelinux.cfg directory.

I like the "--root=dhcp" root file system option to mkinitrd much
better. However, I also have to add an option to explicitly include
the network hardware module, which for my IONITX is
"--with=forcedeth". Then there is just one file, "default", in the
pxelinux.cfg directory:
DEFAULT linux
LABEL linux
KERNEL vmlinuz-2.6.27.9-159.fc10.i686
APPEND ro initrd=initrd-nfs-2.6.27.9-159.fc10.i686.img
And the root path gets moved to /etc/dhcpd.conf:
allow booting;
allow bootp;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.1;
option routers 192.168.0.1;
subnet 192.168.0.0 netmask 255.255.255.0 { }
group {
next-server 192.168.0.205;
filename "pxelinux.0";
host mythfe1 {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.0.206;
option root-path
"192.168.0.205:/storage1/frontends/mythfe1/ROOT";
}
host mythfe2 {
hardware ethernet yy:yy:yy:yy:yy:yy
fixed-address 192.168.0.207;
option root-path
"192.168.0.205:/storage1/frontends/mythfe2/ROOT";
}
}

> o The frontend now idles at 18 watts according to the Kill-a-Watt device.
> I'm thinking of replacing the 2 1GB SDRAM modules with a single 2GB module,
> which would leave more open space for passive cooling, and perhaps even drop
> the power usage by a watt...

It occurred to me to test this by pulling one of the SDRAM modules.
With 1 GB of memory, the system idles at 15-16 watts! Video playback
was still completely smooth, except that I had some troubles with OSD
Fade on 720p and higher, so I disabled fading. (In the JYA VDPAU 0.21
backport code I'm running, it's well-known that the OSD code is
inefficient since it doesn't yet use VDPAU.) So far everything is
running within the 1GB, and there is no swap space defined.

Also, to answer one of the questions in my original post. I did some
mild NFS torture testing to see what would happen to the frontend,
with its NFS-mounted root file system, when the NFS server goes down
and up. I tried stopping and starting the NFS service, as well as
rebooting the NFS server. In both cases, commands executed on the
frontend tended to freeze, but they would resume within a few seconds
of the NFS service coming back. No kernel panics or permanent freezes
or anything. I don't know if my NFS setup has any special
configuration (for example, I'm using automount for the non-root NFS
file systems), but I'm very happy with the result.

Jim
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users