Rob Wolfram's picture

I am banging my head against a wall. I hope someone here can help me.

I have an install of Ubuntu on a USB stick and modified the grub configuration to load other live and small systems (like Kali, SystemRescueCd, DBAN and Spinrite). I would like to add Bitkey to the list but fail in that effort. Bitkey (https://bitkey.io) is a side project that is built with TurnKey Linux and to eleminate Bitkey as the problem, I tried it with another (small) TurnKey system, i.e. OpenVPN and the same issue is present with that.

If I try to boot the TurnKey iso content, initrd loads but loops on "calling test-builtin" for quite a while and then fails with not being able to find a medium containing a live file system (see the linked screen dump where I tried it on a VM with Ubuntu Xenial installed and /boot/grub/grub.cfg modified to boot the OpenVPN TKL image).

 

 

 

I tried booting in three different ways: the files from the iso images copied to a separate ext4 partition, booting from the iso itself as a loopback grub device and copying the iso image content to the file system that contains grub. All fail in the exact same way. I tries another casper based live filesystem (i.e. Lubuntu, files copied to its owf filesystem) and that one boots fine and finds the live filesystem to load.
For completeness, here are the modifications that I applied to grub by adding it to Ubuntu's /etc/grub.d/40_custom file and regenerating grub.cnf:

#menuentry "Bitkey" {
#    search --no-floppy --fs-uuid --set=root 256c3939-1dc2-4e6b-8c94-2c57238a184f
#    loopback loop /bitkey-14.2.0-community-1.12.iso
#    linux (loop)/casper/vmlinuz boot=casper root=/dev/ram rw showmounts toram bitkey=cold-offline --
#    initrd (loop)/casper/initrd.gz
#}
menuentry "TKL on Ubuntu /boot" {
    linux /casper/vmlinuz boot=casper initrd=/casper/initrd.gz root=/dev/ram rw showmounts net.ifnames=0 --
    initrd /casper/initrd.gz
}
menuentry "TKL on own partition" {
    search --no-floppy --fs-uuid --set=root 2bee242a-b271-435d-b620-217a9b47a658
    linux /casper/vmlinuz boot=casper initrd=/casper/initrd.gz root=/dev/ram rw showmounts net.ifnames=0 --
    initrd /casper/initrd.gz
}
menuentry "TKL via iso loopback" {
    search --no-floppy --fs-uuid --set=root 256c3939-1dc2-4e6b-8c94-2c57238a184f
    loopback loop /turnkey-openvpn-15.1-stretch-amd64.iso
    linux (loop)/casper/vmlinuz boot=casper initrd=/casper/initrd.gz root=/dev/ram rw showmounts net.ifnames=0 --
    initrd (loop)/casper/initrd.gz
}
menuentry "Lubuntu" {
    search --no-floppy --fs-uuid --set=root 256c3939-1dc2-4e6b-8c94-2c57238a184f
    linux /casper/vmlinuz  file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash ---
    initrd /casper/initrd
}

Does anyone have an idea how to accomplish this?

Forum: 
Jeremy Davis's picture

I don't really have anything for you as that's outside of my experience and our general use cases. Although it does sound like a good scenario to be able to support.

In theory, if you're booting from the ISO via grub, then I would expect it to "just work". If you unpack the ISO files, then you'd likely need to make some grub adjustments to get it working. but again, I would expect that to be fairly straight forward... Clearly that's not the case though. I'm not 100% sure, but it does look like for some reason the root filesystem isn't being mounted (or at least mounted properly).

Whilst TurnKey does use Casper, it's quite an old version, so I wonder if maybe there are some changes in newer versions which don't play nice? Also, BitKey is based on Debian (rather than Ubuntu), which might be adding to the complications (and the main reason why we still use an old Casper version)? It's probably also worth noting that we use a customised installer/launcher called di-live, which basically a simplified wrapper for debian-installer (aka d-i). I do know that that does mean that there are some limitations.

Unfortunately I don't know much about di-live. It was developed by Alon (one of the co-founders) as when we switched from Ubuntu, Debian didn't have a way to run live (as well as provide an installer). Ideally, I'd really like to rebase on a default Debian installer and their "live" system (at least as close as possible) for future major releases, but I'm not 100% sure if that will happen or not. And I have no idea whether that might be the answer to your issues, or not.

I'm not sure whether it's relevant or not, but also our ISOs uses isolinux to boot AFAIK, so I wonder if that's also a factor?

Bottom line is that I'd love to help you out, but I've never tried to do what you are doing, so don't know much about that at all. And unfortunately, I don't know enough about the underlying technical details of di-live and other early boot components to be of much more help than pointing you towards the source code (FWIW here's di-live source).

The other thing that may be another factor is that BitKey is getting quite dated (based on Debian Jessie). There are efforts to bring it up to date, but we don't currently have the resources to spare, and the guy that is working on it is a volunteer (so we can't really crack the whip on him).

Sorry that I can't really provide any meaningful support and assistance to help you fulfil your desire. If I think of anything else, I'll post back. And please feel free to share any further info etc. I don't really know what more assistance I can provide at this point. Sorry...

Rob Wolfram's picture

Thank you, you've at least given me a direction to look into. If I succeed I'll blog a howto.

 

Regards,

Rob

Add new comment