0

I have a USB stick which I recently used to dd an iso to it so that I could use that stick as a booting drive. Now, I would like to store regular files there.

When using parted I constantly get this message:

Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table? Yes/No? yes

Error: Both the primary and backup GPT tables are corrupt. Try making a fresh table, and using Parted's rescue feature to recover partitions.

I am searching for how can I make a fresh table with parted but I cannot find it. I would like to remove everything in that drive, create just one partition and use ext4 file system to be able to store files. Is that not possible with GNU parted?

2

2 Answers 2

0

The command you are looking for is mklabel. From the gparted help menu:

mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)

To create an MBR/msdos partition table, at the (parted) prompt, just use:

(parted) mklabel msdos
0

I don't know if such an option exists in parted, but at least you can zero the GPT headers by using dd if=/dev/zero of=/dev/sdX bs=1M, where sdX is the device name for the USB stick. This will write zeroes to first 1MB of the USB stick, after which you should be able to use parted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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