Trying to install to HDD; Expand BeFS?

By the way, I have my system set up with GPT and UEFI boot for the main disk, and MBR/Legacy BIOS boot for the secondary disk with Haiku and MS-DOS (just for fun) on it.

I need to hit a key when rebooting to get the BIOS boot menu to show up, and pick that secondary disk to get it started. The boot menu mixes together UEFI boot targets (so you get several bootable things on drive P1) and legacy MBR disk boot (it just names the disk for MBR).

20190428%20Boot%20Menu

I just use the Windows bootloader for everything since it’s less headache.

I use EasyBCD to edit the windows bootloader entries and disable the graphical bootloader as it is very slow and requires a reboot to load into any OS other than Windows.

I tried again to use the installer to format and install directly on the HDD (/dev/disk/scsi/1/0/0/) and again the bootloader can’t find the partition. Back in Linux, I have an interesting result with fdisk:

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x202e534f

Device Boot Start End Sectors Size Id Type
/dev/sda1 544826731 2459555038 1914728308 913G 61 SpeedStor
/dev/sda2 2037581312 3872946802 1835365491 875.2G 74 unknown
/dev/sda3 1634208883 3235739611 1601530729 763.7G 6b unknown
/dev/sda4 0 0 0 0B 65 Novell Netware 386

It seems the Haiku Installer tried to create partitions which exceed the space on the device!
Why is this so difficult?

I formatted the HDD as GPT with an EFI partition and BeFS partition. Again, the installer didn’t install correctly, and on reboot, there wasn’t a Haiku partition to boot from. Going back to Linux and using fdisk, I see that Drive Setup again made partitions which don’t compare with what was instructed:

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x202e534f

Device Boot Start End Sectors Size Id Type
/dev/sda1 1 58610411 58610411 28G ee GPT

Also, the disklabel type says DOS when I created a GPT partition. It’s also interesting that when I create the partition with fdisk in Linux as eb, the Installer in Haiku shows it as greyed out, requiring that I muck with it with Drive Setup.

  • What does the installer require from the BeFS partition to make it useful for install?
  • Is there a bug in Drive Setup causing my headaches, or am I doing something wrong?

Booting the Haiku USB thumb drive as Legacy or EFI seems to yield the same results, except that Legacy boot allows Haiku to use my full desktop resolution (2560x1440 I think) instead of something looking like 800x600 with EFI. So Legacy mode would be best I think. Thoughts?

DOS? Is your fdisk smart enough to understand GPT? There’s also a protective dummy MBR header on GPT disks so that older software doesn’t try to overwrite the GPT partitions, which is what you see here. Maybe there’s an fdisk flag telling it to edit the GPT partition table.

I recommend that you set up all the GPT partitions using fdisk, then use DriveSetup to format the BFS partition, only format, not change the partitions. Then try installing. If that doesn’t work, use MBR partitioning (and wipe out the GPT remnants).

Interestingly enough, I tried again with the R1Beta instead of the Nightly, and the Beta was able to install a bootable partition. Sadly though, networking didn’t work (though it works with the Nightly).

I don’t want to mess too much with my drives, since I have an EFI Linux partition, MSB Windows partitions, and non-bootable NTFS data drives. I’d loose a lot if I managed to screw things up.

I just tried the latest nightly build in Virtual Box. I created a 10 GB virtual drive, asked DriveSetup to initialize the drive for BeFS and install Haiku. On reboot, there was a boot error, which might have been from Virtual Box. I ran the installer again, and DriveSetup showed the virtual disk as having a 2.5 GB BeFS partition, and the remaining 7.5 GB as free space.

It seems there’s a major regression with DriveSetup. I’ve never had so much difficulty with DriveSetup and getting Haiku running as I’ve had today.

And the virtual network in VirtualBox sometimes works, sometimes doesn’t. After Haiku was installed, the network didn’t work. I rebooted, and the network worked. I tried to install BePDF from HaikuDepot, and Haiku froze during install. I rebooted the VM, and now networking doesn’t work again. VBox is showing an Intel network adapter which I have bridged to my Ethernet network, and sometimes Haiku isn’t getting an IP from DHCP, yet seems to get DNS settings somehow.

