Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4308 closed bug (fixed)

ATA finds no boot partition

Reported by: jonas.kirilla Owned by: mmlr
Priority: high Milestone: R1/alpha1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc: marcusoverhagen, nielx
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

After the switch to ATA I can't boot http://haiku-files.org/raw/haiku-pre-alpha-r32591-raw.zip I tried once without DMA and once with all safe mode options turned on, with the same error.

Attachments (16)

serial.txt (26.2 KB) - added by jonas.kirilla 10 years ago.
beos_listdev.txt (10.3 KB) - added by jonas.kirilla 10 years ago.
beos_idestatus.txt (98 bytes) - added by jonas.kirilla 10 years ago.
beos_idestatus.2.txt (98 bytes) - added by jonas.kirilla 10 years ago.
beos_ideinfo.txt (762 bytes) - added by jonas.kirilla 10 years ago.
serial_r32000_IDE.txt (57.2 KB) - added by jonas.kirilla 10 years ago.
ideinfo_r32000_IDE_ata_0_master_raw.txt (629 bytes) - added by jonas.kirilla 10 years ago.
ideinfo_r32000_IDE_atapi_1_master_raw (655 bytes) - added by jonas.kirilla 10 years ago.
idestatus_r32000_IDE_ata_0_master_raw.txt (74 bytes) - added by jonas.kirilla 10 years ago.
idestatus_r32000_IDE_atapi_1_master_raw.txt (75 bytes) - added by jonas.kirilla 10 years ago.
serial_r32617_ATA.txt (27.9 KB) - added by jonas.kirilla 10 years ago.
serial_r32644.txt (27.3 KB) - added by jonas.kirilla 10 years ago.
selection_patch2.diff (5.6 KB) - added by marcusoverhagen 10 years ago.
reworked device selection patch
syslog_r32730_plus_selection_patch2.txt (59.9 KB) - added by jonas.kirilla 10 years ago.
screenshot3.png (55.5 KB) - added by bbjimmy 10 years ago.
The disk with the extended partitions.
screenshot1.jpg (103.9 KB) - added by bbjimmy 10 years ago.
same system seen from hrev32814

Download all attachments as: .zip

Change History (45)

Changed 10 years ago by jonas.kirilla

Attachment: serial.txt added

Changed 10 years ago by jonas.kirilla

Attachment: beos_listdev.txt added

Changed 10 years ago by jonas.kirilla

Attachment: beos_idestatus.txt added

Changed 10 years ago by jonas.kirilla

Attachment: beos_idestatus.2.txt added

Changed 10 years ago by jonas.kirilla

Attachment: beos_ideinfo.txt added

Changed 10 years ago by jonas.kirilla

Attachment: serial_r32000_IDE.txt added

Changed 10 years ago by jonas.kirilla

Changed 10 years ago by jonas.kirilla

Changed 10 years ago by jonas.kirilla

Changed 10 years ago by jonas.kirilla

comment:1 Changed 10 years ago by mmlr

Owner: changed from axeld to mmlr
Status: newassigned

Can you please try with a revision >= hrev32616 and update the log?

Changed 10 years ago by jonas.kirilla

Attachment: serial_r32617_ATA.txt added

comment:2 Changed 10 years ago by jonas.kirilla

Done! New serial output.

comment:3 Changed 10 years ago by mmlr

I don't really think that hrev32633 makes any difference, but you could still try it and report back if it changes anything.

Changed 10 years ago by jonas.kirilla

Attachment: serial_r32644.txt added

comment:4 Changed 10 years ago by jonas.kirilla

Serial from hrev32644 added.

comment:5 Changed 10 years ago by aldeck

Note the similarity with #4058 (unfortunately i won't be able to do tests until Sep 2)

comment:6 Changed 10 years ago by jonas.kirilla

At least booting a Haiku CD off the ATAPI drive works, but that is probably irrelevant.

comment:7 Changed 10 years ago by marcusoverhagen

Cc: marcusoverhagen added

comment:8 Changed 10 years ago by marcusoverhagen

The IDE syslog indicates that the harddisk is connected as "ata 0 master", I'm assuming this is correct.

According to serial_r32644.txt the ATA stack gets confused and can't select the master (device 0) on bus 0.

439 ata 0 error: device 0 not selected! unused 0x0, mode 0x4, device 1 
440 ata 0: cannot select device 0, assuming not present 
441 ata 0: signature of device 1: 0x0000 
442 ata 0 error: device ready not set 
443 ata 0-1 error: sending identify request failed 

On bus 1, the ATAPI master is properly recognized

453 ata 1: signature of device 0: 0xeb14 
454 ata 1 error: device 1 failed, error code is 0x04 
455 atapi 1-0: using DMA mode 0x12 
456 ata 1: identified ATAPI device 0 

