- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Mount bootable ISO or IMG file and change files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 07:54 AM
тАО02-01-2011 07:54 AM
Howto mount bootable ISO or IMG file to change files and save these changes?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 08:02 AM
тАО02-01-2011 08:02 AM
SolutionYour best bet is to find out how the ISO was created, its format and edit files from there. Then re-create the ISO.
What kind/type of ISO / IMG file are we talking about here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 09:15 PM
тАО02-01-2011 09:15 PM
Re: Mount bootable ISO or IMG file and change files
Of course that is possible. You need to mount the iso or img file as loop back , then make changes and exit.
eg
mount -o loop cdrom.iso /mnt/loop
cd /mnt/loop
make changes < Bla bla.>
umount /mnt/loop
Truly Evil
Lucifer Megacruel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 09:21 PM
тАО02-01-2011 09:21 PM
Re: Mount bootable ISO or IMG file and change files
Just checked on what Alzhy said , it is mounted read only :P. You can copy contents and make use of mkisofs to recreate a new image.
Truly Evil
Lucifer Megacruel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2011 03:19 AM
тАО02-02-2011 03:19 AM
Re: Mount bootable ISO or IMG file and change files
Here's how I would do it :)
mkdir -p /mnt/loopback
mount -oloop cdrom.iso /mnt/loopback
mkdir -p /home/Lucifer/remaster
cp -rf /mnt/loopback/ /home/Lucifer/remaster
Now make we can make glorious modifications in /home/Lucifer/remaster . After we are doing we can create the iso image again.
mkisofs -R -b /mnt/loopback/isolinux/isolinux.bin -c /mnt/loopback/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /home/Lucifer/new.iso /home/Lucifer/
The caveat is the CD's can be booted in floppy emulation mode , so the exact steps i said may not really apply. But it should work in most of the cases.
You can test the newly created images easily using qemu and see that it boots okay ( I am typing it from memory ). You can also use bochs too ( Bochs is somewhat slower , but it is very good for debugging the kernel)
qemu -net-none -m256 -boot cdrom -hdc /home/Lucifer/image.iso
Truly Evil
Lucifer Megacruel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2011 08:10 AM
тАО02-03-2011 08:10 AM
Re: Mount bootable ISO or IMG file and change files
# mount -o loop binary.img /mnt/loopback
mount: you must specify the filesystem type
# file binary.img
binary.img: x86 boot sector; partition 1: ID=0x83, active, starthead 0, startsector 1, 593919 sectors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2011 09:33 AM
тАО02-03-2011 09:33 AM
Re: Mount bootable ISO or IMG file and change files
If it is a valid iso image, you should be able to mount it using
mount -tiso9660 -oloop cdrom.iso /mnt/loopback
If it is some hard disk image created using qemu or bochs, they you possibly may not be able to mount it.
to create an iso file from a cd, use the dd command
dd if=/dev/hdc /of=cdrom.iso ( put it in if what basically points to your cd drive )
Truly Evil
Lucifer Megacruel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2011 11:34 AM
тАО02-03-2011 11:34 AM
Re: Mount bootable ISO or IMG file and change files
Anyway I can mount it using:
# mount -o loop,offset=512 binary.img_old /mnt/loopback
I don't know if I can do a change, that I really need, because I cannot see there
a linux file structure.
# cd /mnt/loopback
# ls
doc ldlinux.sys live md5sum.txt syslinux
# cd syslinux
# ls
boot.txt f1.txt f4.txt f7.txt footer.cfg menu.cfg syslinux.cfg
data f2.txt f5.txt f8.txt header.cfg prompt.cfg
f10.txt f3.txt f6.txt f9.txt help.cfg syslinux.bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-04-2011 01:13 AM
тАО02-04-2011 01:13 AM
Re: Mount bootable ISO or IMG file and change files
syslinux is basically a bootloader :). You wont find anything in that directory other than boot loader related stuff . Check the live directory. Basically the directory structure depends on configuration , there are some small linux distros that runs entirely of the initial ram disk.
Truly Evil
Lucifer Megacruel