Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: dd command for creating iso file.

  1. #1
    Join Date
    Dec 2009
    Beans
    112

    Post dd command for creating iso file.

    I have a bootable USB stick (8 GB is its size) containing windows 10 inside it. I want to use it in my VirtualBox.For that purpose, I create an iso file using the dd command but before it, I use lsblk command to see what Ubuntu looks like that drive.

    sdb 8:16 1 7.3G 0 disk
    └─sdb1 8:17 1 7.3G 0 part /media/test/v7283743

    By using the command I am just showing the output of the use drive # df -hT

    Filesystem Type Size Used Avail Usage% Mount on

    /dev/sdb1 fuseblk 7.4G 2.5G 4.9G 35% /media/test/v7283743


    My dd command is

    # dd if=/dev/sdb1 of=/home/test/Downloads/Windows10_Lite.iso
    15354112+0 records in
    15354112+0 records out
    7861305344 bytes (7.9 GB, 7.3 GiB) copied, 605.777 s, 13.0 MB/s

    Well, I create an iso file in the destination folder which is the same size as the USB stick. My windows bootable files data was approx 4 GB
    and remaining space was free in the USB so why dd create the ISO file the same as the USB stick size?

    2- When I try to connect that iso file with my virtual box machine it says " FATAL No bootable Medium Found !System Halted"

    Can you please me that where I am doing a mistake so I may fix it?
    Thanks
    Last edited by gardenair; March 21st, 2021 at 06:44 PM.

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,797
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: dd command for creating iso file.

    1: The dd command copies the entire filesystem, not just the part used for files.

    2: I've not that much experience with virtual machines, but my guess is that your .iso must be a copy of the entire device (including partition table), not just of the filesystem used in the bootable windows disk.

  3. #3
    Join Date
    Dec 2009
    Beans
    112

    Re: dd command for creating iso file.

    well at the moment my concern is only to create an iso file. Keep aside Virtual Machine for a moment.
    Does this mean if I have a USB of 64 GB containing only windows 10 bootable files dd command will create a 64 GB iso file? If yes it is the wrong thing. what is the correct way for creating an iso file?

  4. #4
    Join Date
    Jun 2018
    Beans
    160

    Re: dd command for creating iso file.

    In your command, dd sees /dev/sdb1 as a file with the size 7.3GiB. Had the USB stick been 64GB so would the image created therefrom with dd. The dd command will not remove unused space, you need another tool for that. You could also shrink the file system and the partition prior to the dd command.

    The reason for the VM not booting may be that your image does not contain the boot loader which is located prior to the partition(s), so instead of dd /dev/sdb1 you would need to dd the entire drive ( /dev/sdb ). But again, I'm sure there are better tools for the job than dd.
    Have a ubuntastic day!

  5. #5
    Join Date
    Aug 2006
    Beans
    13,139
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: dd command for creating iso file.

    First, you've told dd to copy the content of /dev/sdb1, and it did just that.
    Second, Microsoft provides Windows ISOs, just download it. Not sure where dd comes in.
    Last edited by DuckHook; March 22nd, 2021 at 02:21 AM. Reason: Courteous names

  6. #6
    Join Date
    Jun 2018
    Beans
    160

    Re: dd command for creating iso file.

    Quote Originally Posted by mikewhatever View Post
    Second, Microsoft provides Windows ISOs, just download it. Not sure where dd comes in.
    If he wants to keep his installation of Windows, an ISO from MS is not an option.
    Last edited by DuckHook; March 22nd, 2021 at 02:22 AM. Reason: Courteous names
    Have a ubuntastic day!

  7. #7
    Join Date
    Aug 2006
    Beans
    13,139
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: dd command for creating iso file.

    Quote Originally Posted by dinkidonk View Post
    If he wants to keep his installation of Windows, an ISO from MS is not an option.
    An installation of Windows 10 would never fit on an 8GB flash drive. You'd need at least 4 times the size, and forget about updates.
    An ISO of Windows, however, does fit, which is, apparently, what it is.
    Last edited by DuckHook; March 22nd, 2021 at 02:22 AM. Reason: Courteous names

  8. #8
    Join Date
    Jun 2018
    Beans
    160

    Re: dd command for creating iso file.

    Quote Originally Posted by mikewhatever View Post
    An installation of Windows 10 would never fit on an 8GB flash drive. You'd need at least 4 times the size, and forget about updates.
    An ISO of Windows, however, does fit, which is, apparently, what it is.
    You are probably right. I've not been into Windows for a long time and I was not aware if there was such a thing as "Windows Lite" with limited space usage
    Last edited by DuckHook; March 22nd, 2021 at 02:23 AM. Reason: Courteous names
    Have a ubuntastic day!

  9. #9
    Join Date
    Aug 2006
    Beans
    13,139
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: dd command for creating iso file.

    Quote Originally Posted by dinkidonk View Post
    You are probably right. I've not been into Windows for a long time and I was not aware if there was such a thing as "Windows Lite" with limited space usage
    Well, 32GB is the "limited space usage", exactly the requirement for Windows lite.
    Last edited by DuckHook; March 22nd, 2021 at 02:24 AM. Reason: Courteous names

  10. #10
    Join Date
    Jun 2014
    Beans
    6,156

    Re: dd command for creating iso file.

    If you have windows 10 lite on a bootable usb, why would you want to create an iso? Just use the VBoxManage command to boot the usb directly in VirtualBox. Plenty of site with tutorials on how to do this.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •