Page 1 of 2

NFS local boot

Posted: Tue Jan 20, 2009 1:43 pm
by Spulit
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

Posted: Tue Jan 20, 2009 2:27 pm
by Pablo
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}

Posted: Tue Jan 20, 2009 4:28 pm
by Spulit
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

Posted: Tue Jan 20, 2009 5:17 pm
by Pablo
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.

Posted: Tue Jan 20, 2009 5:38 pm
by Spulit
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

Posted: Tue Jan 20, 2009 6:03 pm
by Spulit
I tried now with MM 64b8 and I didn't get that error!

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

Thanks

Posted: Tue Jan 20, 2009 6:46 pm
by Pablo
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.

Posted: Tue Jan 20, 2009 7:33 pm
by Spulit
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

Posted: Tue Jan 20, 2009 8:25 pm
by Pablo
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.

Posted: Tue Jan 20, 2009 10:44 pm
by Spulit
That's weird because I only get this error only using MM through VMWare, not with a real device...

Posted: Wed Jan 21, 2009 1:30 am
by Spulit
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

Posted: Wed Jan 21, 2009 1:59 am
by Pablo
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.

Posted: Thu Jan 22, 2009 2:04 pm
by Spulit
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

Posted: Thu Jan 22, 2009 5:44 pm
by Pablo
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.

Posted: Thu Jan 22, 2009 5:52 pm
by Spulit
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!