|
今天把Ubuntu9.04安裝到了自己1G的優(yōu)盤(pán)上,但是每次為了使用Ubuntu USB而切換系統(tǒng)的話(huà),那是件無(wú)法忍受的麻煩事情,所以想想辦法,希望能從VirtualBox中從USB引導(dǎo)系統(tǒng)。不過(guò)很遺憾,在VirtualBox 中按F12鍵調(diào)出的啟動(dòng)菜單中,除了從硬盤(pán)啟動(dòng)外,剩下只有“Floppy”、“CD-ROM”、“LAN”,唯獨(dú)沒(méi)有從USB啟動(dòng)。也就是 說(shuō),VirtualBox不支持USB設(shè)備直接啟動(dòng)。 引用內(nèi)容[marco.chan@fedora ~]$ sudo fdisk -l
省略以上內(nèi)容... Disk /dev/sdb: 1000 MB, 1000341504 bytes 255 heads, 63 sectors/track, 121 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0004e319 省略以下內(nèi)容...
引用內(nèi)容[marco.chan@fedora ~]$ ls -l /dev/sdb #查看/dev/sdb屬性
brw-rw---- 1 root disk 8, 16 2009-05-13 14:34 /dev/sdb
引用內(nèi)容[marco.chan@fedora ~]$ sudo chmod o+rw /dev/sdb #給marco.chan這個(gè)賬號(hào)添加rw屬性
引用內(nèi)容[marco.chan@fedora ~]$ VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/HardDisks/linuxhobbyUsb.vmdk -rawdisk /dev/sdb -register
VirtualBox Command Line Management Interface Version 2.2.2 (C) 2005-2009 Sun Microsystems, Inc. All rights reserved. RAW host disk access VMDK file /home/marco.chan/.VirtualBox/HardDisks/linuxhobbyUsb.vmdk created successfully. 看 到上面的提示信息,表示虛擬硬盤(pán)鏡像文件已經(jīng)建好了!這是鏡像連接文件而已,簡(jiǎn)單的理解就是一個(gè)ln -s文件,并不會(huì)在“~/.VirtualBox/HardDisks/“下產(chǎn)生實(shí)際數(shù)據(jù),手冊(cè)中有這么一句”which will not contain any actual data, as this will all be stored on the physical dis。“ 引用內(nèi)容[marco.chan@fedora ~]$ ls -l .VirtualBox/HardDisks/
total 5170244 -rw------- 1 marco.chan marco.chan 1171292672 2009-04-14 21:15 CentOS5.vdi -rwxrwxrwx 1 marco.chan marco.chan 994091520 2009-03-23 12:42 disk_windows.vdi -rw------- 1 marco.chan marco.chan 3123741184 2009-05-13 14:29 Fedora10.vdi -rw------- 1 marco.chan marco.chan 532 2009-05-13 14:56 linuxhobbyUsb.vmdk #就是這個(gè)東東,才532字節(jié)大小。
引用內(nèi)容[marco.chan@fedora ~]$ alias vboxusb='sudo chmod o+rw /dev/sdb'
from site : http://www.oschina.net/discuss/thread/505?lp=41
|
|
|
來(lái)自: 農(nóng)夫子oice > 《VirtualBox》