1

Using the Linux Mint live disk (graphical).

Need to install Mint to an SSD. The drive has an ISO already burned to it (in first partition, 2.2GB), with another partition after it. The second partition is 10 MB ISO 9660 Joliet (CD image). I don't know where the second partition came from.

I tried to erase both partitions with the Disks application. Both failed with this error:

Error deleting partition /dev/sda2: Failed to read partition table on device '/dev/sda/' (Can't have overlapping partitions.) (udisks-error-quark, 0)

I cannot do anything to these partitions. Reformatting fails. Everything fails.

Fix tried:

I tried using sfdisk but the utility is horrendous. Someone else had this issue, so I read their solution. It says to use sudo sfdisk --force /dev/sda2 </some/file/to/copy. But I do not have a file that I want to copy. I just want to erase the disk. The fact that this is difficult in Linux is funny to say the least.

Here's what sfdisk did after sudo sfdisk --force /dev/sda2:

Changes will remain in memory only, until you decide to write them. Be careful before using the write command.

Checking tha tno-one is using this disk right now ... FAILED

This disk is currently in use........etc

Disk /dev/sda2: 9.8 MiB, ......etc
Alignment offset: 2048 bytes

sfdisk is going to create a new 'dos' disk label. Use 'label: <name>' before you define a first partition to override the default.

Type 'help' to get more information.

>>> 

The >>> is a prompt asking for commands. The commands are irrelevant to me. Using the help command shows a bunch of useless commands. The write command did nothing. The help page keeps making references to 'situations' which literally means jack nothing to me. This tool is completely oblivious to the standard terminology in the field and is undiscoverable, and is therefore useless.

Not using dd

I do not want to use dd to overwrite the problem area on this disk with another disk's contents, because it will copy the partition table and partitions, which may put the disk in an even more unusable state. I cannot dd a random file, either, since I need a large file size, and Live disks do not have large files.

1 Answer 1

2

Instructions from here worked for deleting the partition table (partitions were untouched, but are useless without a partition table).

Inspect

Use wipefs to inspect the partition table:

sudo wipefs /dev/sda
DEVICE  OFFSET       TYPE     UUID           LABEL
sda     0x8001       iso9660  2019-04-25...  Fedora-SB-ostree-x86-x86_64-30
sda     0x200        gpt
sda     0x1dcf855e00 gpt
sda     0x1fe        PMBR

Delete

Then delete the partition table (all of them):

sudo wipefs -a -f /dev/sda
/dev/sda: 5 bytes were erased at offset...(iso9660)...
/dev/sda: 8 bytes were erased at offset...(gpt)...
/dev/sda: 8 bytes were erased at offset...(gpt)...
/dev/sda: 2 bytes were erased at offset...(PMBR)...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .