Changes between Version 18 and Version 19 of Developer/VirtualMachines/VirtualBox


Ignore:
Timestamp:
02/05/18 22:04:34 (6 years ago)
Author:
Tony Richardson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developer/VirtualMachines/VirtualBox

    v18 v19  
    234234As an alternative to booting RTEMS applications from the virtual network via TFTP you can also boot them from a virtual drive.
    235235
     236Although 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
     238A few methods for transferring files from the host to the virtual drive (and back) are discussed below.
     239
    236240== Creating the Disk Image ==
    237241
    238 1) Create a new virtual machine with a fixed-size, VHD hard disk. Attach a SystemRescueCD image as the optical drive.
     242You 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
     2441) Create a new virtual machine with a fixed-size, VHD hard disk. Attach the SystemRescueCD image as the optical drive.
    239245   
    240246   A) I created a 32-bit Ubuntu compatible machine.  (It has to have
     
    246252   want to mount the disk from Windows.  A VHD fixed-size disk
    247253   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 disk
     254   it in Linux (via loopback) and/or access it with mtools (or other hard disk
    249255   image manipulation tools).  I created a 50 MB hard disk.
    250 
    251    C) Google SystemRescueCD to find the free CD.
    252256
    2532572) 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.
     
    297301
    298302   
    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.
     3034) 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.
    300304   
    301305   A) Changing the type to "immutable" allows you to open the disk image