Your browser isn't supported
It looks like you're using an old web browser. To get the most out of the site and to ensure guides display correctly, we suggest upgrading your browser now. Download the latest:

Welcome to the MSE Forums

We're home to a fantastic community of MoneySavers but anyone can post. Please exercise caution & report spam, illegal, offensive or libellous posts/messages: click "report" or email forumteam@. Skimlinks & other affiliated links are turned on

Search
  • FIRST POST
    • esuhl
    • By esuhl 30th Jul 18, 2:47 AM
    • 8,286Posts
    • 6,079Thanks
    esuhl
    Add files to bootable Linux CD ISO image...?
    • #1
    • 30th Jul 18, 2:47 AM
    Add files to bootable Linux CD ISO image...? 30th Jul 18 at 2:47 AM
    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).
Page 2
    • esuhl
    • By esuhl 6th Aug 18, 11:36 PM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    Sure - the actual bootstrap bit is different. But once the kernel is running, the initrd is loaded, and the root filesystem is mounted, everything else should be fine. That was why I'd suggested first getting a standard (hdd) linux bootloader onto the system - probably grub.
    Originally posted by psychic teabag
    I'm not overly familiar with boot processes... Could you break that down into the steps I should take?

    As above, I added a drive to a Linux VM I have and copied the extracted ISO files to it. GRUB2 loads the CD kernel and starts booting, but it just results in lots of errors.

    Would it be worth trying to find a copy of the original Knoppix release (same kernel version, etc.) on which KnoppiXMAME was based and install it to the hard drive (I understand there's a built-in script that does this)... and then use the Knoppix kernel, etc. to boot KnoppiXMAME...?

    I downloaded the iso and had a quick look. 'rootsquash' is the root filesystem, as a squashfs. So you'd need to expand that onto a disk partition as the root filesystem. unsquashfs is the standard linux utility to do that - maybe you can do it from windows, but I wouldn't be trying that. You might be able to just copy the squashfs image directly to a partition and just mount it directly as a squashfs -
    Originally posted by psychic teabag
    Thanks! I only need to add files to the "roms" and "samples" directories in the root of the CD, so I don't need to edit the squashfs.

    (Hmm... Actually, it seems that there's a bug that causes certain ROMs I don't have to appear in the menu... So I will definitely check out unsquashfs to see if I can edit a config file somewhere.)

    isolinux is, I'm guessing, the bootloader - https://www.syslinux.org/wiki/index.php?title=ISOLINUX - so you shouldn't need any of that when using a proper bootloader - other than the initrd and kernel, of course. Oh, and the kernel command line parameters from the cfg file.
    Originally posted by psychic teabag
    isolinux is a bootloader, but I think the file /isolinux/KnoppiXMAME is the kernel. And I'm not sure if that's what is preventing HDD booting, or how to replace it. :-/

    I assume you'd just be wanting grub for a hdd. But I can't claim to be an expert at all the various bootloaders around. (One of my systems is still using lilo.)
    Originally posted by psychic teabag
    Wow -- it's been years since I used lilo! I typically use GRUB2 these days, but legacy GRUB or Syslinux would be fine -- whatever it takes to make it boot!
    • that
    • By that 6th Aug 18, 11:57 PM
    • 383 Posts
    • 216 Thanks
    that
    I've been reading this as it progresses and after the first few post I asked myself, "why does he not just install it to a hard disk?"
    • esuhl
    • By esuhl 7th Aug 18, 12:17 AM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    I've been reading this as it progresses and after the first few post I asked myself, "why does he not just install it to a hard disk?"
    Originally posted by that
    How do you install a bootable CD to hard disk? That's the problem!

    I wanted to get the CD and ROMs working as a first step, but I'd love to be able to install to hard disk or USB stick.
    • esuhl
    • By esuhl 7th Aug 18, 12:41 AM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    Would it be worth trying to find a copy of the original Knoppix release (same kernel version, etc.) on which KnoppiXMAME was based and install it to the hard drive (I understand there's a built-in script that does this)... and then use the Knoppix kernel, etc. to boot KnoppiXMAME...?
    Originally posted by esuhl
    KnoppixMAME v1.3b19 was released on 11/May/2004. It seems to use the Linux v2.6.1 kernel.

    http://freshmeat.sourceforge.net/projects/knoppixmame/

    I can only guess that it was based on the (then) latest version of Knoppix, v3.3, released 22/Sep/2003.

    https://en.wikipedia.org/wiki/Knoppix#Versions

    But I can't find a Knoppix ISO that old.

    And I might be barking up the wrong tree in thinking I can use the Knoppix hard drive installation to get KnoppiXMAME booting from HDD anyway...

    (Is replying to yourself the first sign of madness?! )
    • that
    • By that 7th Aug 18, 5:57 AM
    • 383 Posts
    • 216 Thanks
    that
    how good is your Italian ? http://www.barbalace.it/rtai3.3/

    you may find this interesting https://www.linuxjournal.com/article/7246

    apparently koppix was debian based?
    Last edited by that; 07-08-2018 at 5:59 AM.
    • psychic teabag
    • By psychic teabag 7th Aug 18, 10:07 AM
    • 2,700 Posts
    • 1,588 Thanks
    psychic teabag
    As above, I added a drive to a Linux VM I have and copied the extracted ISO files to it. GRUB2 loads the CD kernel and starts booting, but it just results in lots of errors.
    Originally posted by esuhl
    Can you give some details of the errors ?

    I'd probably unsquash the rootfs so that it can be mounted from just a normal ext2 filesystem (assuming that kernel can't do anything more modern).

    Would it be worth trying to find a copy of the original Knoppix release (same kernel version, etc.) on which KnoppiXMAME was based and install it to the hard drive (I understand there's a built-in script that does this)... and then use the Knoppix kernel, etc. to boot KnoppiXMAME...?
    Would you normally use one kernel to load another ? I believe it can be done, but I'm not sure there'd be a huge benefit. You could just get the kernel sources and build it with the necessary drivers if you believe it is incomplete - it's not impossible that they skipped the hard disk drivers for a purely cd-based system. But if that's the case, the kernel for the hard-drive based knoppix could probably run your game system.
    Last edited by psychic teabag; 07-08-2018 at 10:16 AM.
    • esuhl
    • By esuhl 7th Aug 18, 7:02 PM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    Can you give some details of the errors ?
    Originally posted by psychic teabag
    The on-screen messages end with:
    Code:
    UDF-fs: No partition found (1)
    XFS: bad magic number
    XFS: SB validate failed
    Kernel panic: VFS: Unable to mount root fs on ram0
    But that was trying to boot the CD contents without unsquashing the rootfs. Is that barking up the wrong tree?
    I'd probably unsquash the rootfs so that it can be mounted from just a normal ext2 filesystem (assuming that kernel can't do anything more modern).
    Originally posted by psychic teabag
    Thanks. I added another hard drive and unsquashed that file onto it. I then copied the Boot-NoEmul.img and KnoppiXMAME (kernel) files to a new directory on that drive, and set up a new entry in GRUB.

    But I just get an endless flickering screen of text and the keyboard stops working. I rebooted and tried to hit ScrollLock before that happened, which resulted in this message and the computer instantly freezing:
    Code:
     <0>Kernel panic: Attempted to kill init!
     <1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
     printing eip:
    c02bd1f1
    *pde = 00000000
    Would you normally use one kernel to load another ? I believe it can be done, but I'm not sure there'd be a huge benefit. You could just get the kernel sources and build it with the necessary drivers if you believe it is incomplete - it's not impossible that they skipped the hard disk drivers for a purely cd-based system. But if that's the case, the kernel for the hard-drive based knoppix could probably run your game system.
    Originally posted by psychic teabag
    I wouldn't normally mess around with kernels at all! I'm a bit out of my league here, but always trying to learn something new.

    I'm just running out of ideas as to how booting from HDD/USB might be possible. I didn't think it could be so hard!

    Unfortunately I can't find a version of Knoppix quite as old as KnoppiXMAME. I could download the subsequent version and give it a go... but I'm not really sure what I'd be doing when I got it...

    Could I just copy the kernel and .img file to the KnoppiXMAME hard drive and boot with them...?

    Or could I install the old Knoppix, manually overwrite the filesystem with KnoppixMAME files, then... er... I dunno.

    Is it time to accept that booting this CD from hard drive just isn't possible?
    • esuhl
    • By esuhl 7th Aug 18, 7:08 PM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    You know how software like DaemonTools can mount ISO images in Windows, etc.?


    Isn't there a bootloader that could do the same? i.e. Mount an ISO file saved on the hard disk and "virtually" (somehow?) boot from it...?
    • debitcardmayhem
    • By debitcardmayhem 7th Aug 18, 8:10 PM
    • 8,588 Posts
    • 6,487 Thanks
    debitcardmayhem
    You know how software like DaemonTools can mount ISO images in Windows, etc.?


    Isn't there a bootloader that could do the same? i.e. Mount an ISO file saved on the hard disk and "virtually" (somehow?) boot from it...?
    Originally posted by esuhl
    Xboot (now not updated) me Spud17 and Gunjack had lots of fun with that https://forums.moneysavingexpert.com/showthread.php?t=3718403&highlight=xboot+gunjack


    Here it was https://sites.google.com/site/shamurxboot/

    the guy who created it is no more RIP shamu
    Last edited by debitcardmayhem; 07-08-2018 at 8:16 PM.
    • esuhl
    • By esuhl 7th Aug 18, 9:05 PM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    Xboot (now not updated) me Spud17 and Gunjack had lots of fun with that
    Originally posted by debitcardmayhem
    Oh! Nice try -- so close! It displayes the KnoppiXMAME logo and starts booting, but quickly displays:

    Code:
    Can't find KNOPPIX filesystem, sorry.
    Dropping you to a (very limited) shell.
    
    Additional builtin commands available:
            cat        mount      umount
            ubsnid     rmmod      lsmod
    • debitcardmayhem
    • By debitcardmayhem 7th Aug 18, 9:26 PM
    • 8,588 Posts
    • 6,487 Thanks
    debitcardmayhem
    Oh! Nice try -- so close! It displayes the KnoppiXMAME logo and starts booting, but quickly displays:

    Code:
    Can't find KNOPPIX filesystem, sorry.
    Dropping you to a (very limited) shell.
    
    Additional builtin commands available:
            cat        mount      umount
             ubsnid     rmmod      lsmod
    Originally posted by esuhl
    Have you tried in a 32bit environment ? just an idea
    • esuhl
    • By esuhl 7th Aug 18, 10:47 PM
    • 8,286 Posts
    • 6,079 Thanks
    esuhl
    Have you tried in a 32bit environment ? just an idea
    Originally posted by debitcardmayhem
    I tried on an old 32-bit laptop, and the boot process stalled, whilst accessing the empty CD tray, with the message:

    Code:
    Looking for CDROM in: /dev/hdc1
    I ejected the CD tray, and the PC continued "brute force" scanning for other partitions of other letters/numbers (hdc10,hdc11,hdc12,etc.) , before displaying the same message (as above) about not finding the KNOPPIX filesystem.

    The USB stick isn't even detected as being bootable (by the BIOS) on one of the PCs that I want to run it on anyway. :-/
    Last edited by esuhl; 07-08-2018 at 10:50 PM.
    • psychic teabag
    • By psychic teabag 8th Aug 18, 10:59 AM
    • 2,700 Posts
    • 1,588 Thanks
    psychic teabag
    The on-screen messages end with:
    Code:
    UDF-fs: No partition found (1)
    XFS: bad magic number
    XFS: SB validate failed
    Kernel panic: VFS: Unable to mount root fs on ram0
    But that was trying to boot the CD contents without unsquashing the rootfs. Is that barking up the wrong tree?
    Originally posted by esuhl
    Googling for that... in one case, someone fixed it by removing the initrd parameter from the boot cmd line. I'm afraid I don't know enough about how the kernel finds rootfs to be able to help much... if it's a squashfs, there must be some way to tell it that the squashfs has to be mounted loopback from within another filesystem - all that is presumably happening inside the initrd.

    Unsquashing the rootfs to a simple ext2 filesystem may remove the need for an initrd at all - the kernel can presumably find a simple partition without any assistance.

    Is it time to accept that booting this CD from hard drive just isn't possible?
    It's possible. Just depends how determined you are, and how much patience you have ;-)

    Ah - I've had another look at the image... /isolinux has a miniroot.gz which turns out to be a compressed ext2 image. Uncompressing and mounting that, it turns out that it has soft links back out to /cdrom/KNOPPIX things. Presumably this miniroot is the thing that uncompressed into ram and then mounted as the temporary rootfs.

    linuxrc is a shell script which drives all the startup - that's the thing that's presenting the message you saw about the very limited shell when it couldn't find what it was looking for.

    https://en.wikipedia.org/wiki/Linux_boot might be helpful, if you haven't seen it.
    Last edited by psychic teabag; 08-08-2018 at 11:03 AM.
Welcome to our new Forum!

Our aim is to save you money quickly and easily. We hope you like it!

Forum Team Contact us

Live Stats

2,948Posts Today

8,727Users online

Martin's Twitter
  • Ta ta... for now. This August, as I try and do every few yrs, I'm lucky enough to be taking a sabbatical. No work,? https://t.co/Xx4R3eLhFG

  • RT @lethalbrignull: @MartinSLewis I've been sitting here for a good while trying to decide my answer to this, feeling grateful for living i?

  • Early days but currently it's exactly 50 50 in liberality v democracy, with younger people more liberal, older more? https://t.co/YwJr4izuIj

  • Follow Martin