[SOLVED] How do you make a bootable ISO from a bootable USB stick?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've searched the internets on how to do this and from what I can see everyone says to simply use dd to copy the stick image to a file.
Code:
dd if=/dev/sdb of=usb.iso
I do this but this file when attached to a Virtualbox VM will not boot.
First.. I find it kinda hard to believe that just copying the image of a USB stick makes an ISO file, but there are tons of pages that say so.
Second... the method seems kinda absurd because it makes a gigantic file when the contents of the USB stick can be rather small.
Anyway, lets assume the above two points mean nothing. The problem is the resulting file won't boot.
I can't even mount this ISO using loop:
Code:
computer # mount -o loop usb.iso mnt
mount: you must specify the filesystem type
computer # mount -t vfat -o loop usb.iso mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
If I fdisk list the contents of the file, it looks pretty much exactly the same as the USB device /dev/sdb:
Code:
computer # fdisk -l usb.iso
Disk usb.iso: 512 MB, 512753664 bytes
255 heads, 63 sectors/track, 62 cylinders, total 1001472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cb549
Device Boot Start End Blocks Id System
usb.iso1 * 63 996029 497983+ c W95 FAT32 (LBA)
This dd method of making an ISO seems like a dead end. Does anyone know a method that works?
Edit - pls I do not want the method to make a vbox vmdk link (I know that one). I need an ISO. Thanks
You probably just need to run isohybrid on your .iso file.
To create your .iso file, copy everything from the USB drive into a folder on your hard drive, & then make your .iso file from the contents of that folder.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513
Rep:
Are you sure the USB flash drive will boot? Try booting it with VB. I'm not positive what's going on, but dd is the way to do the job. And, not just any bootable USB will work to make an .iso file. It has to be a USB that was created by writing an .iso to the drive.
Isohybrid will take a bootable iso and make it so it will boot off a USB drive. Iso is typically used for CD/DVD media, which have a different boot specification than a regular drive.
Last edited by AwesomeMachine; 07-28-2018 at 08:45 AM.
Yes I'm sure the key will boot.
It boots on a physical machine.
I am also able to make it boot in a Vbox VM (there is a command which makes a small fake vmdk link to the USB key).
I did a little more research and it matches what you are saying about ISO and USB disks having different booting specs.
I think that must be the problem.
Funny thing is that 99 out of 100 internet hits about "how to convert a bootable USB to a bootable ISO" say to use dd (when it seems it can't work!!!).
If there is a way to make it work, I'd like to know.
I want to make an ISO and test that it boots in Virtualbox.
I need the ISO because I want to make a multiboot USB key. The software that makes the multiboot key needs an ISO. For most software (clonezilla, systemrescuecd, etc) you can get an ISO. For this USB key, all I have is the key.
Your correct, hard drives including USBs use a different boot code then CDs/DVDs. While dd creates a byte for byte image file of the flash drive it isn't an ISO i.e CD ISO9660 filesystem.
If whats installed on the flash drive is from a live distribution then it might be easier to just download that ISO file and use that for your multiboot USB setup. Can you post what is currently running on your flash drive? That would help us determine on how or if it is possible to convert it to a live CD.
Thanks - they key contains the USB bootable Macrium Reflect.
I do know that Macrium is also on the Hiren's bootable ISO. However I did want to still find out how to convert the USB to bootable ISO for these reasons:
I'm not sure if the version I have is the same or compatible with the Hiren's version (just want to be safe)
the Hiren's is kinda big and has a lot I don't need
I will likely come across other bootable USBs where I want to do the same (would be nice to know)
But it looks like it is confirmed that going from bootable USB to bootable ISO is a no-go.
As I said earlier, copy all the USB files to a directory on your HDD, & make your bootable CD/DVD from that.
Thanks I tried that and all of the other methods in the link. None of them work. I thought AwesomeMachine and michaelk confirmed they will never work as USB and ISO boot differently?
Macrium Reflect is a windows program and I assume that you created a bootable flash drive using a Windows utility.
While genisoimage as posted in the link creates an ISO file that can be burned to disc it will not be bootable. There are several ways to make a disc bootable. One way is via isolinux.
I had played with a few different solutions for multibooting a USB. Even with standard ISOs, most of these multiboot solutions had problems. For example, for one solution, if you put more than one PE ISO on the key, only the last one would boot. So, nothing but problems, plus I don;t run Windows so that limits the choice of multiboot solutions.
Then I tried easy2boot. It can be configured on linux. The linux instructions seem a bit complex, but after you read it a few times and play, it turns out to be simple to setup (BTW there is a Windows interface which I would imagine is easier to use). Anyway, it had no problem booting any standard ISO that I threw at it.
It worked so well that I though, what the heck, I'll throw the dd disk image at it. That is, the dd image that I made from the original bootable USB, saved as a .img file. Well, that didn't boot. That image had been made with dd and the source was the whole USB disk (ie /dev/sdb). Then I tried making a dd image of just the partition (/dev/sdb1). I threw it on the multiboot USB and... I'll be darned... it booted! So it turns out I didn't need to convert to ISO (I over complicated it).
[QUOTE=michaelk;5885308]Macrium Reflect is a windows program and I assume that you created a bootable flash drive using a Windows utility.
While genisoimage as posted in the link creates an ISO file that can be burned to disc it will not be bootable. There are several ways to make a disc bootable. One way is via isolinux.
This seems good followed it until it wants more, but I am now stuck as I =it says:
Copy "[bios/]core/isolinux.bin" from the Syslinux archive
For version 5.00 or newer, also copy "[bios/]com32/elflink/ldlinux/ldlinux.c32" from the Syslinux archive
I just cannot find the Syslinux archive
Help will appreciated working two weeks so far to crack copying a bootable iso.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.