I would like to create a bootable Linux ISO on a USB drive under Debian 9. I found that the ISO is only bootable if it has been written to the disk /dev/XdY. If the ISO is written to a specific partition, e.g. /dev/sdd1, then it is not bootable. What is the technical reason behind this?

It works after writing the ISO to a partition and deleting the partition afterwards using Gnome-Disk, this does not delete the file, but makes the disk bootable.

  • If you're using BIOS+MBR, what did you get if mark that partition as the only boot-able? I believe standard MS-DOS MBR code will chain boot your boot-able partition. – 炸鱼薯条德里克 Sep 17 '18 at 2:11
  • I used sudo dd if=/home/<Windows 10 ISO> of=/dev/sdX to write the ISO to the USB stick, for some reason, the option Gnome-Disk >> Edit partition >> Bootable is greyed out. – david Sep 19 '18 at 18:50
  • BIOS machines boot disks.
  • UEFI machines boot the UEFI partition

So neither of those boot just any partition.

If you're looking to have a bootable ISO booting from a partition, you can add the ISO file to /etc/grub.d/40_custom and then grub will "boot" the ISO for you.

E.G. for gparted on my machine where /opt lives in hd2,gpt2

menuentry "GParted Live ISO" {
  set ISOFile="/opt/Live-ISOs/gparted-live-0.31.0-1-amd64.iso"
  loopback loop (hd2,gpt2)$ISOFile
  linuxefi (loop)/live/vmlinuz boot=live components config findiso=$ISOFile ip=frommedia toram=filesystem.squashfs union=overlay username=user
  initrdefi (loop)/live/initrd.img
  • 2
    nice idea using grub for the ISO. – Rui F Ribeiro Sep 16 '18 at 19:27
  • May I ask why linuxefi and initrdefi ? I've only done this without efi. – 炸鱼薯条德里克 Sep 17 '18 at 2:08
  • Because my machine is an UEFI machine and I didn't even try the originals. Ping me in chat if you want me to try @神秘德里克 – Fabby Sep 17 '18 at 10:05
  • 1.) What is the technical reason that deleting a partition actually makes an ISO/drive bootable? 2.) I need to install Windows 10 on my old ThinkPad R60 and copied the ISO onto a USB stick from Debian 9, but it does not seem to be recognized as bootable by the laptop. What am I doing wrong? – david Sep 19 '18 at 16:04
  • 1
    That solves the question! Thx – david Sep 20 '18 at 19:57

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.