LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2026, 08:19 AM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 161

Rep: Reputation: 31
Question How to change volume label of an ISO image without adding a new session?


[Log in to get rid of this advertisement]
I am trying to change the volume label (volid) of an ISO9660 disc image file. I could do so manually in a HEX editor, but it would be more convenient to do it from a command-line tool.

What I have tried:

Code:
# create image file
xorriso -volid "old volume id" -dev example.iso  -map example_folder/ /
# change volume label
xorriso -volid "new volume id" -dev example.iso
This changes the volume ID but also adds a new session at the end. This obviously makes sense on write-once media, but how do I change the volume label of an ISO image file without adding new data at the end?
 
Old 01-26-2026, 09:01 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 25,670

Rep: Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375Reputation: 8375
I don't know if that is an "officially" supported operation, but if you can do it with a hex editor you can do that programmatically too. Just do the same steps (using your preferred language).
 
Old 01-27-2026, 04:05 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: CachyOS/Arch
Posts: 4,288

Rep: Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697Reputation: 1697
Fun question. I am a sucker for using dd to edit files, so lets do that. I had to look up the spec for the iso9660 format here: https://wiki.osdev.org/ISO_9660 in the section Primary Volume Descriptor.

I have a Slitaz iso sitting in downloads so thats what I will use for an example. This is the iso-info beforehand.

Code:
> iso-info slitaz-rolling.iso                                                                              
                                             
iso-info version 2.3.0 x86_64-pc-linux-gnu
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017, 2025 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO 9660 image: slitaz-rolling.iso
Application : tazlito 537/genisoimage 1.1.11 (Linux)
Preparer    : root
Publisher   : www.slitaz.org
System      : LINUX
Volume      : SliTaz core-4in1
Volume Set  : SliTaz cooking
No Joliet extensions
Verify the current info at the correct offset:

Code:
> xxd -s 0x8028 -l 32 slitaz-rolling.iso                                                                                                                
00008028: 536c 6954 617a 2063 6f72 652d 3469 6e31  SliTaz core-4in1
00008038: 2020 2020 2020 2020 2020 2020 2020 2020
Change it with disk destroyer and check the change.

Code:
> echo "my string of 32 bytes           " | dd of=slitaz-rolling.iso bs=1 seek=32808 count=32 conv=notrunc                                              
32+0 records in
32+0 records out
32 bytes copied, 0.000227785 s, 140 kB/s

> xxd -s 0x8028 -l 32 slitaz-rolling.iso                                                                                                                
00008028: 6d79 2073 7472 696e 6720 6f66 2033 3220  my string of 32 
00008038: 6279 7465 7320 2020 2020 2020 2020 2020  bytes 

>iso-info slitaz-rolling.iso                                                                                                                           iso-info version 2.3.0 x86_64-pc-linux-gnu
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017, 2025 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
__________________________________
ISO 9660 image: slitaz-rolling.iso
Application : tazlito 537/genisoimage 1.1.11 (Linux)
Preparer    : root
Publisher   : www.slitaz.org
System      : LINUX
Volume      : my string of 32 bytes
Volume Set  : SliTaz cooking
No Joliet extensions
 
  


Reply

Tags
iso9660, xorriso



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to launch "cinnamon-session-cinnamon" X session "cinnamon-session-cinnamon" -found; Falling back to default "session." xxxindigo Linux Mint 22 09-01-2019 10:21 AM
Editing The Volume Label Of An Iso ColJohnHannibalSmith Linux - General 1 12-23-2015 11:57 AM
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 08:02 AM
LABEL=/1 vs LABEL=/ in linux !! shipon_97 Linux - Newbie 1 06-02-2010 09:33 AM
trouble umounting with LABEL=label in fstab JosephS Debian 3 02-01-2010 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration