[time-nuts] Re: Clock display on Linux systems?

James Perkins james at loowit.net
Thu Dec 9 18:30:34 UTC 2021


I don't recommend USB as a highly reliable boot device for Linux. I did
development and support on a Linux based embedded product that kept all its
nonvolatile storage on a USB drive on an eUSB card inside the case, a lower
cost alternative to SSD or PCIe based drives. While it worked on about 99%
of the boots if I did my best engineering work, if a keyboard, mouse, or
other USB device was connected to one of the external USB ports, I could
easily generate enough USB traffic to cause the boot to fail while the Grub
bootloader was running - resulting in it corrupted reads of the kernel or
initial ramdisk image from the eUSB drive. I suspect that Grub's drivers
are pretty naive about what might happen and assumes no other active
devices on the bus. We also tried many different USB storage devices from
vendors which were either unprepared to be boot devices at all, were
unprepared for other devices coming online/offline or other enumeration
activities while they were doing work, fine with FAT but not ext2/ext4
filesystems, or prone to corrupting their own firmware or translation layer
database when they became confused. When it came time to replace the PC I
specified one with eSATA internal storage and all these problems went away;
plus, the drive had S.M.A.R.T. so could self-monitor and report its health
(whereas all the USB products had few if any statistics and just got more
broken with time).

Time related: this embedded product had a controlling PC and 27 ARM
application processors which used USB for coordination and booted using IP
over USB. Since the ARM processors were running in an environment and
hardware I had total control over, I could make USB work relatively
reliably there. I used the ISC NTP server to synchronize clocks from the
network NTP servers to the PC and then on to its internal IP network of ARM
Linux systems; also, I used the Time Zone database on the PC and standard
GNU glibc interfaces to that; along the way I found a bug in strptime(3),
which parses TimeZone fields in text strings, e.g. "+08:00", observed it
was broken in several ways, including not working for Time Zones more than
+2300 or -2300, which New Zealand, Kritimati and American Samoa wrestle
with at least seasonally, and some historical places experienced
continuously for years. I proposed a fix to support -99:59 to +99:59 the
libc development list, and it was accepted. This was several years ago.

Cheers,
James

On Tue, Dec 7, 2021 at 6:10 AM John Sloan <jsloan at diag.com> wrote:

> > In this application RPis seem to last for many years - in others where we
> > use the SD-card (e.g. influxdb or similar) they seem to regularly fail in
> > 1-2 years, requiring an reformat or new SD-card. An RPi or similar with a
> > more robust SSD/M2 drive would be good.
>
> I’ve had the same experience with the SD cards.
>
> At least the most recent Raspberry Pis (e.g. the 4B) support firmware to
> boot from USB with just a little configuration effort. I just recently
> starting playing with this, booting a RPi 4B from a USB-attached Samsung T5
> SSD. It seems to work mostly fine (caveat: see below). For other reasons,
> I’ve been running a RPi-specific version of Linux MATE, but Raspbian should
> work okay too. (I tried the RPi-specific image of Ubuntu, since I run
> Ubuntu on my Intel machines, but was not terribly impressed; slow
> interactive response.)
>
> One thing I did run into: if I try to plug too many USB devices in along
> with the SSD - e.g. in my case a mouse, keyboard, and GPS dongle - the
> system crashes because the SSD USB connection resets. It seems to be a
> power problem; I solved it with an external powered USB hub, leaving the
> SSD on a USB port on the RPi.
>
> :John
>
> --
> J. L. Sloan             Digital Aggregates Corporation
> +1.303.489.5178         3440 Youngfield Street
> mailto:jsloan at diag.com  #209
> http://www.diag.com     Wheat Ridge CO 80033 USA
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at lists.febo.com -- To unsubscribe send
> an email to time-nuts-leave at lists.febo.com
> To unsubscribe, go to and follow the instructions there.



-- 
James Perkins <james at loowit.net>  KN1X  www.loowit.net/~james
2030 W 28th Ave, Eugene OR 97405       +1.971.344.3969 mobile
Alternate email: <opalmirror at gmail.com>




More information about the Time-nuts_lists.febo.com mailing list