Score:0

Partitioning new HDD Ububtu 18.04

tr flag

I'm formatting a new 1TB HDD with a single dos partition; sdb1.

Typing sudo e2fsck -f /dev/sdb1:

$ sudo e2fsck -f /dev/sdb1

e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1

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>

I have a single partition, no extended partitions. I'm not sure what this message refers to. I have tried a variety of suggestions without success.

Is there an error or does this refer only to (nonexistent) extended partitions? Should I ignore this and continue and expand the space using resize2fs?

Nmath avatar
ng flag
Does this answer your question? [Terminal method of formatting storage drive](https://askubuntu.com/questions/517354/terminal-method-of-formatting-storage-drive) - The command you are using does not format hard drives or create partitions.
David avatar
cn flag
e2fsck is used to check the ext2/ext3/ext4 family of file systems, key word CHECK not create.
Score:1
in flag

To format a disk as ext4 (the default for Ubuntu), you could do it like this:

sudo mkfs -t ext4 /dev/sdb1

The e2fsck command is used to check partitions for errors. As there is no valid partition to check, there is technically an error.

tr flag
Thank you! I tried to expand the fs space but got... $ sudo resize2fs /dev/sdb resize2fs 1.44.1 (24-Mar-2018) resize2fs: Bad magic number in super-block while trying to open /dev/sdb Couldn't find valid filesystem superblock.
tr flag
But trying your suggestion... mke2fs 1.44.1 Creating filesystem with 244190390 4k blocks and 61054976 inodes Filesystem UUID: 0adb5d57-2325-40b1-8589-f92f70cf4ff4 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848 Allocating group tables: done Writing inode tables: done Creating journal (262144 blocks): done Writing superblocks and filesystem accounting information: done
tr flag
then sudo fdisk --list...and there it is! Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 1953525167 1953523120 931.5G 83 Linux
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.