Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2019 15:00:45 +0100
From:      Manuel =?iso-8859-15?Q?St=FChn?= <freebsdnewbie@freenet.de>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.cn85.dnsmgr.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: [BBB] nanobsd boot stuck
Message-ID:  <20190102140045.GA57656@freebsd-t450.fritz.box>
In-Reply-To: <201901012047.x01KlQVj070558@pdx.rh.CN85.dnsmgr.net>
References:  <20190101104319.GA89465@freebsd-t450.fritz.box> <201901012047.x01KlQVj070558@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 01, 2019 at 12:47:26PM -0800, Rodney W. Grimes wrote:
>> Hi,
>> a freshly built nanobsd RELEASE-12.0-p1 for Beaglebone Black does not
>> boot further than the line
>> "Trying to mount root from ufs:/dev/mmcsd0s2a [ro]"
>>
>> I've tried to track this further down and the findings are
>>
>>
>> 1. booting into single user mode works. When I boot into single user
>> mode and exit from there, the BBB continues its boot into multiuser
>> without any further problems. I'm able to login and have all my programs
>> working.
>>
>> 2. setting "set -x" in /etc/rc to extend verbosity. After setting, i can
>> see that the boot stops at line 62 of rc which says:
>>
>> dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
>
>Hum, is /dev not getting mounted for some reason
>causing an issue here.
>Right before this line try adding:
>#Lets see what file systems are here now
>/bin/df
>#Lets see if we have a /dev/null to use
>/bin/ls -lag /dev/null
>#Lets see what this command returns
>/sbin/sysctl -n vfs.nfs.diskless_valid
>>
>> I altered this line to
>>
>> dlv=`/bin/echo "0"`
>Uh, ah, I see it, this is NOT what happens when you run:
>dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
>set | grep dlv
>dlv=''
>To get past try:
>dlv=''
>>
>> but it still stops at that line. Using the builtin sh-echo instead of
>> the binary one ( dlv=`echo "0"` ) the boot continues until:
>
>This is starting to sound like it is having issues accessing
>the root device, like your sd card is toast.
>>
>> sh /etc/rc.initdiskless
>>
>Why did it wonder down the diskless path, you specifically
>set dlv.. oh gone back and editied.. I see it, dlv=0, not same as dlv='';.
>dlv gets null of vfs.nfs.dikless_valid does not exist as an oid:
># /sbin/sysctl -n vfs.nfs.diskless_valid
>sysctl: unknown oid 'vfs.nfs.diskless_valid'
>not 0 as you forced.

hmm, on all my machines (amd64 and armv7, 12.0-p1 and 11.2-STABLE) there 
exists an oid named vfs.nfs.diskless_valid:

# sysctl -n vfs.nfs.diskless_valid
0

That was the reason why i've set dlv to 0 in the first place.

>> After commenting this whole "diskless" section out, the boot continues
>> by sourcing rc.subr and stops in the function load_rc_config() executing
>> this line:
>
>>
>> [ -r /etc/defaults/rc.conf ]
>>
>> 3. using different SD-Cards containing the nanobsd image makes no
>> difference.  All cards show same behavior described above.
>
>sd card socket, bad sd code in the kernel image your using?

I've managed to organize another Beaglebone Black board, and on this one 
the image does boot without issues. 
It seems that the beaglebone i was developing on the whole time is 
defect somehow!

>> 4. regular FreeBSD Image (non-nanobsd) does boot correctly.
>>
>> I do not have a clue how to further debug this. Since the
>> single-user-mode works, it seems to me that the installation as such is
>> not entirely broken, but there is some hickup in the init procedure.
>>
>> Any ideas?
>
>Well a few corrections above might get you closer, since
>you forced it down the diskless path, which is incorrect.

Thank you for your tips! 

>> Thanks
>>
>> --
>> Manuel
>> _______________________________________________
>> freebsd-arm@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
>>
>
>-- 
>Rod Grimes                                                 rgrimes@freebsd.org

--
Manuel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190102140045.GA57656>