Opened 6 years ago

Closed 5 years ago

#9916 closed bug (fixed)

DriveSetup does not see other hard drives so cannot setup Haiku partitions

Reported by: HAL Owned by: bonefish
Priority: high Milestone: R1
Component: Partitioning Systems/Intel Version: R1/Development
Keywords: DriveSetup drives absent missing Cc: starsseed@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I have been trying to install Haiku to a hard drive from a Haiku CD, but DriveSetup won't show any other hard drives except the hard drive where I have Ubuntu 12.04 and also contains grub2.

  1. boot with iso image on CD or anyboot image on USB stick.
  2. Choose to install. Message shows about no suitable Haiku partition for installation.
  3. Open DriveSetup observe in window that no other hard drive shown except Ubuntu 12.04.

Ubuntu occupies whole drive. this drive also has the boot sector to boot with grub2, either Ubuntu 12.04 or Linux Mint 15 on second hard drive.

I also have a third hard drive. It is empty except I formatted it with fat32 in gparted. This is the drive I wanted to choose for installing Haiku. If I click rescan in DriveSetup it does not find any more drives. Booting the CD to the desktop, and opening DriveSetup does not work any better. I was testing with haiku-nightly-hrev45954-x86gcc2hybrid.

Attachments (1)

syslog (312.3 KB) - added by HAL 6 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 6 years ago by diver

Version: R1/alpha4.1R1/Development

Please attach your syslog.

comment:2 Changed 6 years ago by HAL

Version: R1/DevelopmentR1/alpha4.1

I also tried to put the third hard drive in first priority from BIOS setup, to see if it would show in DriveSetup. That did not work. I don't know if deleting the fat32 fs partition on that drive would allow it to show? So the drive would be entirely empty. Probably not.

Changed 6 years ago by HAL

Attachment: syslog added

comment:3 Changed 6 years ago by HAL

Version: R1/alpha4.1R1/Development

It looks like I was logged in and adding comment 2 while diver had changed version to R1/Development. As I was logged in a message told me that changes had been made and did I want to save the changes or go back. It gave me the change as R1/alpha4.1 or that is what I thought so left and saved as that, but it was R1/Development that had changed. Si if I can change it back now I will.

comment:4 Changed 6 years ago by diver

Component: Applications/DriveSetupDrivers/Disk
Owner: changed from stippi to nobody

It looks like AHCI driver for some reason can't init port 1 and port 2. Could you try to switch AHCI to Legacy IDE (or something like that) in your BIOS?

Last edited 6 years ago by diver (previous) (diff)

comment:5 in reply to:  4 Changed 6 years ago by HAL

Replying to diver:

It looks like AHCI driver for some reason can't init port 1 and port 2. Could you try to switch AHCI to Legacy IDE (or something like that) in your BIOS?

That is whats happenning. I booted in IDE and DriveSetup was able to see all my Disks. The only thing is I have another problem now. After I installed to sdc1, the installer said it had written the boot sector at the end of install but when I reboot after using Ubuntu to put Haiku in the boot manager, I get a message that the Haiku partition table is missing. I suppose I might need to use a terminal the makebootable or something but I thought that was automatic with the installer.

comment:6 Changed 6 years ago by HAL

I was able to boot Haiku after I changed IDE back to AHCI in the BIOS. I can only boot up just past the middle icon before KDL comes up. Ubuntu and grub seem to only recognise Haiku boot code if the disk boots in AHCI but then that brings in the Haiku bug with AHCI. I reported another bug with AHCI. It might be related: bug #8647. It was reported 14 months ago and nothing has been done. There were quite a few reporting the same problem. Marcusoverhagen says he has no time or hardware to work on it. Any possibility of someone else working on it?

comment:7 Changed 6 years ago by diver

You should be able to get it to boot in IDE mode. Try to Init the drive with Intel Partition Map from DriveSetup and reinstall. Try installing BootManager for testing purpose.

comment:8 Changed 6 years ago by HAL

I did reinstall. I initialised the hard drive with Intel partition map then formatted the drive partition with bfs. At the end of installation the installer said it had written the boot sector. I rebooted, it still won't boot in IDE. The message says, "Missing bootmanager. Press ctrl alt del". I can boot Haiku using the CD and pressing the space key, to choose the boot drive" The message saying "missing boot manager" means it wants the Haiku bootman? I have started before to install bootman but it only supports booting partitions on one hd. If bootman can be chain loaded from grub I might try that. It seems strange that I might need a bootmanager just for a single OS. .

comment:9 Changed 6 years ago by starsseed

Cc: starsseed@… added
Component: Drivers/DiskPartitioning Systems/Intel
Owner: changed from nobody to bonefish

