Opened 18 years ago

Closed 17 years ago

#1266 closed bug (fixed)

Unrecognised Partition Table errors

Reported by: euan Owned by: bonefish
Priority: normal Milestone: R1/alpha1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Haiku doesn't seem to see the other partitons (one Ext3, the other fat32) on my disk.

Partition Table: check for partitioning_system: Intel Extended Partition intel: ep_identify_partition(2, 32777740800, 1571028480, 512) check for partitioning_system: Apple Partition Map * scan child 0x001077a8 (start = 34348769280, size = 6820208640, parent = 0x00107440)! Partition::Scan() check for partitioning_system: Amiga Partition Map check for partitioning_system: Intel Partition Map intel: pm_identify_partition(2, 1079208: 34348769280, 6820208640, 512) Partition::SetTo(): active: c3 intel: _ParsePrimary(): partition 0: bad location, ignoring Partition::SetTo(): active: ad intel: _ParsePrimary(): partition 1: bad location, ignoring Partition::SetTo(): active: 69 intel: _ParsePrimary(): partition 2: bad location, ignoring Partition::SetTo(): active: 79 intel: _ParsePrimary(): partition 3: bad location, ignoring check for partitioning_system: Intel Extended Partition intel: ep_identify_partition(2, 34348769280, 6820208640, 512)

Partition Table for /dev/hda (cfdisk in linux)

        ---Starting---      ----Ending----    Start     Number of
 # Flags Head Sect Cyl   ID  Head Sect Cyl     Sector    Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
 1  0x80    1    1    0 0x83  254   63  504          63     8112762
 2  0x00  254   63 1023 0x0F  254   63 1023    61448625    78445395
 3  0x00  254   63 1023 0xEB  254   63 1023   139894020    11100915
 4  0x00    0    0    0 0x00    0    0    0           0           0
 5  0x00  254   63 1023 0x83  254   63 1023          63    62926542
 6  0x00  254   63 1023 0x82  254   63 1023          63     4096512
 7  0x00  254   63 1023 0x0B  254   63 1023          63    11422152

Partition Table for /dev/hda

              First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0     8112824     63     8112825 Linux (83)           Boot
  Pri/Log     8112825    61448624      0    53335800 Free Space           None
 2 Primary    61448625   139894019      0    78445395 W95 Ext'd (LBA) (0F) None
 5 Logical    61448625   124375229     63    62926605 Linux (83)           None
 6 Logical   124375230   128471804     63     4096575 Linux swap / So (82) None
 7 Logical   128471805   139894019     63    11422215 W95 FAT32 (0B)       None
 3 Primary   139894020   150994934      0    11100915 BeOS fs (EB)         None
  Primary   150994935   156296384      0     5301450 Free Space           None

Attachments (4)

syslog.log (67.5 KB ) - added by euan 18 years ago.
Syslog
mbr (512 bytes ) - added by euan 18 years ago.
Raw MBR
extradebug.log (96.2 KB ) - added by euan 18 years ago.
Extra debugging syslog
fatTest (63.2 KB ) - added by euan 17 years ago.
Syslog of R22233 on Euans PC

Download all attachments as: .zip

Change History (16)

comment:1 by bonefish, 18 years ago

Can you please provide a full syslog; the part you provided is saying very little. Also appreciated would be hex dump of the disk's first block.

by euan, 18 years ago

Attachment: syslog.log added

Syslog

by euan, 18 years ago

Attachment: mbr added

Raw MBR

comment:2 by euan, 18 years ago

Sorry, posted linux info from wrong HD, must have been past my bedtime last night...

Disk is 40GB. (41174138880 bytes)

Partition Table for /dev/hda

         ---Starting---      ----Ending----    Start     Number of
 # Flags Head Sect Cyl   ID  Head Sect Cyl     Sector    Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
 1  0x80    1    1    0 0xEB   15   63 1023          63     3068352
 2  0x00   15   63 1023 0x83   15   63 1023     3068415    60950610
 3  0x00   15   63 1023 0x06   15   63 1023    64019025     3068415
 4  0x00    0    0    0 0x00    0    0    0           0           0

Partition Table for /dev/hda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0     3068414*    63     3068415*BeOS fs (EB)         Boot
 2 Primary     3068415*   64019024*     0    60950610*Linux (83)           None
 3 Primary    64019025*   67087439      0     3068415*FAT16 (06)           None
   Pri/Log    67087440    80418239      0    13330800 Free Space           None

