bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] preliminary BSD Disklabel support


From: Matt Wilson
Subject: [PATCH] preliminary BSD Disklabel support
Date: Fri, 8 Dec 2000 18:04:15 -0500
User-agent: Mutt/1.2.5i

This is a patch to enable preliminary BSD disklabel support.  I'll
outline some quick issues:

1)  BSD Disklabels often don't reside on sector bounds, and are not a
    multiple of sector size.  Therefore, the ped_device_read function
    as provided as the interface to read devices is a little
    cumbersome to fetch the label (normally they are at offset 64 from
    the start of the disk, and they're 276 bytes long).  This patch
    includes a renaming of ped_device_{seek,read,write} to
    ped_device_{seek,read_write}_sector.  I've added
    ped_device_{seek,read,write} functions that work on normal byte
    counts.

2)  Disk labels can have overlapping partitions.  This is especially
    true for whole disk partitions, but sometimes people even use this
    feature to fake out bootloaders into booting off filesystem types
    they dont know about.  (I.e., someone sets up software RAID 1,
    with disk types set to 0xfd for "raid autodetect", but aboot can't
    cope with that.  They set up an overlapping partition entry for
    exactly the same partition, but with the normal 0x8 "ext2" type.)

3)  Some endian issues may remain.

4)  This patch is *barely* tested.

I've love to get some other eyes looking at this - it's been a 4 hour
hack and I'm sure I'm missing something.

Matt

Attachment: parted-bsd-disklabel-support.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]