Line 1: |
Line 1: |
− | Welcome to Simone Giustetti's wiki pages.
| + | {{header_en|title=StudioSG - Virtualbox 3-D graphic acceleration| keyword={{Template:Keyword_en_virtualbox}}| description=How-to enable 3-D graphic acceleration for a Virtualbox virtual machine running Slackware Linux | link_page=virtualbox_usb_install}} |
− | | |
− | | |
− | Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=virtualbox_usb_install Italiano]
| |
− | | |
− | ---- | |
− | | |
| | | |
| What follows is somewhat of a hack to install a VirtualBox virtual machine from an '''Usb''' stick instead of a '''Dvd''' or '''Iso''' image. An Usb install is impossible per se as '''the VirtualBox Bios does not support booting from an Usb device'''. A "lack" that limits user options when installing as well as when the machine is in need of a rescue system to solve operating system repair. | | What follows is somewhat of a hack to install a VirtualBox virtual machine from an '''Usb''' stick instead of a '''Dvd''' or '''Iso''' image. An Usb install is impossible per se as '''the VirtualBox Bios does not support booting from an Usb device'''. A "lack" that limits user options when installing as well as when the machine is in need of a rescue system to solve operating system repair. |
| | | |
| This limitation can however be circumvented by mean of a VirtualBox less known functionality. VirtualBox can run a machine from a physical disk or disk partition instead of an image file with *.vdi extension. This feature goes by the name of ''“raw hard disk access”'' whose details can be found in the emulator manual. | | This limitation can however be circumvented by mean of a VirtualBox less known functionality. VirtualBox can run a machine from a physical disk or disk partition instead of an image file with *.vdi extension. This feature goes by the name of ''“raw hard disk access”'' whose details can be found in the emulator manual. |
| + | |
| | | |
| == RAW HARD DISK ACCESS == | | == RAW HARD DISK ACCESS == |
| | | |
| Permits a guest system to access a host hard disk or a disk partition bypassing the host machine file system. Direct access is a '''VMDK file format only feature''', one of the many VirtualBox supported virtual machine formats. A VMDK image file is mandatory to take advantage of raw hard disk access. Once created, the image file can be used as any other virtual disk and assigned to a virtual machine. | | Permits a guest system to access a host hard disk or a disk partition bypassing the host machine file system. Direct access is a '''VMDK file format only feature''', one of the many VirtualBox supported virtual machine formats. A VMDK image file is mandatory to take advantage of raw hard disk access. Once created, the image file can be used as any other virtual disk and assigned to a virtual machine. |
| + | |
| | | |
| == BOOT IMAGE == | | == BOOT IMAGE == |
Line 20: |
Line 16: |
| | | |
| Before creating the image we will prepare the device. Connect the Usb stick to the Pc and try and discover the associated system device handler. Start a '''root shell''' and run the dmesg command: | | Before creating the image we will prepare the device. Connect the Usb stick to the Pc and try and discover the associated system device handler. Start a '''root shell''' and run the dmesg command: |
− | root@darkstar_4:/root# clear;dmesg | tail -20 | + | '''clear''';'''dmesg''' | '''tail''' ''-20'' |
| [15044.405959] sd 8:0:0:0: [sdb] Assuming drive cache: write through | | [15044.405959] sd 8:0:0:0: [sdb] Assuming drive cache: write through |
| [15044.405966] sdb: sdb1 | | [15044.405966] sdb: sdb1 |
Line 45: |
Line 41: |
| We can now copy the boot image of choice to the usb stick. | | We can now copy the boot image of choice to the usb stick. |
| | | |
− | <pre style="color:red">Please note: the stick data will be wholly overwritten | + | <pre style="color:red">Please note: the stick data will be wholly overwritten and the device will not be usable again without proper formatting.</pre> |
− | and the device will not be usable again without proper formatting.</pre> | |
| | | |
| Le's suppose we went for a Slackware Linux 13.1 install image; the related file can be found inside the '''usb-and-pxe-installers''' directory of any install media or from a network Ftp repository. File name is '''usbboot.img'''. You are strongly suggested to read file '''README_USB.TXT''' located inside directory usb-and-pxe-installers for more information about the following procedure. | | Le's suppose we went for a Slackware Linux 13.1 install image; the related file can be found inside the '''usb-and-pxe-installers''' directory of any install media or from a network Ftp repository. File name is '''usbboot.img'''. You are strongly suggested to read file '''README_USB.TXT''' located inside directory usb-and-pxe-installers for more information about the following procedure. |
| | | |
− | Command dd will be used to copy the image file to the media: ''dd if=<path>/usbboot.img of=<device> bs=512''. Start a '''root shell''' and run the following line: | + | Command dd will be used to copy the image file to the media: |
− | root@darkstar_4:/root# dd if=/mnt/floppy/slackware/stable32/usb-and-pxe-installers/usbboot.img of=/dev/sdc bs=512 | + | '''dd''' if=<path>/usbboot.img of=<device> bs=512 |
| + | Start a '''root shell''' and run the following line: |
| + | '''dd''' if=/mnt/floppy/slackware/stable32/usb-and-pxe-installers/usbboot.img of=/dev/sdc bs=512 |
| The installation media will be ready upon prompt return. | | The installation media will be ready upon prompt return. |
| + | |
| | | |
| == VIRTUAL DISK == | | == VIRTUAL DISK == |
| | | |
− | Creating a virtual disk from a hard disk in VirtualBox requires use of the VBoxManage command followed by a proper option list. | + | Creating a virtual disk from a hard disk in VirtualBox requires use of the '''VBoxManage''' command followed by a proper option list. |
| The resulting image will contain no actual data. All data will be written into the physical drive. | | The resulting image will contain no actual data. All data will be written into the physical drive. |
| | | |
− | '''VBoxManage''' is the command line interface (cli) for VirtualBox administration. Command syntax is very similar for Linux, MacOsX, Unix e Windows operating systems. Some differences remain in operating system specific areas like file system path names conventions. | + | '''VBoxManage''' is the command line interface (cli) for VirtualBox administration. Command syntax is very similar for Linux, MacOsX, Unix and Windows operating systems. Some differences remain in operating system specific areas like file system path names conventions. |
− | :'''VBoxManage internalcommands createrawvmdk -filename''' <path>/<file.vmdk> '''-rawdisk''' <dev> '''-register'''
| + | '''VBoxManage''' internalcommands createrawvmdk ''-filename'' <path>/<file.vmdk> ''-rawdisk'' <dev> ''-register'' |
− | :where:
| + | where: |
− | ::<path>/<file.vmdk> is the host machine file system absolute path to the image file.
| + | : <path>/<file.vmdk> is the host machine file system absolute path to the image file. |
− | ::<dev> is the host machine absolute path for the device file related to the stick (Unix-like systems. Please refer to the user manual for the Windows syntax).
| + | : <dev> is the host machine absolute path for the device file related to the stick (Unix-like systems. Please refer to the user manual for the Windows syntax). |
− | ::Option ''register'' registers the newly configured device with the emulator available disks list. If omitted, the registration should be executed later recurring to the Gui.
| + | : Option ''register'' registers the newly configured device with the emulator available disks list. If omitted, the registration should be executed later recurring to the Gui. |
| '''All data will be read from and written to <dev>'''. | | '''All data will be read from and written to <dev>'''. |
| | | |
| To create a virtual disk recurring to the cli interface, please run command: | | To create a virtual disk recurring to the cli interface, please run command: |
− | root@darkstar_4:/root# VBoxManage internalcommands createrawvmdk -filename /opt/vm/test.vmdk -rawdisk /dev/sdc -register | + | '''VBoxManage''' internalcommands createrawvmdk ''-filename'' /opt/vm/test.vmdk ''-rawdisk'' /dev/sdc ''-register'' |
| Oracle VM VirtualBox Command Line Management Interface Version 3.2.10 | | Oracle VM VirtualBox Command Line Management Interface Version 3.2.10 |
| (C) 2005-2010 Oracle Corporation | | (C) 2005-2010 Oracle Corporation |
Line 76: |
Line 74: |
| | | |
| The newly created disk shall be assigned to the to be installed host machine. The command is: | | The newly created disk shall be assigned to the to be installed host machine. The command is: |
− | :'''VBoxManage storageattach''' <virtual_machine> '''--storagectl "IDE Controller" --port''' <port> '''--device''' <device number> '''--type hdd --medium''' <path>/<file.vmdk>
| + | '''VBoxManage''' storageattach <virtual_machine> ''--storagectl'' "IDE Controller" ''--port'' <port> ''--device'' <device number> \ |
− | :where:
| + | ''--type'' hdd ''--medium'' <path>/<file.vmdk> |
− | ::<virtual_machine> it's the virtual machine name.
| + | where: |
− | ::<port> is the Ide channel identifier. use 0 for Primary or 1 for Secondary.
| + | : <virtual_machine> it's the virtual machine name. |
− | ::<device number> is the Ide device identifier. Use 0 for Master or 1 for Slave.
| + | : <port> is the Ide channel identifier. use 0 for Primary or 1 for Secondary. |
− | ::<path>/<file.vmdk> is the host system absolute path to the virtual disk.
| + | : <device number> is the Ide device identifier. Use 0 for Master or 1 for Slave. |
| + | : <path>/<file.vmdk> is the host system absolute path to the virtual disk. |
| Supposing to configure the Usb stick as a Secondary Master Ide device: | | Supposing to configure the Usb stick as a Secondary Master Ide device: |
− | root@darkstar_4:/root# VBoxManage storageattach vms131v32 --storagectl "IDE Controller" --port 1 --device 0 --type hdd \ | + | '''VBoxManage''' storageattach vms131v32 ''--storagectl'' "IDE Controller" ''--port'' 1 ''--device'' 0 ''--type'' hdd \ |
− | --medium /opt/vm/test.vmdk | + | ''--medium'' /opt/vm/test.vmdk |
− | :The allocation procedure can be executed frothe Gui too.
| + | The allocation procedure can be executed from the Gui too. |
| + | |
| | | |
| == STARTING THE INSTALLATION == | | == STARTING THE INSTALLATION == |
Line 96: |
Line 96: |
| | | |
| | | |
− | For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net | + | For any feedback, questions, errors and such, please e-mail me at ''studiosg [at] giustetti [dot] net''. |
| | | |
| | | |
− | external links
| + | External links |
| | | |
| ---- | | ---- |
Line 108: |
Line 108: |
| ---- | | ---- |
| | | |
− | Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=virtualbox_usb_install Italiano]
| + | {{footer_en | link_page=virtualbox_usb_install}} |