Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

English is not my native language, so I apologize.

I want to remove the partition table from my hard drive /dev/sdb and then put it on my disk /dev/sda, but when running the following command:

sudo sfdisk -d /dev/sdb | sed s/sdb/sdc/ > part.sdb

I get this error:

AVISO: ¡GPT (Tabla de partición GUID) detectada en «/dev/sdb»! La utilidad sfdisk no soporta GPT. Use GNU Parted.

ERROR, LITERAL TRANSLATION (real error in english could be very different)

WARNING: GPT (GUID partition table) detected on /dev/sdb!. sfidk utility doesn't support GTP, please use GNU Parted.

I have little linux knowledge, but by reading little by little I'm improving.

Can you help?

Thank you very much!


Hola,

MI ingles no es mi lengua materna, por eso me disculpo.

Deseo Extraer la tabla de particiones de mi disco duro /deb/sdb y luego colocar esta en mi disco /deb/sda, pero al realizar el comando siguiente:

sudo sfdisk -d /dev/sdb | sed s/sdb/sdc/ > part.sdb

AVISO: ¡GPT (Tabla de partición GUID) detectada en «/dev/sdb»! La utilidad sfdisk no soporta GPT. Use GNU Parted.

No puedo realizarla.

MIs conocimientos de linux son pocos, pero leyendo poco a poco he podido.

Me pueden Colaborar?

Muchas gracias!!

share|improve this question
    
Were you ever able to accomplish whatever it is you were trying to accomplish? (Were you just trying to display/list the contents of the GPT on /dev/sdb?) –  irrational John Apr 24 '12 at 22:39

1 Answer 1

Theoretically, you should be able to perform what you want with gdisk (you may need to install it first):

  • Start with sudo gdisk /dev/sdb
  • Choose option b for backup and when prompted for filename, type sdb.part (or whatever you want)
  • Choose option q for quit
  • Restart gdisk with the drive to be overwritten: sudo gdisk /dev/sda
  • Double check that you entered the correct device, next commands will overwrite its partition table
  • Choose option r for recovery
  • Choose option l to load partition table from file, type sdb.part (the name you used with the above backup command)
  • Choose option w to write the partition table (it will verify you really want to do this)

Now, as I mentioned in the beginning, this is how it is supposed to work in theory. In practice, there are three caveats:

  • gdisk is beta software (even the latest 0.8.2 version)
  • Versions of gdisk available in released ubuntu versions are really old: lucid has 0.5.1 and oneiric has 0.6.14. If at all possible, use precise as it has 0.8.1, which is recent, or download latest from gdisk download page.
  • Above instructions may contain mistakes and seriously corrupt your disks! I have not verified they work as intended!

If you decide to go forward despite these warnings: buena suerte y ten mucho cuidado!

share|improve this answer
1  
It can actually be done a bit more easily than this: Starting from the disk whose partition table you want to duplicate, you can type x to get to the experts' menu and then type u to replicate the partition table on another device. You'll need to then enter that device's name. Doing it as you suggested has the advantage, though, that you can double-check the status of the target disk before overwriting its contents. –  Rod Smith May 27 '12 at 0:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.