Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is the output of fdisk:

[root@ns1 ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         268     2048287+  82  Linux swap / Solaris
/dev/sda3             269        2611    18818810   83  Linux

But when I'm trying to use e2label I'm receiving the following results:

[root@ns1 ~]# e2label /dev/sda
e2label: Bad magic number in super-block while trying to open /dev/sda
Couldn't find valid filesystem superblock.
[root@ns1 ~]# e2label /dev/sda1
/boot
[root@ns1 ~]# e2label /dev/sda2
e2label: Bad magic number in super-block while trying to open /dev/sda2
Couldn't find valid filesystem superblock.
[root@ns1 ~]# e2label /dev/sda3
/

What does that error mean? (in sda & sda2)

share|improve this question

2 Answers 2

up vote 1 down vote accepted

/dev/sda is the entire disc, the physical device which contains the partitions /dev/sda[123], so there's no file system to have an e2label on it.

Similarly, /dev/sda2 is a swap partition, which therefore doesn't have a file system (it's formatted as swap), so it, too, cannot be read by e2label.

share|improve this answer
    
so everything is alright? thanks –  User Jan 9 '13 at 14:21
    
It certainly looks so to me! –  MadHatter Jan 9 '13 at 14:25
e2label - Change the label on an ext2 filesystem  

/dev/sda2 is listed as swap and is not an ext partition. Since e2label works on ext filesystem types, you can't label this partition.

/dev/sda is not a partition, it is the entire disk.

share|improve this answer

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.