The haiku's installer wrote the partition boot record, however it never touches the MBR. When you (re)installed an intel partition map on your disk, the disk manager didn't wrote the "MBR Boot code" because the firsts sectors of your disk were not completely blank. (we don't want to overwrite an existing one if any)

it seems that your MBR boot code is a M$Mindows specific one, and you need a standard one to be able to boot Haiku. You can find a small tool here (here) http://starsseed.free.fr/fixmbr.zip

alternatively, You can copy the Haiku's MBR from the anyboot image with a command like:

dd if=/anyboot.img of=/dev/disk/usb/…/…/raw bs=440 count=1

NB : adapt the « if » and « of » parameter to your file/drives.

PS : your partition must be flagged "active" in the partition table because the MBR boot code need to know where is the bootable volume.

comment:10 in reply to:  9 ; Changed 6 years ago by HAL

Replying to starsseed:

The haiku's installer wrote the partition boot record, however it never touches the MBR. When you (re)installed an intel partition map on your disk, the disk manager didn't wrote the "MBR Boot code" because the firsts sectors of your disk were not completely blank. (we don't want to overwrite an existing one if any)

it seems that your MBR boot code is a M$Mindows specific one, and you need a standard one to be able to boot Haiku. You can find a small tool here (here) http://starsseed.free.fr/fixmbr.zip

I tried that. It functioned without giving any errors but when I rebooted into the Haiku partition it gave a different error from before: "Invalid signature"

alternatively, You can copy the Haiku's MBR from the anyboot image with a command like:

dd if=/anyboot.img of=/dev/disk/usb/…/…/raw bs=440 count=1

NB : adapt the « if » and « of » parameter to your file/drives.

I trired that command aswell, it gave the same error.

PS : your partition must be flagged "active" in the partition table because the MBR boot code need to know where is the bootable volume.

In DriveSetup the Haiku partition is marked as active. Anyway thanks for the help. ps: I used Mint Linux before when I wrote the Haiku entry into the grub menu. I did this with the file /etc/grubd/40_custom. The entry I put in there was: menuentry "Haiku { set root=(hd2,1) chainloader +1 }

This is the path to the disk and partition in DriveSetup: /dev/disk/ata/2/slave/raw and /dev/disk/ata/2/slave/0 In gparted it is /dev/sdc1

comment:11 in reply to:  10 ; Changed 6 years ago by starsseed

depending on your grub version ( before grub 1.99 )

/dev/sdc1

may correspond to

menuentry "Haiku { set root=(hd2,0) chainloader +1 }

comment:12 in reply to:  11 Changed 6 years ago by HAL

Replying to starsseed:

depending on your grub version ( before grub 1.99 )

/dev/sdc1

may correspond to

menuentry "Haiku { set root=(hd2,0) chainloader +1 }

It will definitely be grub2 + I have because the OS is Linux Mint 15 (latest) and the /etc/grubd/40_custom was not used for customizing the menu before 1.99. There is one other thing that might cause the command and your app to go wrong. There was some bad sector that developed over 1 year ago when I was using the drive for Windows 7. It would not boot until I used CHKDSK to repair the disk. So is your program and the command trying to write to the same bad sector part?

comment:13 Changed 6 years ago by HAL

I might try installing to another drive.

comment:14 Changed 6 years ago by HAL

I just got a chance to test logging in with the Haiku menu entry put in automatically from grub in Ubuntu 13.04 instead of manually from Mint 15. It works. I don't know if I did something wrong with the menu entry in Mint or grub in Mint did not put it incorrectly?

comment:15 Changed 6 years ago by HAL

On second thoughts I probably have not put the menu entry in wrong because even doing it with grub in Mint worked when I left the BIOS set to AHCI for SATA, but would still only partially boot before either having long delay at the middle progress icon or crashing, I think because the serial cable to the UPS was left connected. I was hearing a lot of beeping from the UPS. It would absolutely not boot in IDE mode though, with the grub settings in Mint. So these other problems are getting away from the main bug here but just wanted to get some clarification. There is the other Haiku bug which affects booting in AHCI mode, creating a long delay, and probably a bug that belongs with grub and Mint Linux.

comment:16 in reply to:  15 ; Changed 6 years ago by korli

Replying to HAL:

There is the other Haiku bug which affects booting in AHCI mode, creating a long delay, and probably a bug that belongs with grub and Mint Linux.

The Haiku bug might be this one #8647 ? Can we close this one?

comment:17 in reply to:  16 Changed 6 years ago by HAL

Replying to korli:

Replying to HAL:

There is the other Haiku bug which affects booting in AHCI mode, creating a long delay, and probably a bug that belongs with grub and Mint Linux.

The Haiku bug might be this one #8647 ? Can we close this one?

This bug is still present as I mentioned in comment 6.

comment:18 Changed 6 years ago by korli

What is this bug about then? In AHCI mode, AHCI doesn't work correctly with your controller and disks. Or a bootmanager problem in IDE mode? If it's both, then I'd recommend to separate them, mixing bugs isn't productive.

comment:19 Changed 6 years ago by HAL

Yes I did get a bit carried away after comment 4 with the #8647 bug. It does not really belong with my initial report of the bug here. Sorry

comment:20 Changed 6 years ago by kallisti5

Priority: blockerhigh

this one isn't really a blocker as it doesn't affect a large number of users.

comment:21 Changed 6 years ago by HAL

Cannot reproduce this bug anymore with hrev46860. Installed onto hard drive from USB stick booted to haiku desktop, using install app.

comment:22 Changed 5 years ago by luroh

Resolution: fixed
Status: newclosed

Thanks for revisiting, closing as fixed.

Note: See TracTickets for help on using tickets.