Changing the LABEL of an iso9660 file system

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the LABEL of an iso9660 file system

Kevin Wilson
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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Rick Stevens-3
On 9/19/18 5:31 AM, Kevin Wilson wrote:

> 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'

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    [hidden email] -
- 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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Fedora mailing list
In reply to this post by Kevin Wilson
On Wed, 2018-09-19 at 15:31 +0300, Kevin Wilson wrote:
> 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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Rick Stevens-3
In reply to this post by Rick Stevens-3
On 9/19/18 9:27 AM, Rick Stevens wrote:

> On 9/19/18 5:31 AM, Kevin Wilson wrote:
>> 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'
>
> 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    [hidden email] -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-      Always remember you're unique, just like everyone else.       -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Samuel Sieb
In reply to this post by Kevin Wilson
On 9/19/18 5:31 AM, Kevin Wilson wrote:
> 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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Chris Murphy


On Wed, Sep 19, 2018, 12:37 PM Samuel Sieb <[hidden email]> wrote:
On 9/19/18 5:31 AM, Kevin Wilson wrote:
> 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.

_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Samuel Sieb
On 9/19/18 2:37 PM, Chris Murphy wrote:
> On Wed, Sep 19, 2018, 12:37 PM Samuel Sieb <[hidden email]
> <mailto:[hidden email]>> wrote:
>     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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...
Reply | Threaded
Open this post in threaded view
|

Re: Changing the LABEL of an iso9660 file system

Rick Stevens-3
On 9/19/18 2:46 PM, Samuel Sieb wrote:

> On 9/19/18 2:37 PM, Chris Murphy wrote:
>> On Wed, Sep 19, 2018, 12:37 PM Samuel Sieb <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>     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:

[root@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
[root@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    [hidden email] -
- 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 -- [hidden email]
To unsubscribe send an email to [hidden email]
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/users@...