comment:9 Changed 10 years ago by marcusoverhagen

Milestone: R1R1/alpha1
Priority: normalhigh

comment:10 Changed 10 years ago by mmlr

Yes, the problem seems to be that device selection doesn't work. The thing is that I am unsure of the reason. Two things I could imagine: The device/controller is busy, and we must not check for the selected device until it becomes unbusy (I don't have the specs at hand, so can't verify if this is how it works, I just faintly remember something along those lines) or device selection doesn't work by only writing that single byte on the affected controller, i.e. a complete command is necessary (though I'd see this as unlikely). I have cross-verified with the IDE bus_manager, which is not exactly easy, as it works pretty differently, and have seen that it also uses LBA mode for the device selection. So I conclude that's not the problem at hand.

comment:11 Changed 10 years ago by marcusoverhagen

Can you please test the selection_patch.diff ? thanks.

comment:12 in reply to:  11 Changed 10 years ago by mmlr

Replying to marcusoverhagen:

Can you please test the selection_patch.diff ? thanks.

To be honest I find those changes too radical. I really would like to solve this with less guessing and assumptions if at all possible. For example that the controller doesn't give us back device 0 as selected device seems strange to me in any case, and I don't really feel OK with just ignoring that fact by assuming a reset selected device 0.

comment:13 Changed 10 years ago by nielx

Cc: nielx added

Changed 10 years ago by marcusoverhagen

Attachment: selection_patch2.diff added

reworked device selection patch

comment:14 Changed 10 years ago by marcusoverhagen

I modified the patch, device selection is now checked after the device is no longer busy.

Please test.

Changed 10 years ago by jonas.kirilla

comment:15 Changed 10 years ago by jonas.kirilla

FWIW, it works! Syslog attached.

comment:16 in reply to:  15 Changed 10 years ago by mmlr

Replying to jonas.kirilla:

FWIW, it works! Syslog attached.

Cool! Marcus please apply, then. Sadly Alexandre is on vacation, so he can't confirm if it fixes #4058 as well...

comment:17 Changed 10 years ago by jonas.kirilla

No ill effect from the patch as far as I can see on my other box - a sata-based C2Q by Fujitsu/Siemens - where ATA already worked well.

comment:18 Changed 10 years ago by marcusoverhagen

Please test hrev32770 now. (without the patch)

comment:19 Changed 10 years ago by bbjimmy

I seem to have the same issue, but it seems to be caused by Intel extended partitions. If I try to boot from the disk that has the extended partitions, I get a kdl with no boot partition found. If I boot from another drive ( with no extended partitions) it boots ok, but cannot see any partitions on the drive with extended partitions.

comment:20 Changed 10 years ago by umccullough

Perhaps some serial output will help as I have successfully booted Haiku on logical partitions successfully :) (including beyond 137gb range)

Changed 10 years ago by bbjimmy

Attachment: screenshot3.png added

The disk with the extended partitions.

Changed 10 years ago by bbjimmy

Attachment: screenshot1.jpg added

same system seen from hrev32814

comment:21 in reply to:  20 Changed 10 years ago by bbjimmy

Replying to umccullough:

Perhaps some serial output will help as I have successfully booted Haiku on logical partitions successfully :) (including beyond 137gb range)

It would be nice if I had a way of acquiring any serial output. Unfortunately I do not have the tools.

comment:22 Changed 10 years ago by umccullough

You can always hit spacebar prior to boot and use the on-screen debug output with a camera :)

comment:23 in reply to:  19 ; Changed 10 years ago by mmlr

Replying to bbjimmy:

I seem to have the same issue

That's a completely different issue that just happens to have the same end result (as do other errors). Please open and move this into a separate bugreport.

comment:24 in reply to:  23 Changed 10 years ago by bonefish

Replying to mmlr:

Replying to bbjimmy:

I seem to have the same issue

That's a completely different issue that just happens to have the same end result (as do other errors). Please open and move this into a separate bugreport.

... and add a syslog from the system that does boot, but doesn't show the logical partitions.

comment:25 Changed 10 years ago by marcusoverhagen

please try hrev32978 from trunk

comment:26 Changed 10 years ago by jonas.kirilla

Will do soon. (hrev32959 works)

comment:27 Changed 10 years ago by jonas.kirilla

hrev32979/trunk works for HD boot. Tested with two different PCs.

comment:28 Changed 10 years ago by marcusoverhagen

Resolution: fixed
Status: assignedclosed

comment:29 Changed 10 years ago by jonas.kirilla

Thanks Marcus!

Note: See TracTickets for help on using tickets.