NFS local boot

Help with booting MiniMyth

Moderator: Pablo

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

NFS local boot

Post by Spulit » Tue Jan 20, 2009 1:43 pm

Hi,

Anyone here can tell me if it is possible to use an NFS local boot with MM? If so, how can I configure everything, including the rootfs and syslinux?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Tue Jan 20, 2009 2:27 pm

If you are asking "can the boot loader and kernel be local with the files from the NFS root file system installed locally as well?", then the answer is no.

If you are asking, "can the boot loader and kernel be local with the root file a remote NFS share?", then the answer is likely yes. However, I have never tried it. In the syslinux.cfg file, replace the APPEND line with the APPEND line used for NFS network boot.
That is, replace

Code: Select all

APPEND ro root=/dev/ram0 ramdisk_size=96000 initrd=rootfs
with

Code: Select all

APPEND ro root=/dev/nfs ip=dhcp nfsroot={nfs-server}:/{nfs-directory}/minimyth-{version}
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Tue Jan 20, 2009 4:28 pm

Hi Pablo,

I was asking for the second option. I was able to boot MM but it stops in the DHCP process saying:

DHCP on interface 'eth0' failed

Any idea?

Another question: the "conf" folder should be alongside the kernel file, in the local FAT32 partition?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Tue Jan 20, 2009 5:17 pm

Spulit wrote:Hi Pablo,

I was asking for the second option. I was able to boot MM but it stops in the DHCP process saying:

DHCP on interface 'eth0' failed

Any idea?
What Ethernet hardware do you have?
Another question: the "conf" folder should be alongside the kernel file, in the local FAT32 partition?
Yes.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Tue Jan 20, 2009 5:38 pm

Pablo wrote: What Ethernet hardware do you have?
I'm now testing in vmware. I must say that if I login to the system, I notice that the ethernet was configured ok and I have a valid IP address.

Here are the latest lines in /var/log/messages:

Jan 20 16:25:48 10 local0.info minimyth: starting DHCP client ...
Jan 20 16:25:48 10 local0.info udhcpc[982]: udhcpc (v1.11.3) started
Jan 20 16:25:48 10 local0.info udhcpc[982]: Sending discover...
Jan 20 16:25:48 10 local0.info udhcpc[982]: Sending select for 10.0.0.63...
Jan 20 16:25:48 10 local0.info udhcpc[982]: Lease of 10.0.0.63 obtained, lease time 3600
Jan 20 16:25:48 10 local0.err minimyth: DHCP on interface 'eth0' failed.
Jan 20 16:25:48 10 daemon.info init: no more processes left in this runlevel


Thanks

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Tue Jan 20, 2009 6:03 pm

I tried now with MM 64b8 and I didn't get that error!

Any idea on what's probably wrong in MM 63?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Tue Jan 20, 2009 6:46 pm

There was a problem with the DHCP client restart technique used to cause MM_DHCP_* variables to be used. On some systems, it would cause DHCP to hang or fail. This was fixed post 63.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Tue Jan 20, 2009 7:33 pm

Now I have a problem when starting X. It seems I don't have rights to open some devices like /dev/mem, etc. Do the NFS share must have some specific configuration? What flags should I put in /etc/exports?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Tue Jan 20, 2009 8:25 pm

When you extracted the NFS tarball, did you extract it as root? If not, then there could be problems because the tarball contains device nodes that must be created and binaries (including X) that must be installed SUID.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Tue Jan 20, 2009 10:44 pm

That's weird because I only get this error only using MM through VMWare, not with a real device...

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Wed Jan 21, 2009 1:30 am

Although this would be another topic, I notice that even with an NFS boot, MM creates all the filesystem in RAM, is that so? I was wondering if booting with NFS would avoid creating a ramdisk for the whole filesystem, therefore minimizing the use of memory, which is rather short on set-top boxes...
I'm not sure of this analysis since I'm not an expert with this kind of systems and I was wondering if it would be possible to use all the filesystem on disk (NFS mount).

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Wed Jan 21, 2009 1:59 am

Spulit wrote:Although this would be another topic, I notice that even with an NFS boot, MM creates all the filesystem in RAM, is that so? I was wondering if booting with NFS would avoid creating a ramdisk for the whole filesystem, therefore minimizing the use of memory, which is rather short on set-top boxes...
I'm not sure of this analysis since I'm not an expert with this kind of systems and I was wondering if it would be possible to use all the filesystem on disk (NFS mount).

Thanks
MiniMyth uses unionfs (a stackable unification file system) to make the root file system read-write. It does this by unifying the read-only root file system with a read-write RAM file system to create a read-write root file system.

Files from the read-only root file system that are modified by MiniMyth will be written back to the read-write RAM file system. However, files from the read-only root file system that are not modified will not be written back to the read-write RAM file system.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Thu Jan 22, 2009 2:04 pm

It seems that the error I mentioned above happens for all devices, not only for virtual devices. Somehow I misconfigured my real device and it kept working. Now I formatted it and started the installation of MM using NFS boot (with local kernel and conf) from scratch. Now I get the same error when starting X. Here are the relevant parts of Xorg.0.0.log:

(WW) xf86ReadBIOS: Failed to open /dev/mem (Permission denied)
[...]
Fatal server error:
xf86OpenConsole: Cannot open virtual console 2 (Permission denied)

(WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
(WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor

Any idea?

Thanks

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Thu Jan 22, 2009 5:44 pm

When you extracted the NFS tarball, did you extract it as root? If not, then there could be problems because the tarball contains device nodes that must be created and binaries (including X) that must be installed SUID.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit » Thu Jan 22, 2009 5:52 pm

Hi Pablo,

You are absolutely right! I untarred the package as a normal user, therefore the problem I was having! I was confused since one of the devices I have was running ok...
Now everything seems fine.
Maybe you should stress this issue on the documentation.

Thanks!

Post Reply