Skip to content
Snippets Groups Projects
  • Glauber Costa's avatar
    716ad81d
    imgedit: extend image editing script to deal with partitions · 716ad81d
    Glauber Costa authored
    Given a partition size and start address, this will edit the image passed as parameter
    to create a partition entry. This assumes the disk is always bigger than 8Gb while setting
    the CHS address. From osdev wiki:
    
    "For drives smaller than 8GB, the LBA fields and the CHS fields must "match"
     when the values are converted into the other format.  For drives bigger than
     8GB, generally the CHS fields are set to Cylinder = 1023, Head = 254 or 255,
     Sector = 63 -- which is considered an invalid setting."
    716ad81d
    History
    imgedit: extend image editing script to deal with partitions
    Glauber Costa authored
    Given a partition size and start address, this will edit the image passed as parameter
    to create a partition entry. This assumes the disk is always bigger than 8Gb while setting
    the CHS address. From osdev wiki:
    
    "For drives smaller than 8GB, the LBA fields and the CHS fields must "match"
     when the values are converted into the other format.  For drives bigger than
     8GB, generally the CHS fields are set to Cylinder = 1023, Head = 254 or 255,
     Sector = 63 -- which is considered an invalid setting."