You are not logged in.

#1 2012-09-15 12:19:20

bjackman
Member
Registered: 2011-12-27
Posts: 32

An interesting error: "recursive partition table"

So I just found an old 8 Gb SD card I had forgotten about (and was overjoyed because I had just said "if only I had a bigger SD card". Why do good things happen to bad people?). Several months ago I'd used some Windows tool, I think, to make a live USB for ArchBang, which hadn't worked. I put it in my computer and ran `fdisk -l` and got this:

# fdisk -l

[...]

Disk /dev/sdd: 7948 MB, 7948206080 bytes
64 heads, 32 sectors/track, 7580 cylinders, total 15523840 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
Disk identifier: 0x0c7e5ddb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           0     1003519      501760   17  Hidden HPFS/NTFS

Disk /dev/sdd1: 513 MB, 513802240 bytes
64 heads, 32 sectors/track, 490 cylinders, total 1003520 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
Disk identifier: 0x0c7e5ddb

     Device Boot      Start         End      Blocks   Id  System
/dev/sdd1p1   *           0     1003519      501760   17  Hidden HPFS/NTFS

When I ran gparted (a graphical partition editor), it threw up "Invalid partition table: recursive partition on /dev/sdd". Gparted then treats the disk as unformatted, which is presumably its "fallback" behaviour.

This isn't actually a problem for me as I don't need any of the data on the card, but I thought it was a pretty interesting error, so I'd post it here for discussion. I can't work out what's going on, but it seems to me that someething is seriously bawsled up here! Perhaps there was a bug in the library the Windows utility used? I haven't found anything similar online, although this was interesting.

Today may be a day for me to read up on partition tables and the heads/disks/cylinders/sectors/tracks abstractions!

Offline

#2 2012-12-23 13:02:34

deepsoul
Member
From: Earth
Registered: 2012-12-23
Posts: 67
Website

Re: An interesting error: "recursive partition table"

I'm sure you have figured it out yourself by now - The first partition starts at sector 0, so it includes the MBR and the partition table that contains itself.  This makes it look like an extended partition recursively containing itself.

Whatever tool you used to create it omitted the most basic sanity checks.


Officer, I had to drive home - I was way too drunk to teleport!

Offline

#3 2012-12-23 16:59:11

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

Re: An interesting error: "recursive partition table"

I get the same result when using dd to write the archlinux installer image to usb. It's nothing really. it can easily have a new partition table made with gparted. It's likely the tool you used in Windows also wrote the bootable image with a low level utility similar to dd. dd generally starts at the very beginning of a disk when pointed at the device and not a partition number. /dev/sdb instead of /dev/sdb1. Meaning it overwrites the first 512byte sector too(mbr) With whatever the image/ISO contains. I've never regarded it as an issue. Just kinda confusing to tools that expect data like a partition table to be present in a normal structure.


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

Board footer

Powered by FluxBB