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)

by jonas.kirilla, 10 years ago

Attachment: serial.txt added

by jonas.kirilla, 10 years ago

Attachment: beos_listdev.txt added

by jonas.kirilla, 10 years ago

Attachment: beos_idestatus.txt added

by jonas.kirilla, 10 years ago

Attachment: beos_idestatus.2.txt added

by jonas.kirilla, 10 years ago

Attachment: beos_ideinfo.txt added

by jonas.kirilla, 10 years ago

Attachment: serial_r32000_IDE.txt added

by jonas.kirilla, 10 years ago

by jonas.kirilla, 10 years ago

by jonas.kirilla, 10 years ago

by jonas.kirilla, 10 years ago

comment:1 by mmlr, 10 years ago

Owner: changed from axeld to mmlr
Status: newassigned

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

by jonas.kirilla, 10 years ago

Attachment: serial_r32617_ATA.txt added

comment:2 by jonas.kirilla, 10 years ago

Done! New serial output.

comment:3 by mmlr, 10 years ago

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

by jonas.kirilla, 10 years ago

Attachment: serial_r32644.txt added

comment:4 by jonas.kirilla, 10 years ago

Serial from hrev32644 added.

comment:5 by aldeck, 10 years ago

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

comment:6 by jonas.kirilla, 10 years ago

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

comment:7 by marcusoverhagen, 10 years ago

Cc: marcusoverhagen added

comment:8 by marcusoverhagen, 10 years ago

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 by marcusoverhagen, 10 years ago

Milestone: R1R1/alpha1
Priority: normalhigh

comment:10 by mmlr, 10 years ago

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 by marcusoverhagen, 10 years ago

Can you please test the selection_patch.diff ? thanks.

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

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 by nielx, 10 years ago

Cc: nielx added

by marcusoverhagen, 10 years ago

Attachment: selection_patch2.diff added

reworked device selection patch

comment:14 by marcusoverhagen, 10 years ago

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

Please test.

by jonas.kirilla, 10 years ago

comment:15 by jonas.kirilla, 10 years ago

FWIW, it works! Syslog attached.

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

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 by jonas.kirilla, 10 years ago

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 by marcusoverhagen, 10 years ago

Please test hrev32770 now. (without the patch)

comment:19 by bbjimmy, 10 years ago

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 by umccullough, 10 years ago

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

by bbjimmy, 10 years ago

Attachment: screenshot3.png added

The disk with the extended partitions.

by bbjimmy, 10 years ago

Attachment: screenshot1.jpg added

same system seen from hrev32814

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

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 by umccullough, 10 years ago

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

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

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.

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

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 by marcusoverhagen, 10 years ago

please try hrev32978 from trunk

comment:26 by jonas.kirilla, 10 years ago

Will do soon. (hrev32959 works)

comment:27 by jonas.kirilla, 10 years ago

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

comment:28 by marcusoverhagen, 10 years ago

Resolution: fixed
Status: assignedclosed

comment:29 by jonas.kirilla, 10 years ago

Thanks Marcus!

Note: See TracTickets for help on using tickets.