Differences between revisions 4 and 5
Revision 4 as of 2018-01-12 16:37:21
Size: 684
Editor: asbesto
Comment:
Revision 5 as of 2018-01-17 14:09:09
Size: 1579
Editor: asbesto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
== Utility ==

./vidisk

{{{

#!/bin/bash
#
# vidisk - setup and launch virtualbox to boot an old hard disk ;)
#
# launch as root: ./vidisk /dev/sdx
#
if [ -z "$1" ]
  then
    echo "vidisk - setup and launch virtualbox to boot an old hard disk ;)"
    echo "by Museo dell'Informatica Funzionante - Computer Museum"
    echo "http://museum.freaknet.org"
    echo " "
    echo "Usage: as root, launch"
    echo " "
    echo "./vidisk /dev/sdx"
    echo " "
    echo "where sdx is your hard disk device."
    exit 1
fi

if [ -z "$2" ]
   then
       echo "Error - filename required! (no extension, please)"
       exit 1
fi

rm ./$2.vmdk 1>/dev/null 2>&1

VBoxManage internalcommands createrawvmdk -filename ./$2.vmdk -rawdisk $1
VBoxManage storageattach adoscomputer --storagectl "IDE" --port 0 --device 0 --type hdd --medium ./$2.vmdk

virtualbox

}}}

Using Virtualbox to read / boot old hard disks directly

Assuming you fit your old HD into an USB reader, e.g. it's on /dev/hdd now:

  • Create a virtualbox computer without a virtual disk attached, for example, named "adoscomputer".

After that:

  • VBoxManage internalcommands createrawvmdk -filename /root/discodos.vmdk -rawdisk /dev/sdd
  • VBoxManage storageattach adoscomputer --storagectl "IDE" --port 0 --device 0 --type hdd --medium ./discodos.vmdk

Start your virtualbox and it MUST boot from that hard disk. :)

Utility

./vidisk

#
# vidisk - setup and launch virtualbox to boot an old hard disk ;)
#
# launch as root: ./vidisk /dev/sdx
#
if [ -z "$1" ]
  then
    echo "vidisk - setup and launch virtualbox to boot an old hard disk ;)"
    echo "by Museo dell'Informatica Funzionante - Computer Museum"
    echo "http://museum.freaknet.org"
    echo " "
    echo "Usage: as root, launch"
    echo " "
    echo "./vidisk /dev/sdx"
    echo " "
    echo "where sdx is your hard disk device."
    exit 1
fi

if [ -z "$2" ]
   then
       echo "Error - filename required! (no extension, please)"
       exit 1
fi

rm ./$2.vmdk 1>/dev/null 2>&1

VBoxManage internalcommands createrawvmdk -filename ./$2.vmdk -rawdisk $1
VBoxManage storageattach adoscomputer --storagectl "IDE" --port 0 --device 0 --type hdd --medium ./$2.vmdk

virtualbox

https://www.virtualbox.org/manual/ch09.html#rawdisk


CategoryMuseo

Museo/RecuperoDati/Virtualbox (last edited 2018-01-17 14:09:09 by asbesto)