Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Boot from nfs
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Boot from nfs
22nd Dec, 2013, 09:31 AM
Post: #1
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
Boot from nfs
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.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
22nd Dec, 2013, 09:39 AM
Post: #2
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Boot from nfs
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)

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
23rd Dec, 2013, 08:47 PM
Post: #3
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
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.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
23rd Dec, 2013, 09:53 PM
Post: #4
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
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.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
23rd Dec, 2013, 10:33 PM
Post: #5
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Boot from nfs
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)

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
23rd Dec, 2013, 11:41 PM
Post: #6
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Boot from nfs
/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.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
24th Dec, 2013, 12:17 AM
Post: #7
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
Quote:use /etc/deault/xbian-initramfs to control that (FORCEINITRAM=no/yes)
Setting this to yes or no doesn't change it.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
24th Dec, 2013, 02:27 AM
Post: #8
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Boot from nfs
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.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
24th Dec, 2013, 08:19 AM
Post: #9
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
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.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
24th Dec, 2013, 09:01 AM
Post: #10
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Boot from nfs
/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 !

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
24th Dec, 2013, 09:49 AM
Post: #11
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
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!

pilight - modular domotica solution
Visit this user's website Find all posts by this user
28th Dec, 2013, 10:49 PM
Post: #12
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Boot from nfs
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

pilight - modular domotica solution
Visit this user's website Find all posts by this user
29th Dec, 2013, 04:17 AM
Post: #13
f1vefour Offline
Administrator
******
Posts: 1,342
Joined: Mar 2013
Reputation: 58
RE: Boot from nfs
Good find @CurlyMo, glad you got it sorted.

Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us.
Visit this user's website Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 09:10 PM Powered By MyBB, © 2002-2025 MyBB Group.