Before someone else mentions it, yes, I know that Haiku comes in two flavours at the moment: beta and pre-alpha-testing. Neither are perfect or big-free. But recently it’s gone from the occasional odd bug to almost not usable. I was using an older nightly build when doing some software porting, and using it for hours on bare metal with zero OS problems.

I haven’t noticed those problems myself… and I typically run a Haiku nighly on Vbox.

Hello. Maybe is not the more elegant way, but you can try the following:

  1. Install the R1 Beta, and check if the partition boots correctly.
  2. Using a USB drive, boot a recent nightly.
  3. Install nightly (using Installer) and select the partition where the R1 Beta is. This will overwrite the packages with the Nightly version.

Hi,

It seems that there was a regression somewhere since beta1 and the Installer does not result in a bootable system anymore. We should fix that. It went unnoticed because people apparently rarely do a clean install.

1 Like

Works fine to install hrev 53021 and then update to the latest one.
Yesterday I went through the exact same thing as you, @rjzak.

Hopefully there’s a fix avaliable soon :slight_smile:

I’m glad I’m not the only one. For a while I thought I was going crazy. Thank you.

The bug was fixed in hrev53100.

3 Likes

Just some more points on GPT partition table.

The best way to create and maintain GPT partition scheme is gdisk (which can also be used for MBR partition scheme), not fdisk. And the reason is GPT has more configuration attributes compared to MBR, which are not (properly) handed by fdisk.

MBR has the notion of “partition type” which is 2-digit hexadecimal number, whose value EB means Haiku. GPT uses 128-bit identifier for the same purpose, 42465331-3BA3-10F1-802A-4861696B7521 is used for Haiku (https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs). Some OSes (is Haiku among them ?) are sensible to filesystem type and partition type where they can be installed to.

Additionally to filesystem UUID (the characteristic of filesystem, not related to partition scheme), GPT also uses partition UUID unlike MBR (not to be confounded with partition type ID). So it is possible e.g. to tell GRUB the partition UUID you like to boot, and it will be the same after you format this partition as long as the partition itself is not deleted and recreated.

Thank you, @waddlesplash. I’ve got my machine triple-booting with Haiku, this time from the spare HDD instead of a USB thumb drive. Walter hrev53102 is working like a charm.

Good points @alpopa, I’ll remember that if I counter such filesystem issues again. I wasn’t aware of such limitations in fdisk. I’ve got my machine booting Haiku in Legacy mode, which provides better display resolution options than EFI.

1 Like

Насколько я понял проблема в том что GPT некорректно работает с загрузчиком Haiku.А если я возьму HDD и используя низкоуровневое форматирование сотру всю информацию и инициализирую MBR чтобы записать только одну ось Haiku то сможет ли загрузчик без всех этих проблем просто автоматом загружать Haiku?Потому как читая все эти записки не могу понять почему не использовать Haiku как основную ось без всех этих проблем?Просто сменить HDD на другой и используй другие оси.

Bfs can not expand, iirc

Я пробовал устанавливать Haiku на HDD без никакой схемы разделов (весь диск), на раздел MBR и на раздел GPT. При этом совершенно не важно, использует ли компьютер BIOS или UEFI. Haiku устанавливается и грузится без проблем во всех этих случаях.

(но ответ скорее получите, если всё-таки писать по-английски)

There was a GSoC 2012 project to do just that… but unfortunately the code is not usable at present. Some handy links:

GSoC final report: https://www.haiku-os.org/blog/ahenriksson/2012-09-05_bfs_partition_resizer_final_report/
Previous forum thread: Resizing BFS
Feb 2019 monthly update where progress on merging the GSoC code was mentioned: https://www.haiku-os.org/blog/pulkomandy/2019-03-02_haiku_monthly_activity_report_february_2019/

Увы я мало очень знаю английский да и в моем возрасте наверное поздно идти в школу.Но за ответ спасибо.Думаю попробовать писать через гугл переводчик.Надеюсь получится.