Librem Mini PC, Pureboot will not recognize bootable USB, no OS

I think you are wasting your time debugging Purism’s shell scripts but my guess would be … unhandled error.

That is, something goes wrong earlier in the script leading to a shell variable not even being defined. So, yes, the [ goes wrong and the script has not been coded defensively but that isn’t the real problem.

Example:

[ $QT_ACCESSIBILITY -ne 42 ]
echo $?
0
[ $QT_ACCESSIBILITYX -ne 42 ]
bash: [: -ne: unary operator expected

This example has been chosen just because that first shell variable already exists in my shell and has a value that is a valid integer and the second shell variable does not exist. That particular shell variable has no relevance whatsoever to the actual problem. It is just to illustrate one possible failure mode with the [ command.

And note that there is nothing wrong with the syntax, provided that the script can guarantee absolutely that the shell variable exists and has a valid integer value.

I don’t have ready access to that exact script (media-scan) so consider this no more than an educated guess.

Bottom line is that the “I/O error” is likely to be the real problem. Even if the script were perfectly coded, you aren’t going to be able to boot if the flash drive is reliably unable to be read!

3 Likes

I kind of see what you are saying. Still learning. Very unfamiliar with scripting. The logic makes sense, but I am unfamiliar with most shorthand conventions for script operators. Have been picking up a little as I go in trying to navigate the filesystem through terminal, reading various tutorials, etc.

Remove the internal drive, put it in an enclosure, use another computer to put something suitable on it, then put it back in.

I have read a little bit about this. For these purposes, what will I need to buy in order to connect the drive to my laptop?

1 Like

These enclosures invariably give a USB interface. So all you usually need is the enclosure. But in order to know what type of enclosure to buy, you would need to know what type of disk your internal drive is.

Looks like the Mini allows 1 or 2 internal drives i.e. either SATA III (SSD or HDD) or M.2 (SSD) or both. So you would need to know what you have, which would relate to what you ordered it with or what you installed subsequently. Or you could just open it up in order to have a look.

1 Like