5

I need to create an image to be able to mount the install DVD inside virtualbox in order to boot and install Windows.

Important: I need to do it using the command line.

I tried with genisoimage as suggested here and created an image using the command below but it turned out not bootable...

genisoimage -r -J -o cd_image.iso /cdrom

What I need is to RIP my original bootable DVD into a bootable IMAGE that I can mount in virtualbox.

So I thought I would ask how to A) convert that ISO file into a bootable one or B) re-create the ISO making it bootable with genisoimage or other command.

  • I want to create an ISO image file so that I can boot a virtualbox machine from it. I don't want a USB stick.. I will check the mentioned question. – lpanebr Jun 16 '14 at 18:12
  • I need to do it from the command line. Will try to find info with dd – lpanebr Jun 16 '14 at 18:53
  • Use the original iso. How to create a custom windows install image is off topic here. – psusi Jun 17 '14 at 1:22
  • 1
    @psusi There is no original ISO in this case; the OP has a Windows installation CD/DVD. Furthermore, it's very unlikely this is off-topic, as it's really a question about how to rip a CD to an ISO while maintaining DOS/Windows style boot information. And considering that we actually have an open and highly upvoted question about how to create USB media for installing Windows (from Ubuntu), this question would probably be on-topic even if it were specific to installing Windows (which it is not). – Eliah Kagan Jun 17 '14 at 14:00
  • 1
    @psusi Obviously there's two computers here, one of which has an optical drive. Also, most people use "iso" to mean "iso image file." It's rare and probably incorrect to call a physical disc with ISO-9660 compliant data written to it "an iso." Besides the answer that's already here, your comment, which is not specific to installing Windows, itself goes a long way toward answering this. Maybe this is a duplicate; I don't think it's off-topic. – Eliah Kagan Jun 17 '14 at 16:03
8

I found here how to do it using the dd command and as far as I can tell it will work for any bootable media.

The command below created a bootable DVD image of my Windows 7 installation disc from the Ubuntu command line:

dd if=/dev/cdrom of=/output/path/forYourImage.iso bs=2k

Note 1: the generated image will only be bootable if the source media is bootable.

Note 2: in my case, since I was on a headless server, I first used sudo lshw -c disk to find out where on /dev/ my cdrom drive was located.

Note 3: also in my case, the cdrom was not mounted so I had to mount it with sudo mount /dev/sr0 /cdrom

  • Smoke and mirrors: you can just cp /dev/cdrom /output/path/forYourImage.iso. There is no dark art being mastered by dd. – starfry Oct 10 '18 at 18:09
2

To create a bootable ISO image, you have to specify to the command that you want this. By default, the ISO image you will create won't be bootable.

With genisoimage, you can use the following command line : genisoimage -b isolinux/isolinux.bin -c isolinux/isolinux.cat -r -J -o cd_image.iso /cdrom

Assuming that a directory called isolinux has been created under the root of your source directory from which you create the ISO file.

The file isolinux.cat will be created by the command, this is a catalog needed for the boot loader. The file isolinux.bin is the image of a bootloader, valid for a CD or DVD. These images are available in the syslinux package. Check that you have this package installed, if not perform

sudo apt-get install syslinux-common

Under /usr/share/syslinux you will find a predefined bootload, the file isolinux.bin.

More info on the official web site of Syslinux (generic Linux information)

  • 2
    @EgyptBeast For the future: no need to leave a comment inside the text. That's what the comment field is for! ;-) – Fabby Jan 6 '15 at 16:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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