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

24

Comments

  • S0litaire
    S0litaire Posts: 3,535 Forumite
    First Post Combo Breaker First Anniversary
    Have a look at this :
    http://www.lakka.tv/
    It's more like a media centre build (uses OpenElec) But it has built in support for mame and other emulators

    You can install it on to a hard drive (or a fast USB stick!) so you can copy roms over (it can even run on a rpiZero for really portable Gaming device) ;)
    Laters

    Sol

    "Have you found the secrets of the universe? Asked Zebade "I'm sure I left them here somewhere"
  • esuhl
    esuhl Posts: 9,409 Forumite
    Name Dropper First Post First Anniversary
    S0litaire wrote: »
    Have a look at this :
    http://www.lakka.tv/


    Thanks -- I tried that. Unfortunately, it doesn't boot properly on my PC (and I think it's based on RetroArch, so not an ideal UI for my friend's gaming cabinet).


    Appreciate the suggestion, though. :)
  • that
    that Posts: 1,532 Forumite
    edited 31 July 2018 at 1:38AM
  • psychic_teabag
    psychic_teabag Posts: 2,865 Forumite
    Name Dropper First Anniversary Combo Breaker First Post
    it certainly ought to be possible to manually construct a working image on a hard disk. Just because an automatic installer isn't provided shouldn't necessarily be an obstacle.

    There's various ways to do it. Almost certainly simply to use a full linux system to do the work - might be possible with windows, but then you have to fight using foreign filesystems, etc.

    If you have an usb disk caddy thing and another linux pc, you could attach the disk to the "real" computer and just prepare the disk image from scratch (install bootloader and copy the files from cd to disk)

    Another way, if the target disk is big enough, is to first install a full linux onto the disk, leaving plenty of unpartitioned space (or perhaps create an unused first partition) for the knoppix installation. That gives you a bootloader, etc. Then use that installation to copy the files from the cd onto the first partition, add a new entry to the bootloader to boot from that partition, and take it from there.

    Could possibly first install linux onto the disk and then replace bits in-situ to transform it into the knoppix system. (Perhaps leave the newer kernel there, rather than using the old one that comes with the cd - the notes on the project summary do suggest updating the kernel.)
  • esuhl
    esuhl Posts: 9,409 Forumite
    Name Dropper First Post First Anniversary
    that wrote: »

    Thanks, but it doesn't quite run fast enough. And AdvanceCD doesn't boot (I don't think my graphics card is compatible).

    KnoppiXMAME looks perfect -- fast boot to a menu (GXMAME), simple way to change video settings (to tweak performance), ability to load other MAME versions (I think).

    Great suggestion, though. :)

    ---
    Hang on!!! I've finally managed to edit the ISO!

    I used the free version of Magic ISO. But I had to change the default settings to preserve the (upper/lower) case of filenames, and enable non-DOS long filenames before saving the ISO. (I think I also disabled Joliet naming.)


    Everything works brilliantly! Exactly as I'd hoped! :j
    ---

    But... I have more ROM files than will fit on a CD (or DVD), and the free version of Magic ISO only supports images up to 300MB.

    So it would be really cool if I could "install" the live CD on a USB and HDD (depending on the machine). :)
    it certainly ought to be possible to manually construct a working image on a hard disk. Just because an automatic installer isn't provided shouldn't necessarily be an obstacle.

    I don't know -- CD and HDD booting seems to work differently. :-/

    I tried extracting the ISO to a new drive and booting it from Linux, with the following GRUB entry:
    menuentry "KnoppiXMAME" {
        set root=(hd1,1)
        linux /isolinux/KnoppiXMAME
        initrd /boot/Boot-NoEmul.img
    }
    
    But I just get a lot of errors culminating in a "kernel panic". :(

    The only system files on the CD are:
    rootsquash
    boot/Boot-NoEmul.img
    isolinux/boot.cat
    isolinux/boot.msg
    isolinux/isolinux.bin
    isolinux/isolinux.cfg
    isolinux/KnoppiXMAME
    isolinux/miniroot.gz
    
    Any ideas...?

    BTW, I tried UNetBootIn, RemasterSys and PenDriveLinux, but nothing seems to work.

    Cheers all :beer:
  • debitcardmayhem
    debitcardmayhem Posts: 11,858 Forumite
    First Anniversary First Post Name Dropper Photogenic
    edited 1 August 2018 at 11:08PM
    Don't know if it helps but how to customise systemrescuecd is here http://www.system-rescue-cd.org/Customization/
    The procedure could perhaps be modified for your case
    🍺 😎 Still grumpy, and No, Cloudflare I am NOT a robot 🤖BUT my responses are now out of my control they are posted via ChatGPT or the latest AI
  • psychic_teabag
    psychic_teabag Posts: 2,865 Forumite
    Name Dropper First Anniversary Combo Breaker First Post
    edited 2 August 2018 at 11:03AM
    esuhl wrote: »

    So it would be really cool if I could "install" the live CD on a USB and HDD (depending on the machine). :)

    (on just copying the files to hard disk...)

    I don't know -- CD and HDD booting seems to work differently. :-/
    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.
    I tried extracting the ISO to a new drive and booting it from Linux, with the following GRUB entry:
    menuentry "KnoppiXMAME" {
        set root=(hd1,1)
        linux /isolinux/KnoppiXMAME
        initrd /boot/Boot-NoEmul.img
    }
    
    But I just get a lot of errors culminating in a "kernel panic". :(

    The only system files on the CD are:
    rootsquash
    boot/Boot-NoEmul.img
    isolinux/boot.cat
    isolinux/boot.msg
    isolinux/isolinux.bin
    isolinux/isolinux.cfg
    isolinux/KnoppiXMAME
    isolinux/miniroot.gz
    
    Any ideas...?

    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 -

    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.
    BTW, I tried UNetBootIn, RemasterSys and PenDriveLinux, but nothing seems to work.

    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.)
  • esuhl
    esuhl Posts: 9,409 Forumite
    Name Dropper First Post First Anniversary
    that wrote: »


    Wow! That's a beautifully simple little program. Absolutely perfect -- thanks! :T
  • esuhl
    esuhl Posts: 9,409 Forumite
    Name Dropper First Post First Anniversary
    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.

    I'm not overly familiar with boot processes... Could you break that down into the steps I should take? :o

    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 -

    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.

    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.)

    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! :)
This discussion has been closed.
Meet your Ambassadors

Categories

  • All Categories
  • 343.2K Banking & Borrowing
  • 250.1K Reduce Debt & Boost Income
  • 449.7K Spending & Discounts
  • 235.3K Work, Benefits & Business
  • 608K Mortgages, Homes & Bills
  • 173.1K Life & Family
  • 247.9K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 15.9K Discuss & Feedback
  • 15.1K Coronavirus Support Boards