7

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.

lpanebr
  • 1,297

2 Answers2

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

lpanebr
  • 1,297
3

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)

Fabby
  • 35,017
Benoit
  • 7,637