9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "ibrahim via 9fans" <9fans@9fans.net>
To: 9fans <9fans@9fans.net>
Subject: [9fans] bug report : disk/fdisk
Date: Sat, 10 Jun 2023 10:51:44 -0400	[thread overview]
Message-ID: <16864087040.35AF.257747@composer.9fans.topicbox.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

After creating an image file with :

dd
disk/mbr
disk/fdisk
disk/prep

the resulting partition table in the mbr  is buggy :

the chs values in the mbr are incompatible with bios.

bios uses the formula (c*H+h)*S+s-1 to calculate the lba values with H=256, S=63 while c (cylinder), h(head), s(sector) are the values from chs entries in the mbr partition table.

disk/fdisk uses the same formula while setting H=64, S=32.

If you write this image to real Hardware (HDD, USB-Sticks) some bios won't boot from such media especially if your boot drive has a size less than 8GB cause for media with sizes less than this size some bios'es use CHS addressing and some verify that sector id's from chs and lba are equal.


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T2298f52fc324cff9-Mb36b2ccec84dc4eb9d0a8c21
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1724 bytes --]

                 reply	other threads:[~2023-06-10 14:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16864087040.35AF.257747@composer.9fans.topicbox.com \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).