Disk Drive: /dev/hda
Sector 0:
0x000: EB 48 90 8E D0 89 C4 EA 60 7D 00 00 0D 54 6F 6F
0x010: 20 6D 61 6E 79 20 72 65 61 64 20 65 72 72 6F 72
0x020: 73 2E 00 0D 42 6F 6F 74 20 4D 61 6E 61 67 65 72
0x030: 20 73 69 67 6E 61 74 75 72 65 20 6E 6F 74 03 02
0x040: FF 00 00 20 01 00 00 00 00 02 FA 90 90 F6 C2 80
0x050: 75 02 B2 80 EA 59 7C 00 00 31 C0 8E D8 8E D0 BC
0x060: 00 20 FB A0 40 7C 3C FF 74 02 88 C2 52 BE 7F 7D
0x070: E8 34 01 F6 C2 80 74 54 B4 41 BB AA 55 CD 13 5A
0x080: 52 72 49 81 FB 55 AA 75 43 A0 41 7C 84 C0 75 05
0x090: 83 E1 01 74 37 66 8B 4C 10 BE 05 7C C6 44 FF 01
0x0A0: 66 8B 1E 44 7C C7 04 10 00 C7 44 02 01 00 66 89
0x0B0: 5C 08 C7 44 06 00 70 66 31 C0 89 44 04 66 89 44
0x0C0: 0C B4 42 CD 13 72 05 BB 00 70 EB 7D B4 08 CD 13
0x0D0: 73 0A F6 C2 80 0F 84 EA 00 E9 8D 00 BE 05 7C C6
0x0E0: 44 FF 00 66 31 C0 88 F0 40 66 89 44 04 31 D2 88
0x0F0: CA C1 E2 02 88 E8 88 F4 40 89 44 08 31 C0 88 D0
0x100: C0 E8 02 66 89 04 66 A1 44 7C 66 31 D2 66 F7 34
0x110: 88 54 0A 66 31 D2 66 F7 74 04 88 54 0B 89 44 0C
0x120: 3B 44 08 7D 3C 8A 54 0D C0 E2 06 8A 4C 0A FE C1
0x130: 08 D1 8A 6C 0C 5A 8A 74 0B BB 00 70 8E C3 31 DB
0x140: B8 01 02 CD 13 72 2A 8C C3 8E 06 48 7C 60 1E B9
0x150: 00 01 8E DB 31 F6 31 FF FC F3 A5 1F 61 FF 26 42
0x160: 7C BE 85 7D E8 40 00 EB 0E BE 8A 7D E8 38 00 EB
0x170: 06 BE 94 7D E8 30 00 BE 99 7D E8 2A 00 EB FE 47
0x180: 52 55 42 20 00 47 65 6F 6D 00 48 61 72 64 20 44
0x190: 69 73 6B 00 52 65 61 64 00 20 45 72 72 6F 72 00
0x1A0: BB 01 00 B4 0E CD 10 AC 3C 00 75 F4 C3 00 00 00
0x1B0: 00 00 00 00 00 00 00 00 3D 7F 05 00 00 00 80 01
0x1C0: 01 00 EB 0F FF FF 3F 00 00 00 C0 D1 2E 00 00 0F
0x1D0: FF FF 83 0F FF FF FF D1 2E 00 52 08 A2 03 00 0F
0x1E0: FF FF 06 0F FF FF 51 DA D0 03 FF D1 2E 00 00 00
0x1F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

syslog and MBR files attached

comment:3 by bonefish, 18 years ago

The partitions are found OK. We don't have any ext2/ext3 file system support ATM; so it's little surprising that you can't mount it. I don't have particular insight regarding the state of the auto-recognition of our DOS FS add-on, but it seems to be implemented at least.

Anyway, please check whether there are partitions entries published in "/dev/disk/atapi/1/slave/". If that is the case, please try to mount the FAT partition manually. If it is not the case, please enable debug output in src/system/kernel/disk_device_manager/jobs/KScanPartitionJob.cpp ("#define DBG(x) x" instead of the definition there).

comment:4 by euan, 18 years ago

I'm guessing there won't be anything in "/dev/disk/atapi/1/slave/" unless I put a CDROM in the drive. I'll have a look tonight. Thanks for the help, it would speed up my testing 100 fold if I could get a fat partition mountable.

When I look in "/dev/disk/ata/0/master" there is only the Haiku partitions visible. Shouldn't all partitions detected be visible in this folder whether they are mounted or not?

Euan

comment:5 by bonefish, 18 years ago

Ah, sorry, I meant /dev/disk/ata/0/master/, if that is your HD. And yeah, all partitions should be published, whether they are recognized or not. Please enable the debug output in KScanPartitionJob.cpp then. And maybe also in src/system/kernel/fs/devfs.cpp.

by euan, 18 years ago

Attachment: extradebug.log added

Extra debugging syslog

comment:6 by axeld, 17 years ago

Component: File SystemsSystem/Kernel
Owner: changed from axeld to bonefish

comment:7 by bonefish, 17 years ago

Why you don't see all entries in /dev/disk/ata/0/master/ is a mystery. According to the log, the devfs successfully publishes entries "0", "1", "2", and "3". Since scanning the partitions works, they definitely are published at that time.

Anyway, it is pretty clear why your FAT partition was not mounted. The initial disk device scan happens before the boot partition is mounted (obviously), and since our dosfs is not built into the boot loader, it won't be recognized at that point. Rescanning after the boot partition has been mounted was not implemented until hrev21655 (you tested with hrev21346), but it was broken anyway. It should be fixed in hrev22198, but I couldn't really test yet. Please verify.

comment:8 by bonefish, 17 years ago

Looks like I missed to commit something. The revision where should be fixed is hrev22201.

comment:9 by bonefish, 17 years ago

Milestone: R1R1/alpha

Any news?

comment:10 by euan, 17 years ago

Apologies I haven't been able to build haiku for a few weeks on linux due to several hardware changes. Was trying today to fix linux to test sata and this bug, but it didn't get far enough. Gimme a few more days if I don't get back to you later tonight, pretty please. :)

comment:11 by euan, 17 years ago

Tested with hrev22233

Fat partition is now mountable, but attempting to write to it ended in error due to the write_bad_block problem that is subsequently fixed in recent commits. I can't update as SVN appears to be down. So it appears to be fixed. Syslog attached (fatTest.log)

by euan, 17 years ago

Attachment: fatTest added

Syslog of R22233 on Euans PC

comment:12 by bonefish, 17 years ago

Resolution: fixed
Status: newclosed

Thanks for the update. I close this ticket then. If the FAT FS problem persists with a current revision, please open a new ticket.

Note: See TracTickets for help on using tickets.