Changes between Version 18 and Version 19 of Developer/VirtualMachines/VirtualBox
- Timestamp:
- 02/05/18 22:04:34 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Developer/VirtualMachines/VirtualBox
v18 v19 234 234 As an alternative to booting RTEMS applications from the virtual network via TFTP you can also boot them from a virtual drive. 235 235 236 Although creating a virtual drive suitable for booting RTEMS is not trivial, booting RTEMS applications from the drive is almost as easy as booting them via TFTP. A TFTP server is not required. 237 238 A few methods for transferring files from the host to the virtual drive (and back) are discussed below. 239 236 240 == Creating the Disk Image == 237 241 238 1) Create a new virtual machine with a fixed-size, VHD hard disk. Attach a SystemRescueCD image as the optical drive. 242 You will need a Linux SystemRescueCD image to partition the virtual drive, format the partition and install GRUB. http://www.system-rescue-cd.org/. You only need to attach this CD image to the virtual machine when you create the virtual drive. 243 244 1) Create a new virtual machine with a fixed-size, VHD hard disk. Attach the SystemRescueCD image as the optical drive. 239 245 240 246 A) I created a 32-bit Ubuntu compatible machine. (It has to have … … 246 252 want to mount the disk from Windows. A VHD fixed-size disk 247 253 is just a hard disk image with a footer, so you can mount 248 it in Linux and/or access it with mtools (or other hard disk254 it in Linux (via loopback) and/or access it with mtools (or other hard disk 249 255 image manipulation tools). I created a 50 MB hard disk. 250 251 C) Google SystemRescueCD to find the free CD.252 256 253 257 2) Boot the virtual machine from the SystemRescueCD. Startup the graphical interface by typing "startx" at the command prompt. Start the "GParted" tool from the "System" menu. Create a "gpt" partition table on the disk (from the Device menu). Create a new 1 MB primary, ext4 partition for grub (the boot manager). Align the partition to a cylinder. Create a second primary, FAT32 partition that takes up the remainder of the space. Again, align the partition to a cylinder (not necessary if you don't intend to use mtools). Be sure to apply the operations by clicking on the big green check mark. Right-click on the first partition (/dev/sda1), select "Manage Flags" and click on "bios_grub". Right-click on the second partition (/dev/sda2) and format to FAT32. Close GParted. … … 297 301 298 302 299 4) Use the VirtualBox Virtual Media Manager to change the type of the VHD disk from "normal" to "immutable". This will prevent VirtualBox from opening the disk image with write-access. This detaches the disk from the Virtual Machine, so you will need to reattach it. Remove the SystemRescueCD from the machine. Restart the Virtual Machine and verify that it boots to a grub prompt.303 4) Use the VirtualBox Virtual Media Manager to change the type of the VHD disk from "normal" to "immutable". This will prevent VirtualBox from opening the disk image with write-access. This detaches the disk from the Virtual Machine, so you will need to reattach it. Remove the SystemRescueCD from the machine. Restart the Virtual Machine (booting it from the new virtual drive now) and verify that it boots to a grub prompt. 300 304 301 305 A) Changing the type to "immutable" allows you to open the disk image