mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: markk@clara.co.uk, Andrew Morton <akpm@linux-foundation.org>,
	bugme-daemon@bugzilla.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Bug 37682] New: Kernel mis-detects size/position of partition created with Seagate DiscWizard (OnTrack Disk Manager)
Date: Sat, 18 Jun 2011 16:34:53 +0200	[thread overview]
Message-ID: <201106181634.53503.arnd@arndb.de> (raw)
In-Reply-To: <1308393501.23584.27.camel@x61.thuisdomein>

On Saturday 18 June 2011 12:38:21 Paul Bolle wrote:
> Perhaps this means one is expected to use dmsetup(8) for this. I have
> never configured device-mapper at that level by hand. man 8 dmsetup is
> over 300 lines of (new for me) information. Without a disk like yours at
> hand, it's hard to say whether device-mapper allows to do stuff like
> this (ie, remapping an entire drive by 63 sectors) by hand.
> 
> Of course, for your particular drive it might be easier to just dd the
> actual partition (so skipping 63 sectors) into new file (a 20G image) on
> another drive. That image should be loop mountable. If that's correct
> you could then do with the drive as you please. Given its age, it may be
> wise to, say, shred(1) its corresponding device and drop the drive at
> your local recycling site.

You can also create a "correct" partition table to replace the old
one and directly point to the FAT partition:

# fdisk -c -u -C2435 -H255 -S 63 /dev/sdX

Command (m for help): p

Disk /dev/sdX: 0 MB, 0 bytes
255 heads, 63 sectors/track, 2434 cylinders, total 0 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: 0x00000000

  Device Boot      Start         End      Blocks   Id  System
/dev/sdX   *           9    16434494     8217243   54  OnTrackDM6

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (1-39118274, default 1): ?
First sector (1-39118274, default 1): 126
Last sector, +sectors or +size{K,M,G} (126-39118274, default 39118274): +39102147

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

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: 0x00000000

  Device Boot      Start         End      Blocks   Id  System
/dev/sdX   *         126    39102273    19551074    c  W95 FAT32 (LBA)


Command (m for help): w
The partition table has been altered!


WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

      reply	other threads:[~2011-06-18 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-37682-10286@https.bugzilla.kernel.org/>
2011-06-17 21:31 ` [Bugme-new] " Andrew Morton
2011-06-18  1:01   ` Paul Bolle
2011-06-18  1:16   ` Paul Bolle
2011-06-18  8:51     ` markk
2011-06-18 10:38       ` Paul Bolle
2011-06-18 14:34         ` Arnd Bergmann [this message]

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=201106181634.53503.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markk@clara.co.uk \
    --cc=pebolle@tiscali.nl \
    /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

Powered by JetHome