Id like to take my old windows laptop drive and image it so I can still use it in virtual box. For reference its a win 7 install on the drive.

Can I do this only using dd, and making the image an iso, and it will boot? Seems too easy!

  • bridgeenjoyer@sh.itjust.worksOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    4 days ago

    Ah I see. I’m not actually certain what kind of file dd makes of drives (is it just .img?) I have only used it for optical discs in the past.

    Is it even possible to make the drive image bootable in virtualbox then?

    • lurch (he/him)@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      dd just copies raw data. you can name it however you want. it’s not a specific format. but some file managers will react to the file extension. so if you name it .mpg they will try to launch a media player and .iso will make them think you want to burn it to a CD/DVD.

      What you may want to do is convert it to a Virtualbox Disk Image (.vdi) like so:

      VBoxManage convertfromraw <inputfile> <outputfile>.vdi --format= VDI
      #or
      VBoxManage internalcommands converthd -srcformat RAW -dstformat VDI <inputfile> <outputfile>.vdi
      #or
      VBoxManage convertdd <inputfile> <outputfile>.vdi --format VDI
      

      Also, on Linux there is a command literally called file and it will quickly probe files for what type they are. For raw disk images it will often say things like boot record or file system, because that’s what’s at the start.