0

I am attempting to reformat a drive. Was originally formatted for Solaris with a ZFS filesystem. I am reformatting for my Linux (debian).

I used fdisk to remove all existing partitions. Both fdisk and cfdisk hang when trying to create the new partitions.

fdisk -l

Disk /dev/sdb: 68.4 GiB, 73407865856 bytes, 143374738 sectors
Disk model: ST973402SSUN72G 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DB83FA41-8BEC-C84A-9DF1-8EC1CCDB776F

fdisk /dev/sdb

Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition number (1-9, default 1): 

(hit enter, hang)

cfdisk /dev/sdb

                                    Disk: /dev/sdb
                           Size: 68.4 GiB, 73407865856 bytes, 143374738 sectors
                       Label: gpt, identifier: DB83FA41-8BEC-C84A-9DF1-8EC1CCDB776F

    Device                      Start               End           Sectors          Size Type
>>  Free space                   2048         143374704         143372657         68.4G                   


                  May be followed by M for MiB, G for GiB, T for TiB, or S for sectors.

(hit enter on partition size, hang)

fsck /dev/sdb

fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

Found a gpt partition table in /dev/sdb

Why does it hang? What am I doing wrong?

3
  • Does the output of dmesg yield any ATA/SCSI or I/O errors? Oct 7 '20 at 14:23
  • Yes, check dmesg for any useful information. And be prepared to accept that this antique drive is probably at the end of its life. Oct 7 '20 at 14:25
  • @MatthewIfe There were no errors in dmesg. Re-creating the (supposedly already existing) empty GPT partition table corrected the problem.
    – Dorothy
    Oct 7 '20 at 14:40
0

I used fdisk g command to create a new empty GPT partition table. The new partition command worked after that. Not sure why this was needed since the disk was already labeled as a Disklabel type: gpt. But it worked after that.

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.