Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2016 08:44:36 -0500
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-arm@freebsd.org
Subject:   Re: Bizarre clone attempt failures on Raspberry Pi2...
Message-ID:  <60b6e156-981e-9fbd-b68c-0daae1961286@denninger.net>
In-Reply-To: <E01579F5-9562-4E51-9CFB-EA510460A4C8@gromit.dlib.vt.edu>
References:  <548783e1-9047-68f7-5f50-449db684d602@denninger.net> <d2eb4035-e494-1a7b-98e5-2aa87efe0763@denninger.net> <EDE65B12-4961-4CEF-8AE9-BFDA4FD508A5@gromit.dlib.vt.edu> <5475ea53-ae22-2634-6f2a-5737d1b0e308@denninger.net> <398ae56c-8893-f188-c210-cf7f19ccf433@denninger.net> <1468518953.72182.219.camel@freebsd.org> <7a91fc79-1c85-fac8-aa3f-db90592f3f44@denninger.net> <bec46aff-a4d5-9c4d-49d0-78534b13f719@denninger.net> <E01579F5-9562-4E51-9CFB-EA510460A4C8@gromit.dlib.vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms050304070703030100050200
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 7/15/2016 08:36, Paul Mather wrote:
> On Jul 14, 2016, at 11:36 PM, Karl Denninger <karl@denninger.net> wrote=
:
>
>> Found it.
>>
>> Apparently the current code *requires* the label be set on the msdos
>> partition.  If it's not then not only does it not mount (which shouldn=
't
>> matter post-boot as the loader is supposed to pass the dtb file, it is=

>> specified in the config file without any sort of path prefix, and thus=

>> once the kernel has loaded it should not matter if the dos partition i=
f
>> actually mounted or not) *but* the boot process hangs without any
>> indication of why!
>>
>> So, you must do newfs_msdos -L MSDOSBOOT -F 16 {device}
>>
>> If the "-L" is missing you're hosed; the system facially appears to be=

>> just fine but while the loader comes up and so does the kernel, it han=
gs
>> without ever proceeding -- and without any sort of error message
>> indicating that it is unable to mount something it needs.
>
> You have to do that because the device entry in the stock /etc/fstab is=
 /dev/msdosfs/MSDOSBOOT.  The /dev/msdosfs part indicates it's using ms-d=
os labels.  In other words, this is just the same sort of failure you wer=
e getting when you weren't labelling the UFS partition as "rootfs".  Labe=
lling the file system properly "fixes" the issue, as you would expect.
>
> It's a misnomer to say the code "requires" labels.  It's just that's th=
e way the distribution images are currently set up.  I have an older Pi t=
hat predates the current distribution images that just uses /dev/mmcsd0..=
=2E device names in /etc/fstab.  Both approaches work fine.  You just nee=
d to make sure the devices you specify in /etc/fstab will actually exist =
when it comes time to mount the corresponding file system.
Except that if the root filesystem doesn't mount you get an error, and
thus you can figure out what's going on.  What excuse is there for not
printing an error message if a mount fails, and if something in
/etc/fstab fails to mount what's with hanging the machine?  I've had
disks be unavailable before on Intel architecture machines (it happens
when disks fail) and the result is an error on the failure to mount but,
unless it's the root volume, the system still comes up.

> If you stop using labels in your /etc/fstab then you won't have problem=
s when those labels are missing.  If the labels are missing, the /dev/{ms=
dosfs,ufs} devices will not be present and the system will drop to single=
-user mode because none-late, non-noauto file systems can't be accessed v=
ia their device nodes when attempting to mount them.  When that happens a=
nd you don't have a serial console enabled then you have problems remedia=
ting the situation.
>
> If a file system is not needed to mount as part of booting (as you sugg=
est for /boot/msdos) then you should probably flag it with the "noauto" o=
ption in /etc/fstab or remove it from /etc/fstab entirely.
>
> I think the problem you were having is not copying all the required att=
ributes of the file systems in question when cloning your SD cards, given=
 your /etc/fstab setup.  It sounds like you've fixed that, now.
Again, if it dropped to single user mode *and said it was doing so* or
if there was an error message on the console when the filesystem failed
to mount I would have found this in a reasonable period of time.  It
wasn't that rough to do so with the ufs label once I knew the filesystem
was failing to mount, which was discernible from the console output.

Not printing an error when things error out is rude at best, and when
that error is going to prevent the system from coming up this darn well
ought to show up where one with a monitor plugged in can see it, eh?

There was literally no indication at all as to what was going on and
since gpart does not show filesystem labels for *either* BSD labeled
slices OR msdos figuring out what was different between the two proved
to be a bit troublesome.  IMHO at least the failure to display an error
message in this circumstance ought to be corrected.

--=20
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

--------------ms050304070703030100050200
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC
Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G
A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl
bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3RlbXMgTExDIENBMSIwIAYJKoZIhvcNAQkBFhND
dWRhIFN5c3RlbXMgTExDIENBMB4XDTE1MDQyMTAyMjE1OVoXDTIwMDQxOTAyMjE1OVowWjEL
MAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExGTAXBgNVBAoTEEN1ZGEgU3lzdGVtcyBM
TEMxHjAcBgNVBAMTFUthcmwgRGVubmluZ2VyIChPQ1NQKTCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBALmEWPhAdphrWd4K5VTvE5pxL3blRQPyGF3ApjUjgtavqU1Y8pbI3Byg
XDj2/Uz9Si8XVj/kNbKEjkRh5SsNvx3Fc0oQ1uVjyCq7zC/kctF7yLzQbvWnU4grAPZ3IuAp
3/fFxIVaXpxEdKmyZAVDhk9az+IgHH43rdJRIMzxJ5vqQMb+n2EjadVqiGPbtG9aZEImlq7f
IYDTnKyToi23PAnkPwwT+q1IkI2DTvf2jzWrhLR5DTX0fUYC0nxlHWbjgpiapyJWtR7K2YQO
aevQb/3vN9gSojT2h+cBem7QIj6U69rEYcEDvPyCMXEV9VcXdcmW42LSRsPvZcBHFkWAJqMZ
Myiz4kumaP+s+cIDaXitR/szoqDKGSHM4C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D.org/cgi/mid.cgi?60b6e156-981e-9fbd-b68c-0daae1961286>