Noticed some changes? You can read all about the improvements we've made on the Forum in our latest announcement. We also have a new set of Forum rules so please take the time to give them a read and familiarise yourself.

Add files to bootable Linux CD ISO image...?

edited 30 November -1 at 1:00AM in Techie Stuff
32 replies 3.3K views
esuhlesuhl Forumite
9.4K Posts
Part of the Furniture 1,000 Posts Name Dropper
✭✭✭✭
edited 30 November -1 at 1:00AM in Techie Stuff
I have a live CD .ISO image file for an old unsupported Linux OS, which I've tested (by booting it from a burnt CD). But now I want to add new files to the .ISO.

Also, it would be rather handy to boot from USB or hard drive, rather than CD.

I tried using Rufus, which supposedly "burns" CD ISO images to USB, but my USB stick wasn't recognised as bootable even before I'd tried adding new files. (And my PC boots other USB sticks.)

Can anyone suggest anything I could try...? (In either Windows or Linux). :)
«134

Replies

  • forgotmynameforgotmyname Forumite
    31.5K Posts
    Part of the Furniture 10,000 Posts Name Dropper
    ✭✭✭✭✭
    The boot file or partition needs to ne written. Sticking an ISO file onto a USB stick does not make it bootable. You need to select the boot OS.

    With windows there is a hidden boot.img file that makes the media bootable.

    Extract the ISO and copy the boot file/sector and then add your files and write it back. Sounds like you missed the boot file.
    Censorship Reigns Supreme in Troll City...

  • debitcardmayhemdebitcardmayhem Forumite
    10.5K Posts
    Part of the Furniture 10,000 Posts Name Dropper Photogenic
    ✭✭✭✭✭
    try unetbootin on linux and examine this stick with gparted?
    🍺 😎 Still grumpy, and No, Cloudflare I am NOT a robot 🤖
  • prowlaprowla Forumite
    11.8K Posts
    Part of the Furniture 10,000 Posts Name Dropper
    ✭✭✭✭✭
    If you use VMware or VirtualBox you could create a Linux instance which will run in a box on any machine you like and which you could copy (no licence issues with Linux).


    I do this often and it's also handy if you've got software which only runs on an older version (I've got a Windows XP one to run a couple of legacy devices).
  • S0litaireS0litaire Forumite
    3.5K Posts
    Part of the Furniture 1,000 Posts Combo Breaker
    ✭✭✭✭
    With a "Live CD/USB" you can't change anything in the image.

    Their is something called "Persistence storage" file which you can use to store changes to a "Live" image when you boot using a USB stick.

    https://askubuntu.com/questions/841843/what-program-to-use-when-you-want-to-create-a-persistent-storage-live-usb-in-ubu


    http://live.learnfree.eu/en/download/
    Laters

    Sol

    "Have you found the secrets of the universe? Asked Zebade "I'm sure I left them here somewhere"
  • psychic_teabagpsychic_teabag Forumite
    2.9K Posts
    Part of the Furniture 1,000 Posts Name Dropper Combo Breaker
    ✭✭✭✭
    Perhaps a stupid question, but since you say you want to be able to boot from hard disk, why not just install the CD to hard disk, *then* add the files ? (Live CDs usually include an option to install to hard disk.)

    Multisession CDs let you append new files to a CD - I do my backups that way - but you can only do that if the original session wasn't "closed" (Sorry, not sure of the technical details.) growisofs -M ... on linux. But that may not let you put the new files into the correct place on the mounted filesystem.

    Not quite sure of the architecture of live images - probably more than one way to do it - but one old live CD I have for gparted here has a container file which is a squashfs filesystem image, which is a compressed read-only file system. You could presuably unpack it, add your files, then recreate it, and then burn a new iso image with the modified filesystem.
  • psychic_teabagpsychic_teabag Forumite
    2.9K Posts
    Part of the Furniture 1,000 Posts Name Dropper Combo Breaker
    ✭✭✭✭
    Depending on what you're trying to achieve, another option might be to use an overlay filesystem to supplement what's mounted on the live cd from different media (or possuibly even another container filesystem added to the cd image to keep it self-contained).
  • UndervaluedUndervalued Forumite
    6.6K Posts
    Eighth Anniversary 1,000 Posts Name Dropper
    ✭✭✭✭
    In the past I used an application called (from memory) Remastersys to do this.

    I had a normal live USB then downloaded the various apps I wanted, deleted ones I didn't then used Remastersys to create a new bootable USB of my custom setup.

    It was reasonably straightforward. However this was several years ago so I have no idea if it is still current.
  • prowlaprowla Forumite
    11.8K Posts
    Part of the Furniture 10,000 Posts Name Dropper
    ✭✭✭✭✭
    Here's some info on how to do it for Red Hat/CentOS.


    http://256stuff.com/gray/docs/redhat_boot/
  • thatthat Forumite
    1.5K Posts
    ✭✭✭
    I would copy that iso locally, first I would try 7zip, but doubt it would work.

    In the past, about 2 decades ago think I used poweriso, but it could have been ultraiso, or magiciso. PowerIso was a name I remember and know i rarely used it... so taking a stab

    Also had difficulty with Linux on Rufus. I used what debitcardmayhem suggested.
  • esuhlesuhl Forumite
    9.4K Posts
    Part of the Furniture 1,000 Posts Name Dropper
    ✭✭✭✭
    Extract the ISO and copy the boot file/sector and then add your files and write it back. Sounds like you missed the boot file.

    How do I copy the boot file/sector...?

    I haven't messed around with CDs for ages, but I vaguely remember having making bootable CDs in Nero (an old XP-only version), and having to choose an option to write the ISOLINUX (?) file to the MBR(?) to make the CD bootable...? Something about El Torito compatibility...? I had a google, but it's not coming back to me. :o
    Multisession CDs let you append new files to a CD

    I don't think it's possible to use multisession mode when burning an ISO. :(
    ---

    Thanks, everyone, for all your suggestions. Maybe it would help to explain a bit more:

    The CD image is for the latest release of KnoppiXMAME v.1.3b19, released in 2004. There's not much documentation or support available. But it looks like a perfect way to turn an old PC into a games machine. However, it doesn't support installation onto hard drive or USB. The author says:
    I still don't really plan on offering a HD install option because i break a lot of debian stuff to make the file size small so upgrading a system would not be trivial once it's installed.
    (https://sourceforge.net/p/knoppixmame/discussion/293962/thread/96f22f4b/)

    There's a boot option to create a new ISO image with new files, but neither the hard drive nor USB stick are mounted, and there are no programs (not even a terminal emulator!!!) to mount anything. It boots a single application and prompts to reboot if you close it.

    I've tried putting the ROM files onto my hard drive in a "rom" directory, or in "knoppixmame/home" (as suggested in the link), but the OS just doesn't see any other drives. :(

    So... it would be really cool if I could figure out a way to rebuild the bootable ISO.
    ---

    At the moment, I have a PC running RetroArch in Arch Linux. It works perfectly, but... I hate the GUI.

    Also I have a friend with a broken games cabinet. Inside it is an old 233MHz PIII PC. I've no idea what OS it was running, but it booted up to a menu of thumbnail images of games that you could select with a joystick. That's the kind of thing I want! :D

    And if I could fix his machine by installing something that could be controlled with a joystick and fire buttons, and just switched on/off, that would be great.

    At the moment, KnoppiXMAME looks like it might do that... if I can add my own ROMs, boot from USB/HDD, downgrade the MAME version for the old hardware, etc... Maybe... :-/
This discussion has been closed.