My fourth day with Haiku: installation and download problems

My fourth day with Haiku: installation and download problems

TL; DR: After a few days of experimentation with Haiku I decided to put it on a separate SSD. But everything turned out to be not so easy.

My fourth day with Haiku: installation and download problems
Striking work is underway to verify the download of Haiku.

Three days ago I found out about Haiku, an unexpectedly good PC operating system. It's day four and I want to do more "real work" with this system, and the partition that comes with the Anyboot image is too small for that. Then I pick up a brand new 120GB SSD, get ready for the smooth work of the installer ... And I'm in for a bummer!

Installing and booting up are usually given a lot of attention and love as they are the first and most important impressions. It is hoped that the log of my "beginner" experience will prove useful to the Haiku development team in their ongoing efforts to debug an operating system that "just works". I take all the mistakes on myself!
It seems to me that the situation with booting via USB will be especially important, since not every user is ready to use the main SATA drive (I'm not talking about NVME ...) to experiment with a completely unfamiliar operating system. I think USB booting is the most likely scenario for most users who decide to try Haiku on real hardware. Developers should take this seriously.

Developer comment:

We've just started EFI support by quickly writing a beta version that boots on EFI-enabled machines. The results obtained so far are far from the desired level of support. I don't know if we should document the current work, or just focus on achieving the proper result, and then document everything.

It sounds meaningful, and there is hope that in the end everything will be much better than it is now. So far, I can only check what has been done to date. Let's get started...

Anyboot image is too small

Although the Anyboot image is surprisingly easy to write to a regular flash drive, it does not have enough space on the Haiku partition to install additional software.

My fourth day with Haiku: installation and download problems
Writing an Anyboot image to a flash drive is, in principle, quite simple, but as a result, there is not enough space for real work.

Quick fix: increase the default Haiku partition size.

So for real work with Haiku, you still need to install it using the Installer application.

Installer doesn't do everything in one place

Remember the great Mac OS X installer?

My fourth day with Haiku: installation and download problems
Mac OS X 10.2 Installer

Is he:

  • initializes disks (writes GPT, GUID partition table)
  • creates partitions (EFI, primary) using "common sense" (for best disk usage)
  • marks the bootable partition (sets the bootable flag on it)
  • copies files

In other words, it does "everything" without any extra fuss for the user.

On the other hand, there is Installer for Haiku, which simply copies the files and gives the user the rest, which is too cumbersome, which even if you have experience, you will not immediately figure it out. Especially if you need a system that boots on both BIOS and EFI systems.

What should I do?

I can't say for sure, but I'm guessing this anyway:

  1. Open DriveSetup
  2. Select device to install
  3. Disk->Initialize->GUID Partition Map…->Continue->Write Changes->OK
  4. Right click on an empty space on the device where the system will be installed
  5. Create...->Enter 256 as size->EFI system data (not sure at all)->Write changes
  6. Right click on "EFI system data" on the device where the system will be installed
  7. Initialize->FAT32 File System…->Continue->Enter name: "EFI", FAT bit depth: 32->Format->Write changes
  8. I repeat the right click on an empty space on the desired device
  9. Create...->Enter partition name: Haiku, partition type: Be File System->Create->Write changes
  10. Right click on EFI->Connect
  11. I run Installer->confused by techno-slang->Continue->To disk: Haiku (make sure it's the same partition I created before)->Install
  12. In the file manager, I copy the EFI directory from the current system to the EFI partition (I believe that this is necessary to boot from EFI)
  13. [approx. translator: removed this item from the translation; in short - the author did not quite master the creation of a hybrid system for loading both EFI and BIOS]
  14. turn off
  15. I connect the newly created disk to the port from which the system will definitely boot [strange, I didn’t have to do this. - approx. translator]
  16. include

It seems to me that it is clearly visible: we need a tool that will do everything at the touch of a button, with timely (!) Confirmation that it is possible to overwrite the device.

"Quick" solution: make an auto-magic Installer that does everything.

Well, even if not “fast”, then decent. These are the first impressions of the new system. If it fails to install (and I have had it several times), many will simply quietly leave forever.

Technical explanation about DriveSetup according to PulkoMandy

BootManager writes a complete boot menu, including the ability to boot multiple systems from disk, for this it only needs about 2kb at the beginning of the disk. This is fine for older disk layouts, but not for GPT, which uses the same sectors for the partition table. On the other hand, writembr writes highly simplified code to disk, which will simply find the active partition and continue booting from it. The first 400 bytes on disk are enough for this code, so it does not intersect with GPT. It has limited support for GPT disks (but for simple cases, everything will be fine).

Quick fix: let the BootManager configuration GUI put whatever is installed with writembr on disk if a GPT partition is found. No need to put 2kb code on GPT disks. You don't need to set the bootable flag on the EFI partition, only the Haiku partition.

First try: kernel panic

Equipment

  • Acer TravelMate B117 N16Q9 (sold with EndlessOS)
  • lspci
  • lsusb
  • the existing system was started from a 100GB Kingston DataTraveler 16 flash drive made from an Anyboot image using Etcher on Linux, inserted into a USB2.0 port (because it did not boot from a USB3 port)
  • Kingston A400 120GB SSD, factory only, plugged into ASMedia ASM3 sata-usb2115 adapter plugged into TravelMate B3's USB117 port.

The results

Installer starts copying files, then I/O error pops up followed by kernel panic

My fourth day with Haiku: installation and download problems
kernel panic

Second attempt: unbootable drive

Equipment

Everything is as before, but the SSD is connected to the adapter, which is connected to the USB2.0 Hub, plugged into the TravelMate's USB3 port. I verified with a Windows installation flash drive that this machine boots from USB3.

The results

Unbootable system. The disk layout seemed to have flown due to BootManager.

My fourth day with Haiku: installation and download problems
boot manager. "Write boot menu" what, destroys the disk layout?!

Third try: wow, it's loading! But not through the USB3 port on this machine

Equipment

Everything is the same as in the second attempt, but this time I do not use BootManager at all.
The markup without running BootManager looks like this when checked from Linux.

My fourth day with Haiku: installation and download problems
The "efi" partition with the FAT32 file system is marked bootable without starting BootManager. Will it run on a non-EFI machine?

The results

  • EFI mode, USB2 port: boot directly to Haiku
  • EFI mode, USB2 hub connected to USB3 port: Message "no boot path found, scan for all partitions..." followed by a boot screen with "Select boot volume (Current: haiku)". The "Continue booting" button is grey, not pressed. If you select “Select Boot Volume” -> Haiku (Current: Latest state) -> Latest state -> Return to main menu-> Continue booting in the list, it boots directly into Haiku. I wonder why it cannot “just load”, but requires a dance with a tambourine? Moreover, the boot partition is obviously automatically found on the loading screen. Software bug?
  • EFI mode, USB3 port: Boot directly into Haiku. Wow, how glad I am ... Premature, as it turned out. A blue screen is displayed, but nothing happens for a long time. The cursor-"finger" hung in the middle of the screen and does not move. The sata-usb3 adapter blinks. The case ended with a kernel panic. The Anyboot image on the USB3 stick was not even recognized as bootable on the current hardware. Bah, it's a bug! Regarding this, I started An application.

My fourth day with Haiku: installation and download problems
Kernel panic when booting from USB3 port.

What is amazing is that you can still type commands, but you will have to use the English layout. So I do as advised:

My fourth day with Haiku: installation and download problems
image caption: output syslog | tail 15 - while the core is panicking

Command call rebootunfortunately doesn't work.

Fourth try: second car

I transferred the same (exactly working) disk to another machine, where I checked the work with different ports.

Equipment

Everything is the same as in the third attempt, but on Acer Revo One RL 85.

The results

  • EFI mode, USB2 port: Message "no boot path found, scan for all partitions..." followed by a boot screen with "Select boot volume (Current: haiku)". The "Continue booting" button is grey, not pressed. If you select “Select Boot Volume” -> Haiku (Current: Latest state) -> Latest state -> Return to main menu-> Continue booting in the list, it boots directly into Haiku. Shutdown hangs on the message "Shutting down ...".
  • EFI mode, USB2 hub connected to USB3 port: TBA
  • EFI mode, USB3 port: Message "no boot path found, scan for all partitions..." followed by a boot screen with "Select boot volume (Current: haiku)". The "Continue booting" button is grey, not pressed. If you select “Select Boot Volume” -> Haiku (Current: Latest state) -> Latest state -> Return to main menu-> Continue booting in the list, it boots directly into Haiku.
    I draw your attention to the fact that, unlike the first system, there is a normal boot to the desktop without kernel panic. Shutdown hangs on the message "Shutdown in progress".
  • EFI mode, sata port: Boot directly into Haiku. Shutdown hangs on the message "Shutting down ...".
  • CSM BIOS mode, USB2 port: to be clarified
  • CSM BIOS mode, USB2 hub connected to USB3 port: clarification needed
  • CSM BIOS mode, USB3 port: to be clarified
  • CSM BIOS mode, sata port: Black screen with "Reboot and Select proper Boot Device or Insert Boot Media in selected device and press a key" message. Came from CSM BIOS? [Yes, exactly the same message my system gives if it does not find the bootloader. - approx. translator]

Fifth attempt: third car

Transferred the same disk to the third machine, checked up on different ports.

Equipment

The same as in the third attempt, but on a Dell Optiplex 780. If I'm not mistaken, this machine has an early EFI, which apparently always works in CSM BIOS mode.

The results

  • USB2 port: Haiku download
  • USB3 port (via PCIe card, Renesas Technology Corp. uPD720202 USB 3.0 Host Controller): TBA
  • sata port: to be clarified

Sixth try, fourth machine, MacBook Pro

Equipment

Everything is the same as in the third attempt, but with a MacBookPro 7.1

The results

My fourth day with Haiku: installation and download problems
How a Mac sees a flash drive with Haiku.

  • CSM mode ("Windows"): black screen with the inscription "No bootable drive - insert boot disk and press any key". Did she come from Apple CSM?
  • UEFI Mode ("EFI Boot"): Stops at the boot device selection screen.

Seventh try, Lenovo netbook with 32-bit Atom processor

Equipment

  • Kingston DataTraveler 100 16GB flash drive made on Linux with Etcher using Anyboot 32-bit image hence.

  • Lenovo ideapad s10 netbook based on Atom processor without hard drive.

  • lspci of this machine, filmed on linux.

  • lsusb

    00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
    Subsystem: Lenovo NM10/ICH7 Family USB2 EHCI Controller
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 23
    Region 0: Memory at f0844000 (32-bit, non-prefetchable) [size=1K]
    Capabilities: [50] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [58] Debug port: BAR=1 offset=00a0
    Kernel driver in use: ehci-pci

The results

Loading in progress, then a kernel panic happens, the command syslog|tail 15 displays kDiskDeviceManager::InitialDeviceScan() failed: No such file or directory after several ATA errors. Note: I have tried booting from USB, not sata.

My fourth day with Haiku: installation and download problems
Kernel panic on Lenovo ideapad s10 netbook when booting from flash drive.

For fun, I inserted the disk into the sata port, but I didn’t notice much difference with the flash drive. Although I got different messages when using the command syslog|tail 15 (it said it found /dev/disk/ata/0/master/1).

mr. waddlesplash asked me to run a command `syslog | grep usb for this case, so here are the results. I'm still glad it's possible to run commands like this on the screen with kernel panic.

My fourth day with Haiku: installation and download problems
My fourth day with Haiku: installation and download problems

According to mr. waddlesplash this EHCI error is the same as in this application

Eighth try: MSI netbook with 32-bit Atom processor

Equipment

As before

  • A Medion Akoya E1210 netbook (labeled MSI Wind U100) with a disc installed (which I don't use for Haiku).
  • lspci this machine
  • lsusb of this machine
    00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
    Subsystem: Micro-Star International Co., Ltd. [MSI] NM10/ICH7 Family USB2 EHCI Controller
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 23
    Region 0: Memory at dff40400 (32-bit, non-prefetchable) [size=1K]
    Capabilities: [50] Power Management version 2
        Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
        Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [58] Debug port: BAR=1 offset=00a0
    Kernel driver in use: ehci-pci

The results

Uploaded to Installer Haiku. TouchPad works! (for example, scrolling). The video card is recognized as Intel GMA (i945GME).

Ninth attempt: a flash drive with a 32-bit image on a MacBook Pro

Equipment

  • As earlier.
  • MacBook 7.1

The results

Black screen with the inscription "No bootable drive - insert boot disk and press any key".

Note: Apple Keyboard

In the lower left corner of any keyboard on the bottom row there are the following buttons:
non-Apple: Ctrl-Fn-Windows-Alt-Spacebar
Apple: Fn-Ctrl-(Option or Alt)-Command-Spacebar

It would be nice if all keyboards in Haiku behaved the same way so that they could be used the same way, no matter what is actually stamped on them.
On the Apple keyboard, the Alt button does not go immediately to the left of the spacebar (instead, the Command key is there).
In this case, I would find that Haiku will automatically use the Command key instead of the Alt key. So, when working on an Apple keyboard, I would feel that the keyboard is not-Apple.
Obviously, there are different options in the settings, but I would like automatic recognition and adjustment, because this is USB, after all.

Note: writembr to restore?

I heard that with the command writembr it is possible to make a system (running with EFI) bootable from the BIOS.

/> writembr /dev/disk/.../.../.../.../raw
About to overwrite the MBR boot code on /dev/disk/scsi/0/2/0/raw
This may disable any partition managers you have installed.
Are you sure you want to continue?
yes/[no]: yes
Rewriting MBR for /dev/disk/.../.../.../.../raw
MBR was written OK

Looks good, but as a result, the system is still not able to boot as before. Possibly because BIOS boot only works with proper partitioning and not GPT? [I should try protective MBR... - approx. translator]

Conclusion

Haiku is awesome, but it takes a serious approach to get the setup experience. In addition, the download process is a lottery, with about a 1/3 chance of success, and it doesn’t matter if you have USB2 (Atom netbook) or USB3 (Acer TravelMate). But at least one developer has the same hardware. I hope my "noob" experience will help developers understand what "mere mortals" need, as well as make the result as elegant as a Mac OS X installer. Keep in mind that this is not even version 1.0, so everything is very good!

Try it yourself! After all, the Haiku project provides images for booting from DVD or USB, generated daily. To install, just download the image and burn it to a USB flash drive using Etcher

Got questions? We invite you to the Russian-speaking telegram channel.

Error overview: How to shoot yourself in the foot in C and C++. Haiku OS Recipe Collection

From Author Translation: This is the fourth article in the Haiku series.

List of articles: First The second The third

Source: habr.com

Add a comment