Sfdisk importation failed

Bug #260366 reported by Grummfy
2
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: util-linux

Hello,

I tried to copy partition table from /dev/sda to /dev/sdd with this :
sfdisk -d /dev/sda | sfdisk /dev/sdd and it don't work
So I do this :
sfdisk -d /dev/sda > out.sav
sfdisk /dev/sdd < out.sav
and it fail with this message :
Vérification qu'aucun autre n'utilise le disque en ce moment ...
OK

Disque /dev/sdd: 38913 cylindres, 255 têtes, 63 secteurs/piste
Vieille situation:
Unités= cylindres de 8225280 octets, blocs de 1024 octets, décompte à partir de 0

   Périph Amor Début Fin #cyls #blocs Id Système
/dev/sdd1 0 - 0 0 0 Vide
/dev/sdd2 0 - 0 0 0 Vide
/dev/sdd3 0 - 0 0 0 Vide
/dev/sdd4 0 - 0 0 0 Vide
AVERTISSEMENT: début de partition corrompu (auparavant 434108431)

sfdisk: entrée erronée

in sfdisk -d /dev/sda I had this :
# table de partitions de /dev/sda
unit: sectors

/dev/sda1 : start= 63, size= 16771797, Id= b
/dev/sda2 : start= 0, size= 0, Id= 0
/dev/sda3 : start= 16771860, size=569327535, Id= 5
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=289394910, size=144713520, Id=83
/dev/sda6 : start=434108493, size=151990902, Id=83
/dev/sda7 : start= 16771986, size=272622924, Id=83

To make this working I modified out.sav and change /dev/sda7 :
# table de partitions de /dev/sda
unit: sectors

/dev/sda1 : start= 63, size= 16771797, Id= b
/dev/sda2 : start= 0, size= 0, Id= 0
/dev/sda3 : start= 16771860, size=569327535, Id= 5
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start= 16771986, size=272622924, Id=83
/dev/sda6 : start=289394910, size=144713520, Id=83
/dev/sda7 : start=434108493, size=151990902, Id=83

note :
- the two disk are different (300 Gb et 320 Gb)
- i use Ubuntu 8.04 - Hardy Heron
- kernel : 2.6.24-19-generic
- util-linux : 2.13.1-5ubuntu2

Grummfy (grummfy)
description: updated
Revision history for this message
Phillip Susi (psusi) wrote :

I believe this has been fixed. Now sfdisk complains about the out of order partitions, but suggests using --force to proceed anyway, which works.

Changed in util-linux (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.