ディスク パーティションに Linux をインストールし、Windows の起動に影響を与えず、VirtualBox で Linux を実行する方法

ディスク パーティションに Linux をインストールし、Windows の起動に影響を与えず、VirtualBox で Linux を実行する方法

ハード ドライブに作成したパーティションを使用して起動できるように仮想ボックスを設定しました。これは仮想ドライブではありません。このパーティションに Linux Mint をインストールする前に、Windows の起動に影響を与えないように構成したいと思います。つまり、起動オプション画面が表示されたり、起動プロセスが遅くなったりしないようにしたいのです。ただし、Linux を実際のパーティションにインストールすることが重要です。これにより、後で VM をキャプチャしてハード ディスクに移動するのが簡単になり、暗号化ソフトウェアの動作も改善されます。これを行う方法はありますか?

パーティションからのブートを設定した方法がこれに関係する場合、これは私が使用した方法です。

2) Create the vmdk file:
2.1) Find the partitions that are used by your linux installation: start cmd as admin and cd into the directory you installed virtualbox and run:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.

Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0x06 0 /1 /1 25 /254/63 203 63
2 0x07 26 /1 /40 1023/254/63 23999 417792
3 0x83 1023/254/63 1023/254/63 161242 49567744
5 0x07 1023/254/63 1023/254/63 42343 379792728
6 0x82 1023/254/63 1023/254/63 8635 466513920


PhysicalDrive0 indicates the first hard disk. Sort of like /dev/sda, /dev/sdb etc. Partition types 0×83 and 0×82 are the swap and ext3 partitions here.

From the listing identify all the partitions that are required by linux ( rootfs, swap, boot…)
Dont consider NTFS/VFAT partitions that you want to share between linux and windows.

2.2) Create the vmdk file with the partitions you just identified

VBoxManage.exe internalcommands createrawvmdk -filename C:\path\ubuntu.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 3,6 -register

3) Start virtualbox. You have to start it as administrator, otherwise it wont be able to access the rawdisk.

4) Create a new VM using the vmdk you just created. This is a straightforward process. You would want to enable IO-APIC and if your box has muscle, allow more cores, 2d/3d acceleration etc.

5) And now, you’re all set. Start the VM. You should see the familiar grub boot screen. Select your ubuntu installation and it should come up without any issues.

答え1

vmdk は vmware 用だと思っていました (ほとんどの場合、virtualbox で使用できますが、常に使用できるとは限りません)。Virtualbox は raw ディスクをサポートしています。

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

ただし、これはあなたが探しているものではないかもしれません。私の経験では、パフォーマンスの向上は最小限なので、面倒な作業にはなりません。Linux の場合、宛先のディスク パーティションが少なくとも VM のサイズである限り、後でディスクを dd して v2p または v2v を実行する方がはるかに簡単です。ハードウェアの違いは後で必ず対処する必要があります。

考慮すべきもう 1 つの点は、raw ディスクを試してみたい場合に、USB 外付けディスク/スティックを使用することです。

関連情報