ArchARM cannot boot to NFS root

This forum is for discussion about general software issues.

ArchARM cannot boot to NFS root

Postby keithspg » Sun Mar 26, 2017 3:11 pm

I am back fighting this problem again. I followed my previous steps from here:
https://archlinuxarm.org/forum/viewtopic.php?f=59&t=8512

But it will not boot any more. This is running a new kernel
Code: Select all
Linux alarm 4.9.17-1-ARCH #1 SMP Sat Mar 25 01:30:29 UTC 2017 armv6l GNU/Linux


I have updated and adjusted the root filesystem and used rsync to copy it to my NAS. The previous installation with a 3.x kernel boots off the NAS with this cmdline.txt

Code: Select all
root=/dev/nfs nfsroot=192.168.2.198:/mnt/first_NAS/pi_root/pi_nfs rw ip=dhcp rootfstype=nfs console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N ipv6.disable=1 dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop


The new installation in a new folder will not boot. The NAS issues no warnings and the DHCP server does not show that it even grabs an IP address. I do not have a hdmi cable here so I cannot yet see what it is complaining about on std out (I'll get it on Monday), but I thought I'd ask here if there is something simple with the new kernels I am missing. I did move the eth0, eth0-dhcp and eth0-static files from /etc/netctl/ which I found I needed to do with the previous kernel in 2015. I've googled and searched and cannot seem to find anything relevant.

KeithSPG
Last edited by keithspg on Sun Apr 09, 2017 9:53 pm, edited 1 time in total.
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: NFS root problems

Postby keithspg » Mon Apr 03, 2017 12:33 am

Still struggling with this. It is strange because a 2014 image boots fine with this method without issue. From a bit of googling it appears that I may need an initramfs with the nfs module added to it. Is that the case? It is a vanilla 2014 arch image that runs happily from NFS. The 2017 kernel appear to not have the nfs module compiled in. Do I read this correctly?

The error on boot is:
Code: Select all
Warning: /lib/modules/4,9,17-1-ARCH/modules.devname not found - ignoring
starting version 232
:: running hook (udev)
:: triggering uevents
Waiting 10 seconds for device /dev/nfs ...
ERROR: device '/dev/nfs' not found. Skipping fsck
:: mounting '/dev/nfs' on real root
mount: wrong fs type, bad option, bad superblock on /dev/nfs, ...
You are now being dropped to an emergency shell.
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: NFS root problems

Postby keithspg » Mon Apr 03, 2017 1:27 am

ok, so it appears that somehow, sometime the net hook was removed form the base arch linux kernel for the RPi. I never had to do this before, but I added the mkinitcpio-nfs-util package it created a initramfs-linux.img and corrupted my /boot/cmdline.txt (it became some binary file somehow). I recreated the cmdline.txt file and can boot into the image on the SD card. then I tried to boot it with a root NFS. Current cmdline.txt:
Code: Select all
#root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
root=/dev/nfs nfsroot=192.168.2.198:/mnt/first_NAS/pi_root/rune_pi_nfs_2017 rw ip=dhcp rootfstype=nfs console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N ipv6.disable=1 dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop


If I try to boot with nfs root, I get a new error.it says:
Code: Select all
NFS-Mount: 192.168.2.198:/mnt/first_NAS/pi_root/rune_pi_nfs_2017
waiting 10 seconds for device /dev/nfs ...
: running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own, Good luck.


I checked and the nfs root indeed does have a /sbin/init, but the nfs root is being mounted at /new_root. Also, I am able to mount an NFS share to the image after it has booted from the partition on the SD card, so the basic nfs package is loaded on the image.

All the howtos are years old and it appears that there has been a change in the meantime.
Last edited by keithspg on Sun Apr 09, 2017 9:17 pm, edited 1 time in total.
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: NFS root problems

Postby keithspg » Fri Apr 07, 2017 12:41 am

Am I the only one trying this?

So, the error is still:
Code: Select all
Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.
[rootfs ]#df
Filesystem                           1K-blocks       Used  Available Use% Mounted on
dev                                     237328          0     237328   0% /dev
run                                     244040          0     244040  0% /run
192.168.2.198:/mnt/fisrt_NAS/pi_root/  3744921216  2327657216 38% /new_root
[rootfs ]#
I have a prompt and a 'df' shows that i have an nfs mount on /new_root with my filesystem on it. It is just not at / where it belongs.
my /etc/initcpio.cponf HOOKS line is:
Code: Select all
HOOKS="base udev autodetect modconf block filesystems keyboard fsck net"
nothing else is set in the conf file.

My cmdline.txt is:
Code: Select all
root=/dev/nfs nfsroot=192.168.2.198:/mnt/first_NAS/pi_root/rune_pi_nfs_2017 rw ip=dhcp rootfstype=nfs console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N ipv6.disable=1 dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
which worked on the 2014 kernel. How do I get it to mount the root filesystem where it belongs?

Keith
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: NFS root problems

Postby keithspg » Sat Apr 08, 2017 3:09 am

after a lot of googling, I decided to try removing fsck from the hooks. Made a new inItramfs and tried to boot. It did not work I still cannot boot this current 2017 image with an nfs root.
I guessed at removing the fsck as it appears that, during boot, that the nfs share is mounted at /new_root to be checked and it appears that this is what happens normally when it is booting. It is being mounted at /new_root but it is going no farther on booting. I am out of ideas. Please, anyone with an idea let me know.

I have not been able to boot with an nfs root on any Arch since mkinitcpio was added to the system (or so it appears to me). The previous install that will use the nfs root is from 2013 or so and does not have /etc/mkinitcpio.conf

Keith
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: ArchARM cannot boot to NFS root

Postby daudaudaudau » Thu Apr 20, 2017 7:04 pm

I have the same problem and am still trying to solve this.
At the moment I look into two directions. Either nfs mounting capability is no longer working in mkinitcpio or fsck.nfs does not exist or does not return the expected value.
daudaudaudau
 
Posts: 4
Joined: Thu Apr 20, 2017 7:01 pm

Re: ArchARM cannot boot to NFS root

Postby keithspg » Fri Apr 21, 2017 1:41 am

I read through a bunch of tangential threads on this. My understanding is that if you remove the fsck hook from /etc/initcpio.conf it will not fsck the volume at boot time and should boot directly. I removed the fsck hook then made a new initramfs and it booted exactly the same with or without the fsck hook. It mounts the root filesystem at /new_root then errors out. I'd like to get to the bottom of this.

Keith
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: ArchARM cannot boot to NFS root

Postby daudaudaudau » Sun Apr 23, 2017 12:54 pm

I went with a workaround for now, because I cannot solve the problem. I downgraded to linux-raspberrypi-4.4.49-1 and linux-raspberrypi-headers-4.4.49-1. All other packages remained up-to-date. I used http://tardis.tiny-vps.com/aarm/repos/2 ... arch/$repo for this (see viewtopic.php?f=30&t=9542).

Finally after a
Code: Select all
root@host / # mkinitcpio -k 4.4.49-1-ARCH -g /boot/initramfs-linux.img                                                                [130]
==> Starting build: 4.4.49-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [net]
  -> Running build hook: [fsck]
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful


I could successfully use nfsroot again.
daudaudaudau
 
Posts: 4
Joined: Thu Apr 20, 2017 7:01 pm

Re: ArchARM cannot boot to NFS root

Postby keithspg » Sun Apr 23, 2017 8:20 pm

A couple questions:
How did you determine that 4.4.49 -1 was the last functional kernel?
Has the bug been reported so that it can be fixed?
keithspg
 
Posts: 19
Joined: Mon Feb 23, 2015 4:14 pm

Re: ArchARM cannot boot to NFS root

Postby daudaudaudau » Sun Apr 23, 2017 10:00 pm

4.4.49 -1 is the last version of major release 4.4.x. After that arch arm switched to major release 4.9.x. So I took an educated guess, that the change from 4.4 to 4.9 might have something to do with the nfsroot problem. I did not actually confirm that.

I do not know if the bug has been reported. I did not report it.

I guess there are now two general possibilities for the actual cause:
(a) current mkinitcpio is not compatible with the new 4.9.x kernel regarding nfsroot functionality, because something changed from 4.4 to 4.9.
(b) the new kernel is not compiled in a way that it supports nfsroot as before, while it should.
To know which of the two is correct is really beyond my skills, so I downgraded for now.

I think its very strange that there are only so few people having trouble using nfsroot with current arch arm. The problem should exist for two months already and since 22nd Feb 2017. That may indicate that something else is involved and causing the problem. Or people are slow to upgrade ....
daudaudaudau
 
Posts: 4
Joined: Thu Apr 20, 2017 7:01 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests