Installing when USB boot does not work: consider SATA

Ever tried to boot install  media using a USB device (a flash drive, an external CD or HD drive?) and had it fail? Now that a lot of machines do not come with optical drives, this can be a stumbling block. Maybe the solution is to open up  the case, and plug a borrowed SATA CD/DVD drive into one of the SATA sockets on your motherboard. (Leave your hard drive plugged in!) You probably have spare power leads that can supply the DVD drive.

Of course, this won’t help with a laptop. Anyway …

I have an old computer (a Wincor Nixdorf Beetle)that is fairly low-powered and lacks a CD/DVD drive. I thought I might use it to play with Haiku OS. First, got the install media:

$ wget https://mirror.aarnet.edu.au/pub/haiku/r1beta3/haiku-r1beta3-x86_64-anyboot.iso

Inserted an empty USB stick, then unmounted it but left it in the machine:

$ umount /dev/sdj1

where sdj was determined by looking at dmesg output ($ sudo dmesg) before and after plugging in the USB stick. It would have been easier to use this:

$ lsblk

Your USB probably won’t be sdj…

Note: Sometimes ejecting the USB through a GUI file manager will not leave it as an available device.

Wrote the image to the USB:

$ sudo dd if=haiku-r1beta3-x86_64-anyboot.iso of=/dev/sdj bs=1M

But the computer would not boot off USB, even after messing with BIOS settings. In fact, putting the USB stick into the computer prevented it from booting at all. Tried writing to other USB sticks, and writing in other ways; for example:

$ sudo cp haiku-r1beta3-x86_64-anyboot.iso /dev/sde

where sde was a USB; note, not to sde1 but to sde itself.

also dd’d to a CF card and plugged a USB card reader into the beetle.

Neither booted. Both locked it up. But … I have booted the Beetle off a USB CD drive, so burned the ISO to a DVD. That was slightly better — gave me a reboot loop.

Opening up the computer case, I saw there was a spare SATA plug. So I pulled a SATA DVD drive out of another computer and plugged it into the Beetle. Had to leave the case off, but it booted no worries off the SATA DVD and the install went flawlessly. So did the ensuing update, although my little old monitor was too small for the installer  — the Haiku dialogs were not readable and I could not figure out how to shrink them, so I also had to find another screen. Once the install was complete, there were enough video drivers available I could swap back to the original screen and choose a higher pixel density.

Haiku is very responsive on this limited hardware, which I keep out in the shed and mostly use for problem solving (eg looking for manuals and how-tos), and does the job admirably.

the job

Haiku update: WebPositive gets positive review

Looks like the WebPositive team is doing a great job of making sure Haiku can interact with the modern web. Awesome!

December 2020. How well can Haiku work with modern, complex, JavaScript-rich websites? Here is my idiosyncratic random sample. Summary: WebPositive  (1.2-alpha) seems to do a great job. Otter (1.0.81) is handy but a little more limited, possibly because its JavaScript is less up to date. Not sure.

Browser: Otter

Note: JavaScript is enabled in Preferences.

GMX.com email — no problems; full functionality.

Gmail — “Couldn’t sign you in; the browser … JavaScript … ”

AOL mail — “Whoops! It looks like you’re using an unsupported browser …”

Outlook Web — no problems; full functionality.

WordPress — Seems to function well; I use the Classic Editor, so cannot comment on others, but looks good.

Twitter — “This browser is no longer supported.”

Atlassian Confluence — Looks good.

Browser: WebPositive

GMX.com email — no problems; full functionality.

Gmail — looks good!

AOL mail — looks good.

Outlook Web — OK.

WordPress — looks good.

Twitter — OK.

Atlassian Confluence — OK.

 

Haiku

Nifty (but these days obscure) #2: using the emTeX graphics driver and DVI previewer (or ‘avoiding the digital dark age’)

So back in the DOS days (1990s), emTeX was a brilliant way to make LaTeX quality documents on DOS. It was a complete solution. In those days of dot matrix printers and VGA screens, PostScript was not really a central part of the DOS ecosystem. It has a fair bit of overhead for systems of that vintage, for one thing, and can render pretty damned slowly. Graphics were more often now-forgotten formats like IBM’s CGM (computer graphics metafile, I think) and PCX. So emTeX’s DVI viewer could not render embedded PostScript graphics. That was not to say they could not be used — dvips existed and could incorporate many kinds of graphics into the final file, if PostScript was your final target.

What emTeX could do was incorporate PCX bitmaps, and render them in its accompanying DVI viewer, dviscr, and then put them in the final printed version. There were not many ways of previewing LaTeX on DOS that did not involve having a cup of tea while an ancient (well, it wasn’t ancient at the time) version of Ghostscript rendered your page (or converted it to some kind of bitmap which you then viewed), or just giving up and printing it — which was fine if you had a PostScript printer, but they were very high-end in those days and often you did not.

The emTeX driver is still in TeXlive, and as a system emTeX is still there on CTAN. We can install it in DOSBox easily enough.

Here is my LaTeX file. You have to specify the image size manually:

\documentclass[emtex,a4paper,12pt]{article}
\usepackage[emtex]{graphicx}
\begin{document}
Here is a little bit of text before the picture; $\varepsilon =
\Delta \left( A B \cos\theta \right) \ldots \mathrm{etc}$

\includegraphics[width=4.2in,height=4.2in]{2.pcx}

Here is some text after the image. \emph{Just to see.}
\end{document}

Now, using emTeX on DOSBox I can process the file. The PCX was made using xFig, and the DVI viewer does not render it, though the old version of dvips (v. 5.83 from 1998) does put it into the PostScript output ok. But what about the DVI viewer that came with emTeX? (DVISCR)

I find that a PCX file that the viewer can deal with has the following properties:

  • PC Paintbrush version 3.0
  • RLE encoded
  • Monochrome

I cannot find a modern open source program to make the requisite monochrome bitmap — they all give too much colour depth. Even using ImageMagick’s convert does not work; the byte that sets the colour depth is wrong! I ask for depth=1 and get 8.

The trick is the magically compact and powerful PICTVIEW DOS image viewer in DOSBox. (And PICTVIEW is modern, it is just very stable!)

It can open most file formats. Some you can then directly reduce the colour depth to 1 bit and save as PCX. Others, you first have to convert to 256 colours, then to 2. But it works. I then call the monochrome PCX file from the LaTeX file, and here is the result.

Looks good, if monochrome
DVI file previewed using the emTeX previewer in DOSBox

Now, using the dvips and ps2pdf (from Ghostscript distribution GS386.exe, version 5.10 ) that came with the old emTeX, I get a perfectly good, though old format, PDF file — here’s a screen grab, viewed in atril:

Looks good in atril

PCX files from the very old  DOS bitmap painting program VGAPaint also work (of course, other old DOS paint programs might work too.)

FWIW, I can copy this DOSBox file tree to Haiku and get LaTeX on Haiku! (DOSBox is in the Haiku Depot.) I believe there are TeXlive binaries out there for Haiku, and you can do TeXlive properly, but this does work! Funny. I can use the native Haiku file editors and image creation tools and suchlike, then use emTeX to create the PDFs, though of course they are old-format PDFs (can run pdf2pdf or similar to update them) and I can only use LaTeX packages that confirm to the DOS 8.3 file name convention.

Looking at the same files on TeXlive on Linux, it compiles fine but xdvi does not render the PCX image.

The graphic comes out too small when I run the modern dvips. But if I recall that I scaled the PCX file while expecting 300 DPI in emTeX, I can do this:

$ dvips -D 300 EMBOX

(where EMBOX.tex is the LaTeX file and EMBOX.dvi is the DVI file) and it looks fine!

What does this tell me?

It says that LaTeX not only offers amazing cross-platform compatibility (DOS, Linux, Windows, Mac, you name it, and almost all versions of these), but also across the decades! Everything from emTeX is from the 1990s. DOS itself, the old versions of dvips, Ghostscript, emTeX. Yet I can create a file in emTeX, including graphics that I can view in the DOS-era previewer, and process the exact same files on a current machine running current LaTeX, and get the same results. Here is a close-up of the PostScript file produced by running modern LaTeX on the ‘old’ file. What digital dark age?

Looks good!Anyway, the emtex driver is really only of use in DOS anyway — you’d never use it on a modern system. If you really want to go minimal with graphics drivers, you’d use bm2font!

Worth nothing.

 

 

Haiku RC1 beta 2 on an old netbook

My old Acer netbook is finding it harder and harder to run any operating system. I am thinking of changing away from Debian as the main OS. In a similar vein, I wondered how it would go with Haiku.

First, I plugged in a USB CD drive and booted an iso image that I knew could run as a live disk and included gparted — SliTaz rolling, which has the advantage of being a small download and is a good OS itself.

I used that to shrink the Debian partition and leave a few tens of GB at the back of the disk.

I downloaded the Haiku anyboot image and burned it to a DVD and used the same USB CD drive — but boot failed.

I then wrote the image to a USB stick, and that booted no problems.

The unmounted USB stick was in /dev/sdb, and all you have to do on a Linux machine is:

$ sudo cp image.iso /dev/sbd

The netbook uses a 32-bit Intel Atom N550 chip, so it was the 32-bit version of Haiku, released roughly end of May 2020.

Install went without any trouble. I found it odd that no login was asked for — it really is a single-user, desktop operating system! I never used classic Mac. So the nearest thing for me was older Windows versions.

When I rebooted, I rebooted into Debian and edited /etc/grub.d/40_custom.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Haiku RC1 Beta 2" {
set root=(hd0,4)
chainloader +1
}

Afterwards, ran update-grub and rebooted, and chose the Haiku entry off the GRUB menu. Of course, your entry might differ from mine, depending in what disk and partition Haiku is on. So that’s that.

What is the experience?

Keep in mind it is beta software.

Very good! 

  • LibreOffice — tick (or ‘check’ if you prefer)
  • after an update in mid-2020, the WebPositive browser worked with Gmail. 
  • Calligra (another office suite) — tick
  • Depot (package repository) — works out of the box
  • kolourpaint (bitmap painting program) — tick
  • web positive, netsurf, otter browser — tick
  • sound — tick
  • wireless and wired networking — tick
  • a whole bunch of useful command line tools, giving you pretty much the full set
  • lots of handy console programs like mutt
  • my ext2 file system mounted automatically*
  • responsiveness — improved!

On the whole, very usable, very good. Obviously I’m unfamiliar with the interface, but, allowing for that, it’s pretty good.

* Security: No login needed for Haiku, but it can mount the other file systems on the disk (depending on the file system type).  This is clearly a security issue. Maybe find out how to force a login/password for Haiku, or in GRUB, or in the BIOS.

What’s not so good?

  • Security.
  • None of the web browsers worked with Gmail, or WordPress — and I did try quite a few browsers and with various settings (including plain HTML Gmail).
  • The first thing I do on a netbook is disable clicking via trackpad, because I touch it by accident when typing and the cursor ends up in the wrong place in my document and it’s a pain fixing it — and I cannot find trackpad settings in Haiku. ** Install PadBlocker ** to turn off the touchpad while typing.
  • The webcam does not work, at least not out of the box. And I could not care less, so have not tried to remedy it. I don’t count this as a negative.
  • No LaTeX, though there are hints on the interweb about installing a texmf tree and then manually adding binaries; I don’t have the time for that right now.
  • qVim seems buggy and command line Vim did not install.
  • Some programs I use don’t seem to be there, though I expect if I tried hard enough I might be able to compile some of them. And that’s not a fair criticism anyway. There are alternatives that do work in most cases (eg mutt instead of alpine).

Conclusion

Haiku is not ready for prime time, but it’s closer than you might think. I have found it very solid in that it does not fall over or crash. A couple of applications (qVim, mainly) do crash unexpectedly. Some of the software is rather old. The web browsing is fine unless you need Gmail or WordPress (and maybe other sites that I did not test because I don’t use them).

If you use it for, say, writing, most web browsing, and a bit of media work (images, sound, whatever) you’ll probably have no problems. FocusWriter is in the Depot, as well as some text editors and office suites. The internet radio app worked out the box, like a charm. 

It is responsive and very usable on the netbook, and I’ve been booting into it regularly. The mounting of my Linux partitions is a security hole, but it does make file sharing easy.

Give it a go!