[mythtv-users] Questions on PXE booting a frontend
Jim Stichnoth
stichnot at gmail.com
Wed Aug 5 20:42:51 UTC 2009
On Tue, Aug 4, 2009 at 11:10 AM, Jim Stichnoth<stichnot at gmail.com> wrote:
> o Based on a post I found on the web, I learned that nash's mount
> command doesn't support NFS, so I added mount.nfs to the initrd image,
> and modified the init script in the initrd image to use it:
> /bin/mount.nfs 192.168.0.205:/storage1/frontends/mythfe2/ROOT
> /sysroot -o rw,user,nolock,exec,suid,dev
> I don't know if those are the best mount options, but nolock was
> necessary since I didn't include the lockd into the initrd image.
>
> o Based on another post
> (http://fedoraforum.org/forum/showthread.php?t=222729), I modified the
> init script to create the /dev/nfs and dev/nfsd devices:
> mknod /dev/nfs c 0 255
> mknod /dev/nfsd c 3 0
>
> o Yet another post clued me in that when I recreate the initrd image
> after unpacking and modifying it, I need to use the "-H newc" argument
> to cpio, since the kernel doesn't understand the default format. Here
> is my script that automated the initrd image editing:
> #!/bin/sh
> IMG="initrd-nfs-`uname -r`.img"
> mkinitrd -f -v --fstab=/etc/fstab.nfs --with=usb_storage "$IMG" `uname -r`
> rm -rf foo ; mkdir foo ; cd foo
> gunzip < ../"$IMG" | cpio -i
> # Add various editing commands here
> find . | cpio -o -H newc | gzip > ../"$IMG"
>
> All this lets me boot the kernel and initrd image off the memory stick
> and NFS-mount the root file system. It successfully starts all the
> init services. It starts up the X server but the system immediately
> hangs, usually with a completely blank screen, but at least once I saw
> the nvidia splash screen. The timestamp on the xorg log file shows
> that X has started, and the contents of the log file look normal.
> /etc/mtab shows that all file systems have been mounted as expected.
> The hung system doesn't respond to the keyboard and doesn't respond to
> a network ping.
Good news, I discovered the source of the hang: the infamous
NetworkManager. At the appropriate point during booting, pressing "i"
took me into interactive mode where I could choose which services to
start. Skipping NetworkManager, and allowing all the others,
eliminated the hang.
I don't know why NetworkManager hangs the system when the root file
system is NFS-mounted, especially since I can't seem to find any
documentation on how NetworkManager actually works. Maybe it tries to
disconnect and reconnect the network, which, for an NFS-mounted root,
could be like unmounting your live file system. Disabling the
NetworkManager service altogether with "chkconfig" seems just fine.
Anyway, I now have a fully functional frontend running entirely over
the network (except for loading the kernel and initrd image off the
USB flash drive). The next step is get the PXE part running.
Jim
More information about the mythtv-users
mailing list