Discussion:
Changing the LABEL of an iso9660 file system
Kevin Wilson
2018-09-19 12:31:19 UTC
Permalink
Hello,
I have a USB stick on which I had in the past an Ubunutu installatilon.
When I run "e2label /dev/sdb" I get:

e2label /dev/sdb
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'

Now, I did not need this installation anymore, so I created a single
Linux partition on the USB stick (/dev/sdb1)
with fdisk, and labeled it as sandiskUSB.
When I run:
e2label /dev/sdb1
I get
sandiskUSB

Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?

Tying
e2label /dev/sdb sandiskUSB
does not work, it gives:
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'

Regards,
Kevin
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedorapro
Rick Stevens
2018-09-19 16:27:58 UTC
Permalink
Post by Kevin Wilson
Hello,
I have a USB stick on which I had in the past an Ubunutu installatilon.
e2label /dev/sdb
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'
Now, I did not need this installation anymore, so I created a single
Linux partition on the USB stick (/dev/sdb1)
with fdisk, and labeled it as sandiskUSB.
e2label /dev/sdb1
I get
sandiskUSB
Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?
Tying
e2label /dev/sdb sandiskUSB
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'
You can only use e2label on ext2/3/4 filesystems, not on entire block
devices. Had you formatted /dev/sdb ENTIRELY as an ext2/3/4 filesystem,
you could label it. This is born out by you creating a filesystem
partition via fdisk and being able to label that partition.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ***@alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- If Bill Gates got a dime for every time Windows crashes... -
- ...oh, wait. He does. THAT explains it! -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.org
Rick Stevens
2018-09-19 16:48:22 UTC
Permalink
Post by Rick Stevens
Post by Kevin Wilson
Hello,
I have a USB stick on which I had in the past an Ubunutu installatilon.
e2label /dev/sdb
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'
Now, I did not need this installation anymore, so I created a single
Linux partition on the USB stick (/dev/sdb1)
with fdisk, and labeled it as sandiskUSB.
e2label /dev/sdb1
I get
sandiskUSB
Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?
Tying
e2label /dev/sdb sandiskUSB
e2label: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb contains a iso9660 file system labelled 'Ubuntu-Server 17.04 amd64'
You can only use e2label on ext2/3/4 filesystems, not on entire block
devices. Had you formatted /dev/sdb ENTIRELY as an ext2/3/4 filesystem,
you could label it. This is born out by you creating a filesystem
partition via fdisk and being able to label that partition.
I should also say that, since the subject is "...label of an iso9660
file system", the label for an ISO9660 filesystem is actually a volume
label, set during image creation via the "-V <text>" option of the
xorrisofs command.

Again, "e2label" inserts a label into the partition table and superblock
for ext2|3|4 filesystems, not on the host block device that holds them.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ***@alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- Always remember you're unique, just like everyone else. -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/arch
Tim Seifert via users
2018-09-19 16:28:53 UTC
Permalink
Post by Kevin Wilson
Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?
Sometimes using a series of different tools to prepare drives leaves
you with things you can't change.

You could try writing zeros to the beginning of the drive (several
blocks worth) to blank things out, then repartition and reformat.

_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archive
Samuel Sieb
2018-09-19 18:37:09 UTC
Permalink
Post by Kevin Wilson
Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?
Disks don't have labels, unless the whole disk is a filesystem with no
partition table, which was the case when you wrote the ISO to it. The
partition table doesn't have a label. You're only seeing the existing
label because you're using the wrong tool and it's finding that info in
the unused areas. As Tim said, if you really want to clear it (which is
unnecessary), you could write zeros to the first part of the disk and
then repartition. You will of course lose any existing data on the disk.
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.
Chris Murphy
2018-09-19 21:37:58 UTC
Permalink
Post by Samuel Sieb
Post by Kevin Wilson
Is there a way to change also the lablel of /dev/sdb to be sandiskUSB ?
Disks don't have labels, unless the whole disk is a filesystem with no
partition table, which was the case when you wrote the ISO to it. The
partition table doesn't have a label.
GPT supports partition name (36 UTF-16LE code units).

MBR lacks any naming.
Samuel Sieb
2018-09-19 21:46:56 UTC
Permalink
Post by Samuel Sieb
Disks don't have labels, unless the whole disk is a filesystem with no
partition table, which was the case when you wrote the ISO to it.  The
partition table doesn't have a label.
GPT supports partition name (36 UTF-16LE code units).
MBR lacks any naming.
Yes, *partition* name, not disk name.
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.f
Rick Stevens
2018-09-19 22:57:55 UTC
Permalink
Post by Samuel Sieb
    Disks don't have labels, unless the whole disk is a filesystem
with no
    partition table, which was the case when you wrote the ISO to it. 
The
    partition table doesn't have a label.
GPT supports partition name (36 UTF-16LE code units).
MBR lacks any naming.
Yes, *partition* name, not disk name.
Yup. The OP was talking about using e2label to change the label on an
ISO9660 filesystem, which it cannot do. e2label deals with _filesystem_
labels on ext2, ext3 and ext4 filesystems ONLY.

There is no filesystem label on ISO9660 images, but there IS an
optional "volume" label, which may be set when the ISO image is created.
There may even be a utility that lets you bugger the volume label on an
already-created ISO image file (but ISO images are supposed to be read-
only).

Most commonly used read/write filesystems support filesystem labels.
Ext2|3|4, XFS, BTRFS, NTFS, VFAT and a number of others all do. Some
support longer labels than others (ext2|3|4 allows up to 16 characters,
XFS only 12, etc.).

Raw disks don't have labels. MBR partition tables do not support
_partition_ labels. GPT partition tables DO support partition labels and
one should note that GPT _partition_ labels are separate from any
_filesystem_ labels applied to filesystems on those partitions. Here's
an example from a 1TB USB drive I use for backups:

[***@prophead ~]# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Seagate BUP Slim SL (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 1000GB 1000GB ext4 BackupDisk

(parted) quit
[***@prophead ~]# e2label /dev/sdb1
BackUps

The output from parted shows partition 1 as having the _partition_ label
"BackupDisk", but the output from e2label querying the ext4 filesystem
on that partition comes up with a _filesystem_ label of "BackUps",
showing that they are, indeed, separate entities.

Please excuse my being so bombastic here. Just trying to be thorough.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ***@alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- If this is the first day of the rest of my life... -
- I'm in BIG trouble! -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproje
Continue reading on narkive:
Loading...