0

I'd like to put grub on my flashdrive, and be able to boot a live debian image from there. I got grub onto the flashdrive fine, I see my debian menuentry there, but I get a kernel panic when I try to boot. Here is my grub.cfg:

menuentry '[loopback]debian-live-8.1.0-amd64-xfce-desktop' {
    set isofile='/boot/iso/debian-live-8.1.0-amd64-xfce-desktop.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz boot=live config live-config fromiso=/dev/disk/by-uuid/09B1-700B/$isofile
    initrd (loop)/live/initrd.img
}

The actual error I get is: Kernel panic - not syncing: No working init found. Try passing init= option to the kernel.

2
  • Please use a different tool, ie LiLi Creator for Windows or dd on Ubuntu for example. When this is done set the UEFI Setup/BIOS to boot via USB as the first or 2nd device.
    – eyoung100
    Aug 5 '15 at 2:31
  • @eyoung100 I have successfully made a bootable usb using dd before, I'd like to do it this way. Honestly, by now, I just want to find out why this isn't working. Aug 5 '15 at 2:40
2

Try:

menuentry "Debian Live 8.1 amd64 XFCE Desktop" {
set isoname="debian-live-8.1.0-amd64-xfce-desktop.iso"
set isopath="/boot/iso"
set isofile="${isopath}/${isoname}"
echo "Using ${isoname}..."
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live findiso=${isofile} config quiet splash
initrd (loop)/live/initrd.img
}

I've always hated UUID.


References

HowTo Geek: How to Boot Linux ISO Images Directly From Your Hard Drive
Glim Git: Debian Includes

5
  • This crashed with the same error message. Aug 5 '15 at 3:13
  • 1
    In that case, since Debian has no Casper sub boot like Ubuntu, you need to add an init system to the USB. I'd recommend BusyBox. See this forum post
    – eyoung100
    Aug 5 '15 at 3:21
  • Why do I need that? If I just try to boot from the live iso, it works fine. Why do I need to add BusyBox to make it work from grub? Aug 5 '15 at 3:27
  • 2
    Because the ISO is compressed using SquashFS. During the boot sequene the SquashFS is decompressed and copied into RAM, and then recopied from RAM into the live filesystem once root is mounted. Casper contains an init system. Live does not, unless the LiveISO embeds in the boot sector of a drive. Thats what LiLi Creator and DD do, ie a bitwise Copy. The only thing enbeded in your USB boot sector is Grub, which you installed via a running distro, so Grub is looking for the Running distros initt system, which doesn't exist on the USB.
    – eyoung100
    Aug 5 '15 at 3:39
  • 2
    @drowdemon, therefore you need to tell grub not to use the init system which it thinks should be your PC's and point it to the init system which you install onto the USB.
    – eyoung100
    Aug 5 '15 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.