Forum

Full Version: Boot from nfs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Recently, i have recurring issues with my SD cards. So i think the most stable solution would be to boot from a NFS share. However, i never done this but know that @mk01 is doing it from a daily basis. Can he, or someone, explain how this is setup.
http://wiki.xbian.org/NFS_Installation

(eventually I started with the wiki alone. it's more currently guide for myself what to put there, but this one pre-link to my forum post is there)
I've got nearly everything running when using NFS boot. However, one issue persists.
When XBMC is started using service xbmc start it starts, but will eventually close (after about 1 min).
When XBMC is started using su xbian -c "/usr/local/lib/xbmc/xbmc.bin" no issues occur.

The XBMC log doesn't say anything, so i guess it must be some upstart script that is causing this.

Upstart log:
Terminal

3380.51 2445.37 starting xbmc 0.67 0.66 0.60 3/130 3843
3380.52 2445.37 started xbmc-changesettings 0.67 0.66 0.60 3/129 3844
3380.56 2445.37 stopped xbmc-changesettings 0.67 0.66 0.60 3/129 3847
3380.91 2445.37 started wait-for-state xbmc-loaded 0.67 0.66 0.60 2/131 3856
3392.40 2446.15 started xbmc-loaded 0.98 0.73 0.63 4/144 3902
3392.53 2446.15 stopped wait-for-state xbmc-loaded 0.98 0.73 0.63 4/143 3905
3392.98 2446.16 started xbmc 0.98 0.73 0.63 2/141 3910
3394.97 2446.51 stopped xbian-xbmc-bridge 0.98 0.73 0.63 1/156 3941
3399.46 2450.64 stopped xbmc-loaded 0.90 0.72 0.62 2/155 3946

Seems to be caused by a failing xbian-config-xbmc. Restarted that, and now it seems to work.
Still another issue.

Everything i reboot my RPi software wise, the initramfs line in /boot/config.txt get commented.

I also noticed an error in the initramfs. It gives an error when mounting the NFS share with "no such file or directory" but it does boot from NFS. So i think the initramfs tries to mount my NFS configuration as a normal folder.
B2 is doing that if during reboot / shutdown new root= as accessible for kernel directly is. so mmc and no UUID or LABEL. also initramfs is force used if any package install / upgrade asked "reboot-required"

use /etc/deault/xbian-initramfs to control that (FORCEINITRAM=no/yes)
/etc/init/xbmc-failed-start.conf

it is started early in boot. job is stopped prematurely if there is event emitted, that xbmc is up.

otherwise xbmc-failed-start will finish with sleep and execute "failed start" operations.
Quote:use /etc/deault/xbian-initramfs to control that (FORCEINITRAM=no/yes)
Setting this to yes or no doesn't change it.
10 minutes back I was sure you will ask that.

yes, it is like soft and hard quota limit.
this parameter is soft. it means if YES it will not remove initramfs usage if manually added. but it won't add it, if does not exists (config.txt initramfs entry).

sounds a little silly now, but was making sense at the time of implementation. during-shutdown code is trying to guess if next boot can be direct via kernel. FORCEINITRAM=yes will break the process in case system decides to boot without initramfs.
Where does the actual script reside to comment the initramfs?

Also, i noticed that i created by NFS boot with a certain ip address. However, when i want to change the clients ip address it does boot. But when i want to login through SSH i see the MOTD but it never comes to the actual prompt.
/etc/xbian-initramfs/initram.switcher.sh

and Ip you mean change the kernel obtained and NFS ROOT mounted RPI during system running ? this is a BIG NO !
No, by changing the IP i mean the address reservation in the router and rebooting the RPi afterwards.

Quote:/etc/xbian-initramfs/initram.switcher.sh
Thanks!
I finally found the bug of why my install hang.
When looking at the fstab there should be a:
/run/lock
/run/shm
/run/user
/sys/kernel/debug
/sys/kernel/security

However, none of them were there. So i changed the fstab entries to:
Code:
/dev/mmcblk0p1        /boot                   xbian   rw                              0       1
#/dev/root             /home                   xbian   subvol=home/@,noatime           0       0
#/dev/root             /lib/modules            xbian   subvol=modules/@,noatime        0       0
#/dev/root             /                       xbian   noatime                         0       0
10.0.0.140:/data/raspberry/media        /       nfs     defaults 0 0
tmpfs            /run/lock                       tmpfs                  defaults,noatime,mode=0755,nosuid                  0       0
tmpfs            /run/shm                        tmpfs                defaults,noatime,mode=0755,nosuid                  0       0
tmpfs            /run/user                       tmpfs                 defaults,noatime,mode=0755,nosuid                  0       0
nodev            /sys/kernel/debug               debugfs                 defaults                  0       0
nodev            /sys/kernel/security            securityfs              defaults                  0       0
And it worked again Smile
Good find @CurlyMo, glad you got it sorted.
If your phone suddenly indicates that the memory card is failing, the first thing you should do is remove the memory card and test it in another phone. Your device system is at fault if the memory card is still useable and performing correctly. If the issue persists, there might be a problem with the phone's interaction with the memory card. sedecordle
Reference URL's