Difference between revisions of "VirtualBox/Preparing a disk image"

From Sugar Labs
Jump to navigation Jump to search
Line 3: Line 3:
 
Instructions for preparing a VirtualBox disk image from a SoaS iso image file.
 
Instructions for preparing a VirtualBox disk image from a SoaS iso image file.
 
* (Taken from Dave Bauer's posting at http://schools.sugarlabs.org/mod/forum/discuss.php?d=27.)
 
* (Taken from Dave Bauer's posting at http://schools.sugarlabs.org/mod/forum/discuss.php?d=27.)
* Updated 09 June 2010 with [http://www.virtualbox.org/wiki/Downloads VirtualBox 3.2.4] and 32-bit Fedora.
+
* Updated 16 August 2010 with [http://www.virtualbox.org/wiki/Downloads VirtualBox 3.2.8] and 32-bit Fedora.
 
==Installing SoaS .iso image==
 
==Installing SoaS .iso image==
 
# Create a new VM, choose a name, such as Mirabelle
 
# Create a new VM, choose a name, such as Mirabelle
Line 16: Line 16:
 
# Enter an account name and startup Sugar.
 
# Enter an account name and startup Sugar.
 
# Open Terminal.
 
# Open Terminal.
# su -
+
# {{Code|su -}}
# parted
+
# {{Code|parted}}
# mklabel msdos
+
# {{Code|mklabel msdos}}
 
#: This makes a partition table.
 
#: This makes a partition table.
# mkpart primary ext2 0 2048
+
# {{Code|mkpart primary ext2 0 2048}}
 
#: You will receive this message:<br>Warning: The resulting partition is not properly aligned for best performance.<br>Ignore/Cancel?
 
#: You will receive this message:<br>Warning: The resulting partition is not properly aligned for best performance.<br>Ignore/Cancel?
 
#: Enter (I)gnore
 
#: Enter (I)gnore
# toggle 1 boot
+
# {{Code|toggle 1 boot}}
# quit
+
# {{Code|quit}}
# mke2fs /dev/sda1
+
# {{Code|mke2fs /dev/sda1}}
# /LiveOS/livecd-iso-to-disk --overlay-size-mb 200 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1<br>(for earlier versions of SoaS
+
# {{Code|/LiveOS/livecd-iso-to-disk --overlay-size-mb 1024 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1}}<br>(for earlier versions of SoaS
 
#: Blueberry - use /media/soas-2-blueberry/LiveOS/livecd-iso-to-disk<br>Strawberry - use /mnt/live/LiveOS/livecd-iso-to-disk)
 
#: Blueberry - use /media/soas-2-blueberry/LiveOS/livecd-iso-to-disk<br>Strawberry - use /mnt/live/LiveOS/livecd-iso-to-disk)
 
<ul>
 
<ul>
Line 65: Line 65:
 
This filesystem will be automatically checked every 36 mounts or
 
This filesystem will be automatically checked every 36 mounts or
 
180 days, whichever comes first.  Use tune2fs -c or -i to override.
 
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@localhost ~]# /LiveOS/livecd-iso-to-disk --overlay-size-mb 200 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1
+
[root@localhost ~]#
 +
[root@localhost ~]# /LiveOS/livecd-iso-to-disk --overlay-size-mb 1024 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1
 
Verifying image...
 
Verifying image...
 
/dev/sr0:  0ce28e3947106fd37bab9317abf09938
 
/dev/sr0:  0ce28e3947106fd37bab9317abf09938
Line 122: Line 123:
 
</ul>
 
</ul>
 
<ol start=20>
 
<ol start=20>
<li> shutdown -h now</li>
+
<li> {{Code|shutdown -h now}}</li>
 
</ol>
 
</ol>
 
==Installing VirtualBox Guest Additions==
 
==Installing VirtualBox Guest Additions==
 +
The VirtualBox Guest Additions requires installing [[wikipedia:Dynamic_Kernel_Module_Support|DKMS]] and compiling virtual device drivers for the Linux kernel.
 
# Unmount CD/DVD in VirtualBox settings, select 'Empty' for the CD/DVD device under 'Attributes'  
 
# Unmount CD/DVD in VirtualBox settings, select 'Empty' for the CD/DVD device under 'Attributes'  
 
# Start the virtual machine
 
# Start the virtual machine
 
# Open Terminal
 
# Open Terminal
# su -
+
# {{Code|su -}}
# yum install dkms gcc
+
<ol start=5>
#: (Other dependencies will be called into the installation.)
+
<li>Determine the kernel version,<br>
'''Note:''' The installation fails as of 27 June 2010 testing with 32-bit Fedora-14 while updating to glibc-common-2.12.90-3.i686<br>error: unpacking of archive failed on file /usr/lib/locale/locale-archive.tmpl: cpio: rename<br>Traceback (most recent call last):
+
{{Code|uname -a}}<br>
 
<pre>
 
<pre>
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 387, in callback
+
Linux localhost.localdomain 2.6.33.3-85.fc13.i686 #1 SMP Thu May 6 18:44:12 UTC 2010 i686 i686 i386 GNU/Linux</pre></li>
 +
<li>For SoaS-Mirabelle, the kernel is Linux-2.6.33.3-85.fc13, so specific kernel-headers and kernel-devel are needed:<br><br>
 +
{{Code|yum install kernel-headers-2.6.33.3-85.fc13 kernel-devel-2.6.33.3-85.fc13 dkms gcc}}<br>
 +
: (Other dependencies will be called into the installation.)
  
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 457, in _instCloseFile
+
{{Show|<Successful Terminal log from 16 Aug 2010 with Fedora 32 bit>  
 
 
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 246, in _scriptout
 
 
 
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 367, in log_scriptlet_output
 
 
 
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 223, in _commit
 
 
 
sqlite3.OperationalError: disk I/O error
 
error: python callback <bound method RPMTransaction.callback of <yum.rpmtrans.RPMTransaction instance at 0xa088b8c>> failed, aborting!
 
</pre>
 
(With 512 MB of memory allocated, the update seemed to hang on the glibc update. Boosting the memory to 1024 revealed the above failure.)
 
* The installation fails as of 27 June 2010 testing with 32-bit Fedora-14 while updating to glibc-common-2.12.90-3.i686
 
*: Using {{Code|dmsetup status}} the overlay consumption measured (after rebooting from a hang with 512 MB of memory) moved from 23376/409600 to 406568/409600 sectors.
 
* Installed Fedora-14 soas-i386-20100613.15.iso with this command line,
 
*: {{Code|/LiveOS/livecd-iso-to-disk --overlay-size-mb 1000 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1}}
 
*: {{Code|dmsetup status}} before and after
 
*: {{Code|yum install dkms gcc}}
 
*: yielded these results: 21376/2048000 and 868152/2048000 (512-byte segments)
 
*:: So it looks like at least 425 MiBytes of overlay is required for that installation.
 
*: After
 
*: {{Code|./VboxLinuxAdditions-x86.run}}
 
*: {{Code|dmsetup status}} showed 928872/204800 or 454 MiBytes of the overlay consumed.
 
 
 
 
 
{{Show|<Successful Terminal log from 21 May 2010 with Fedora 64 bit>  
 
 
|<pre>
 
|<pre>
[root@localhost ~]# yum install dkms gcc
+
[root@localhost ~]# yum install kernel-devel-2.6.33.3-85.fc13 kernel-headers-2.6.33.3-85.fc13 dkms gcc
 
Loaded plugins: presto, refresh-packagekit
 
Loaded plugins: presto, refresh-packagekit
fedora/metalink                                                          |  13 kB    00:00   
 
fedora                                                                    | 4.3 kB    00:00   
 
fedora/primary_db                                                        |  13 MB    00:18   
 
updates/metalink                                                          |  15 kB    00:00   
 
updates                                                                  | 4.5 kB    00:00   
 
updates/primary_db                                                        | 867 kB    00:00   
 
 
Setting up Install Process
 
Setting up Install Process
 
Resolving Dependencies
 
Resolving Dependencies
 
--> Running transaction check
 
--> Running transaction check
 
---> Package dkms.noarch 0:2.1.0.1-1.fc12 set to be updated
 
---> Package dkms.noarch 0:2.1.0.1-1.fc12 set to be updated
--> Processing Dependency: kernel-devel for package: dkms-2.1.0.1-1.fc12.noarch
+
---> Package gcc.i686 0:4.4.4-10.fc13 set to be updated
---> Package gcc.x86_64 0:4.4.4-2.fc13 set to be updated
+
--> Processing Dependency: cpp = 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
--> Processing Dependency: cpp = 4.4.4-2.fc13 for package: gcc-4.4.4-2.fc13.x86_64
+
--> Processing Dependency: libgomp = 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.4-2.fc13.x86_64
+
--> Processing Dependency: libgcc >= 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.4-2.fc13.x86_64
+
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.4-10.fc13.i686
 +
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.4-10.fc13.i686
 +
---> Package kernel-devel.i686 0:2.6.33.3-85.fc13 set to be installed
 +
---> Package kernel-headers.i686 0:2.6.33.3-85.fc13 set to be updated
 
--> Running transaction check
 
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.fc12 set to be updated
+
---> Package cloog-ppl.i686 0:0.15.7-1.fc12 set to be updated
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.fc12.x86_64
+
--> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.fc12.i686
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.fc12.x86_64
+
--> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.fc12.i686
---> Package cpp.x86_64 0:4.4.4-2.fc13 set to be updated
+
---> Package cpp.i686 0:4.4.4-10.fc13 set to be updated
---> Package glibc-devel.x86_64 0:2.12-1 set to be updated
+
---> Package glibc-devel.i686 0:2.12-3 set to be updated
--> Processing Dependency: glibc-headers = 2.12-1 for package: glibc-devel-2.12-1.x86_64
+
--> Processing Dependency: glibc = 2.12-3 for package: glibc-devel-2.12-3.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.x86_64
+
--> Processing Dependency: glibc-headers = 2.12-3 for package: glibc-devel-2.12-3.i686
---> Package kernel-devel.x86_64 0:2.6.33.4-95.fc13 set to be installed
+
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-3.i686
 +
---> Package libgcc.i686 0:4.4.4-10.fc13 set to be updated
 +
---> Package libgomp.i686 0:4.4.4-10.fc13 set to be updated
 
--> Running transaction check
 
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.12-1 set to be updated
+
--> Processing Dependency: glibc = 2.12-1 for package: glibc-common-2.12-1.i686
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.x86_64
+
---> Package glibc.i686 0:2.12-3 set to be updated
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.x86_64
+
---> Package glibc-headers.i686 0:2.12-3 set to be updated
---> Package ppl.x86_64 0:0.10.2-10.fc12 set to be updated
+
---> Package ppl.i686 0:0.10.2-10.fc12 set to be updated
 
--> Running transaction check
 
--> Running transaction check
---> Package kernel-headers.x86_64 0:2.6.33.4-95.fc13 set to be updated
+
---> Package glibc-common.i686 0:2.12-3 set to be updated
 
--> Finished Dependency Resolution
 
--> Finished Dependency Resolution
  
Line 204: Line 183:
 
Installing:
 
Installing:
 
  dkms                    noarch          2.1.0.1-1.fc12                fedora            95 k
 
  dkms                    noarch          2.1.0.1-1.fc12                fedora            95 k
  gcc                      x86_64          4.4.4-2.fc13                 fedora            10 M
+
  gcc                      i686            4.4.4-10.fc13                updates          8.1 M
 +
kernel-devel            i686            2.6.33.3-85.fc13             fedora           6.3 M
 +
kernel-headers          i686             2.6.33.3-85.fc13              fedora            760 k
 
Installing for dependencies:
 
Installing for dependencies:
  cloog-ppl                x86_64          0.15.7-1.fc12                fedora            82 k
+
  cloog-ppl                i686            0.15.7-1.fc12                fedora            81 k
  cpp                      x86_64          4.4.4-2.fc13                 fedora            3.7 M
+
  cpp                      i686            4.4.4-10.fc13                 updates          3.4 M
  glibc-devel              x86_64          2.12-1                       fedora            959 k
+
  glibc-devel              i686            2.12-3                       updates          960 k
  glibc-headers            x86_64          2.12-1                       fedora            588 k
+
  glibc-headers            i686            2.12-3                       updates          599 k
  kernel-devel             x86_64          2.6.33.4-95.fc13              updates          6.3 M
+
  ppl                      i686             0.10.2-10.fc12                fedora            1.1 M
  kernel-headers          x86_64          2.6.33.4-95.fc13             updates          761 k
+
Updating for dependencies:
  ppl                      x86_64          0.10.2-10.fc12                fedora            1.1 M
+
glibc                    i686            2.12-3                        updates          4.3 M
 +
  glibc-common            i686            2.12-3                        updates            14 M
 +
libgcc                  i686            4.4.4-10.fc13                 updates          103 k
 +
  libgomp                  i686            4.4.4-10.fc13                updates          109 k
  
 
Transaction Summary
 
Transaction Summary
 
=================================================================================================
 
=================================================================================================
 
Install      9 Package(s)
 
Install      9 Package(s)
Upgrade      0 Package(s)
+
Upgrade      4 Package(s)
  
Total download size: 24 M
+
Total download size: 40 M
Installed size: 60 M
 
 
Is this ok [y/N]: y
 
Is this ok [y/N]: y
 
Downloading Packages:
 
Downloading Packages:
 
Setting up and reading Presto delta metadata
 
Setting up and reading Presto delta metadata
fedora/prestodelta                                                       419 B     00:00      
+
updates/prestodelta                                                       87 kB     00:18      
updates/prestodelta                                                       | 4.6 kB     00:00     
+
fedora/prestodelta                                                       | 414 B     00:00     
 
Processing delta metadata
 
Processing delta metadata
Package(s) data still to download: 24 M
+
Package(s) data still to download: 40 M
(1/9): cloog-ppl-0.15.7-1.fc12.x86_64.rpm                                 82 kB    00:00      
+
(1/13): cloog-ppl-0.15.7-1.fc12.i686.rpm                                 81 kB    00:06      
(2/9): cpp-4.4.4-2.fc13.x86_64.rpm                                        | 3.7 MB    00:06      
+
http://ftp.usf.edu/pub/fedora/linux/updates/13/i386/cpp-4.4.4-10.fc13.i686.rpm: [Errno 14] HTTP Error 200 : http://ftp.usf.edu/pub/fedora/linux/updates/13/i386/cpp-4.4.4-10.fc13.i686.rpm
(3/9): dkms-2.1.0.1-1.fc12.noarch.rpm                                     |  95 kB    00:00      
+
Trying other mirror.
(4/9): gcc-4.4.4-2.fc13.x86_64.rpm                                        |  10 MB    00:17      
+
(2/13): cpp-4.4.4-10.fc13.i686.rpm                                        | 3.4 MB    01:47      
(5/9): glibc-devel-2.12-1.x86_64.rpm                                     | 959 kB    00:01      
+
(3/13): dkms-2.1.0.1-1.fc12.noarch.rpm                                   |  95 kB    00:09      
(6/9): glibc-headers-2.12-1.x86_64.rpm                                   | 588 kB    00:00      
+
(4/13): gcc-4.4.4-10.fc13.i686.rpm                                        | 8.1 MB    04:06   
(7/9): kernel-devel-2.6.33.4-95.fc13.x86_64.rpm                           | 6.3 MB    00:02      
+
(5/13): glibc-2.12-3.i686.rpm                                            | 4.3 MB    01:50   
(8/9): kernel-headers-2.6.33.4-95.fc13.x86_64.rpm                         | 761 kB    00:00     
+
(6/13): glibc-common-2.12-3.i686.rpm                                      14 MB    04:43      
(9/9): ppl-0.10.2-10.fc12.x86_64.rpm                                      | 1.1 MB    00:02      
+
(7/13): glibc-devel-2.12-3.i686.rpm                                       | 960 kB    00:22      
 +
(8/13): glibc-headers-2.12-3.i686.rpm                                     | 599 kB    00:15      
 +
(9/13): kernel-devel-2.6.33.3-85.fc13.i686.rpm                           | 6.3 MB    03:25      
 +
(10/13): kernel-headers-2.6.33.3-85.fc13.i686.rpm                        | 760 kB    00:24   
 +
(11/13): libgcc-4.4.4-10.fc13.i686.rpm                                   | 103 kB    00:05   
 +
(12/13): libgomp-4.4.4-10.fc13.i686.rpm                                  | 109 kB    00:04      
 +
(13/13): ppl-0.10.2-10.fc12.i686.rpm                                      | 1.1 MB    00:26      
 
-------------------------------------------------------------------------------------------------
 
-------------------------------------------------------------------------------------------------
Total                                                           718 kB/s |  24 MB    00:33      
+
Total                                                             32 kB/s |  40 MB    21:10      
 
Running rpm_check_debug
 
Running rpm_check_debug
 
Running Transaction Test
 
Running Transaction Test
 
Transaction Test Succeeded
 
Transaction Test Succeeded
 
Running Transaction
 
Running Transaction
   Installing    : cpp-4.4.4-2.fc13.x86_64                                                  1/9
+
   Installing    : kernel-devel-2.6.33.3-85.fc13.i686                                      1/17
   Installing    : ppl-0.10.2-10.fc12.x86_64                                                2/9
+
   Installing    : kernel-headers-2.6.33.3-85.fc13.i686                                    2/17
   Installing    : cloog-ppl-0.15.7-1.fc12.x86_64                                            3/9
+
  Updating      : libgcc-4.4.4-10.fc13.i686                                                3/17
   Installing    : kernel-devel-2.6.33.4-95.fc13.x86_64                                      4/9
+
   Installing    : dkms-2.1.0.1-1.fc12.noarch                                              4/17
   Installing    : kernel-headers-2.6.33.4-95.fc13.x86_64                                    5/9
+
  Updating      : glibc-2.12-3.i686                                                        5/17
   Installing    : glibc-headers-2.12-1.x86_64                                               6/9
+
   Updating      : glibc-common-2.12-3.i686                                                6/17
   Installing    : glibc-devel-2.12-1.x86_64                                                 7/9
+
  Updating      : libgomp-4.4.4-10.fc13.i686                                              7/17
   Installing    : gcc-4.4.4-2.fc13.x86_64                                                  8/9
+
  Installing    : ppl-0.10.2-10.fc12.i686                                                  8/17
   Installing    : dkms-2.1.0.1-1.fc12.noarch                                               9/9
+
   Installing    : cloog-ppl-0.15.7-1.fc12.i686                                            9/17
 +
  Installing    : cpp-4.4.4-10.fc13.i686                                                  10/17
 +
   Installing    : glibc-headers-2.12-3.i686                                               11/17
 +
   Installing    : glibc-devel-2.12-3.i686                                                 12/17
 +
   Installing    : gcc-4.4.4-10.fc13.i686                                                  13/17
 +
  Cleanup        : libgomp-4.4.4-2.fc13.i686                                              14/17
 +
   Cleanup        : glibc-common-2.12-1.i686                                                15/17
 +
  Cleanup        : glibc-2.12-1.i686                                                      16/17
 +
  Cleanup        : libgcc-4.4.4-2.fc13.i686                                               17/17
  
 
Installed:
 
Installed:
   dkms.noarch 0:2.1.0.1-1.fc12                     gcc.x86_64 0:4.4.4-2.fc13                  
+
   dkms.noarch 0:2.1.0.1-1.fc12                   gcc.i686 0:4.4.4-10.fc13                       
 +
  kernel-devel.i686 0:2.6.33.3-85.fc13          kernel-headers.i686 0:2.6.33.3-85.fc13        
  
 
Dependency Installed:
 
Dependency Installed:
   cloog-ppl.x86_64 0:0.15.7-1.fc12               cpp.x86_64 0:4.4.4-2.fc13                      
+
   cloog-ppl.i686 0:0.15.7-1.fc12     cpp.i686 0:4.4.4-10.fc13     glibc-devel.i686 0:2.12-3   
  glibc-devel.x86_64 0:2.12-1                    glibc-headers.x86_64 0:2.12-1                 
+
  glibc-headers.i686 0:2.12-3        ppl.i686 0:0.10.2-10.fc12   
   kernel-devel.x86_64 0:2.6.33.4-95.fc13        kernel-headers.x86_64 0:2.6.33.4-95.fc13      
+
 
   ppl.x86_64 0:0.10.2-10.fc12                 
+
Dependency Updated:
 +
   glibc.i686 0:2.12-3              glibc-common.i686 0:2.12-3    libgcc.i686 0:4.4.4-10.fc13  
 +
   libgomp.i686 0:4.4.4-10.fc13   
  
 
Complete!
 
Complete!
</pre>}}
+
</pre>}}<br></li>
 
+
<li> In the VirtualBox Guest 'Devices Menu', select 'Install Guest Additions...'</li>
 
+
<li> {{Code|mkdir /mnt/cdrom}} </li>
# cd /media/VBOXADDITIONS_3.2.0_61806/
+
<li> {{Code|mount /dev/sr0 /mnt/cdrom/}} </li>
# ./VBoxLinuxAdditions-amd64.run  
+
<li> {{Code|cd /mnt/cdrom/}} </li>
#* (This fails currently. More testing and debugging needed.)
+
<li> {{Code|./VBoxLinuxAdditions-x86.run}}<br>
#* If upgrading from one VirtualBox version to another, start with fresh virtual disks and machines built with the new versions to avoid breakage.
+
* {{Code|dmsetup status}}
# reboot
+
*: reveals that 953440/2097152 (512-byte sectors) or 448 MB of the 1024 MB overlay file has been consumed by the installation process
 +
* If upgrading from one VirtualBox version to another, start with fresh virtual disks and machines built with the new versions to avoid breakage.<br>
 +
</li>
 +
<li> reboot </li>
 +
</ol>
 
{{Show|<Terminal log:>  
 
{{Show|<Terminal log:>  
 
|<pre>
 
|<pre>
[root@localhost ~]# cd /media/VBOXADDITIONS_3.2.0_61806/
+
[root@localhost ~]# mkdir /mnt/cdrom/
[root@localhost VBOXADDITIONS_3.2.0_61806]# ./VBoxLinuxAdditions-amd64.run  
+
[root@localhost ~]# mount /dev/sr0 /mnt/cdrom/
 +
mount: block device /dev/sr0 is write-protected, mounting read-only
 +
[root@localhost ~]# cd /mnt/cdrom/
 +
[root@localhost cdrom]# ./VBoxLinuxAdditions-x86.run  
 
Verifying archive integrity... All good.
 
Verifying archive integrity... All good.
Uncompressing VirtualBox 3.2.0 Guest Additions for Linux........
+
Uncompressing VirtualBox 3.2.8 Guest Additions for Linux........
 
VirtualBox Guest Additions installer
 
VirtualBox Guest Additions installer
Building the VirtualBox Guest Additions kernel modules     [FAILED]
+
Building the VirtualBox Guest Additions kernel modules
(Your system does not seem to be set up to build kernel modules.
+
Building the main Guest Additions module                  [  OK  ]
Look at /var/log/vboxadd-install.log to find out what went wrong)
+
Building the shared folder support module                  [ OK  ]
 +
Building the OpenGL support module                        [  OK  ]
 +
Doing non-kernel setup of the Guest Additions              [  OK  ]
 +
Starting the VirtualBox Guest Additions                    [  OK  ]
 
Installing the Window System drivers
 
Installing the Window System drivers
 
Installing X.Org Server 1.8 modules                        [  OK  ]
 
Installing X.Org Server 1.8 modules                        [  OK  ]
Line 288: Line 298:
  
 
Installing graphics libraries and desktop services componen[  OK  ]
 
Installing graphics libraries and desktop services componen[  OK  ]
 +
 +
[root@localhost cdrom]# dmsetup status
 +
live-osimg-min: 0 8388608 snapshot 2344/2344 24
 +
live-rw: 0 8388608 snapshot 953440/2097152 3720
 
</pre>}}
 
</pre>}}
 
+
<!--
 
* Note that you will need to have the same kernel version as you have kernel-headers and kernel-devel
 
* Note that you will need to have the same kernel version as you have kernel-headers and kernel-devel
 
* I recommend:
 
* I recommend:
Line 297: Line 311:
 
</pre>
 
</pre>
 
* With the guest additions successfully installed, it should '''Not be necessary to configure the screen (below)'''  
 
* With the guest additions successfully installed, it should '''Not be necessary to configure the screen (below)'''  
 +
 +
Thanks! for this information.  update kernel consumed 203280/1048576 of the overlay and install kernel-headers kernel-devel dkms gcc raised consumption to 1047112/1048576 leading to failure of the ./VBoxLinuxAdditions-x86.run  -->
  
 
===Configure Screen===
 
===Configure Screen===
 +
If you want to match the 16 bpp XO screen and a particular display size, you may
 
# Edit /etc/X11/xorg.conf to match the following section:
 
# Edit /etc/X11/xorg.conf to match the following section:
 
#* 832x624 - matches default XO display proportions
 
#* 832x624 - matches default XO display proportions

Revision as of 18:30, 16 August 2010

Instructions for preparing a VirtualBox disk image from a SoaS iso image file.

Installing SoaS .iso image

  1. Create a new VM, choose a name, such as Mirabelle
  2. Choose Linux for the Operating System and Version Fedora (use 64 bit, if available)
  3. Choose Base Memory Size: 256 MB to match an XO-1, 512 or 1024 MB to match an XO-1.5
  4. Create a new virtual hard disk image with dynamically expanding storage of 2 GB
  5. Finish.
  6. Download the lastest SoaS, http://spins.fedoraproject.org/soas/#downloads, for Fedora 13.
  7. Mount the SoaS .iso image file as a CD-ROM in the newly created VM.
  8. Change the Network Attached to: Bridged Adapter (This allows for networking with the host computer.)
  9. Start the VM
  10. Enter an account name and startup Sugar.
  11. Open Terminal.
  12. su -
  13. parted
  14. mklabel msdos
    This makes a partition table.
  15. mkpart primary ext2 0 2048
    You will receive this message:
    Warning: The resulting partition is not properly aligned for best performance.
    Ignore/Cancel?
    Enter (I)gnore
  16. toggle 1 boot
  17. quit
  18. mke2fs /dev/sda1
  19. /LiveOS/livecd-iso-to-disk --overlay-size-mb 1024 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1
    (for earlier versions of SoaS
    Blueberry - use /media/soas-2-blueberry/LiveOS/livecd-iso-to-disk
    Strawberry - use /mnt/live/LiveOS/livecd-iso-to-disk)
    <Terminal log>
    [root@localhost ~]# parted
    GNU Parted 2.1
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) mklabel msdos                                                    
    (parted) mkpart primary ext2 0 2048
    Warning: The resulting partition is not properly aligned for best performance.
    Ignore/Cancel? I                                                          
    (parted) toggle 1 boot                                                    
    (parted) quit                                                             
    Information: You may need to update /etc/fstab.                           
    
    [root@localhost ~]# mke2fs /dev/sda1
    mke2fs 1.41.10 (10-Feb-2009)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    125184 inodes, 500000 blocks
    25000 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=515899392
    16 block groups
    32768 blocks per group, 32768 fragments per group
    7824 inodes per group
    Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912
    
    Writing inode tables: done                            
    Writing superblocks and filesystem accounting information: done
    
    This filesystem will be automatically checked every 36 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    [root@localhost ~]#
    [root@localhost ~]# /LiveOS/livecd-iso-to-disk --overlay-size-mb 1024 --home-size-mb 200 --delete-home --unencrypted-home /dev/live /dev/sda1
    Verifying image...
    /dev/sr0:   0ce28e3947106fd37bab9317abf09938
    Fragment sums: a3c6e5fd5fba11d2b4da71771e8732b63bcb62b841971f7f39ab5c187f64
    Fragment count: 20
    Checking: 100.0%
    
    The media check is complete, the result is: PASS.
    
    It is OK to use this media.
    Copying live image to USB stick
    Updating boot config file
    Initializing persistent overlay file
    0+0 records in
    0+0 records out
    0 bytes (0 B) copied, 0.000150187 s, 0.0 kB/s
    Initializing persistent /home
    0+0 records in
    0+0 records out
    0 bytes (0 B) copied, 0.0039562 s, 0.0 kB/s
    Formatting unencrypted /home
    mke2fs 1.41.10 (10-Feb-2009)
    Filesystem label=
    OS type: Linux
    Block size=1024 (log=0)
    Fragment size=1024 (log=0)
    Stride=0 blocks, Stripe width=0 blocks
    51200 inodes, 204800 blocks
    10240 blocks (5.00%) reserved for the super user
    First data block=1
    Maximum filesystem blocks=67371008
    25 block groups
    8192 blocks per group, 8192 fragments per group
    2048 inodes per group
    Superblock backups stored on blocks: 
        8193, 24577, 40961, 57345, 73729
    
    Writing inode tables: done                            
    Creating journal (4096 blocks): done
    Writing superblocks and filesystem accounting information: done
    
    This filesystem will be automatically checked every 26 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    tune2fs 1.41.10 (10-Feb-2009)
    Setting maximal mount count to -1
    Setting interval between checks to 0 seconds
    Installing boot loader
    /media/usbdev.XB8shz/syslinux is device /dev/sda1
    USB stick set up as live image!
    
    • the --overlay-size-mb NNN and --home-size-mb NNN options creates space for persistence of changes on the disk; otherwise, a liveOS disk is read-only. See LiveOS image.

    The following optional parameters seem to be incompatible with soas-1-strawberry and soas-2-blueberry released versions. (The script completes successfully, but the virtual machine startup process has trouble finding the home directory and fails to complete.)
    • the --home-size-mb NNN option creates space for file storage in the /home/liveuser folder. (In the case where you you want to update the LiveOS image while keeping the user files, skip the new disk creation and parted steps, leave out the --home-size-mb NNN option at this step, and continue on.)
    • the --unencrypted-home option prevents password protection and encryption on the /home/liveuser folder. This releaves the overhead on the compressed SquashFS, and should be more robust to file system failures (outside of security).
    • the --delete-home option is used to avoid an error message while requesting both a new home (with --home-size-mb) and a persistent home (with --unencrypted-home). (You wouldn't use this option for the LiveOS upgrade case.)
  1. shutdown -h now

Installing VirtualBox Guest Additions

The VirtualBox Guest Additions requires installing DKMS and compiling virtual device drivers for the Linux kernel.

  1. Unmount CD/DVD in VirtualBox settings, select 'Empty' for the CD/DVD device under 'Attributes'
  2. Start the virtual machine
  3. Open Terminal
  4. su -
  1. Determine the kernel version,
    uname -a
    Linux localhost.localdomain 2.6.33.3-85.fc13.i686 #1 SMP Thu May 6 18:44:12 UTC 2010 i686 i686 i386 GNU/Linux
  2. For SoaS-Mirabelle, the kernel is Linux-2.6.33.3-85.fc13, so specific kernel-headers and kernel-devel are needed:

    yum install kernel-headers-2.6.33.3-85.fc13 kernel-devel-2.6.33.3-85.fc13 dkms gcc
    (Other dependencies will be called into the installation.)
    <Successful Terminal log from 16 Aug 2010 with Fedora 32 bit>
    [root@localhost ~]# yum install kernel-devel-2.6.33.3-85.fc13 kernel-headers-2.6.33.3-85.fc13 dkms gcc
    Loaded plugins: presto, refresh-packagekit
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package dkms.noarch 0:2.1.0.1-1.fc12 set to be updated
    ---> Package gcc.i686 0:4.4.4-10.fc13 set to be updated
    --> Processing Dependency: cpp = 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
    --> Processing Dependency: libgomp = 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
    --> Processing Dependency: libgcc >= 4.4.4-10.fc13 for package: gcc-4.4.4-10.fc13.i686
    --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.4-10.fc13.i686
    --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.4-10.fc13.i686
    ---> Package kernel-devel.i686 0:2.6.33.3-85.fc13 set to be installed
    ---> Package kernel-headers.i686 0:2.6.33.3-85.fc13 set to be updated
    --> Running transaction check
    ---> Package cloog-ppl.i686 0:0.15.7-1.fc12 set to be updated
    --> Processing Dependency: libppl.so.7 for package: cloog-ppl-0.15.7-1.fc12.i686
    --> Processing Dependency: libppl_c.so.2 for package: cloog-ppl-0.15.7-1.fc12.i686
    ---> Package cpp.i686 0:4.4.4-10.fc13 set to be updated
    ---> Package glibc-devel.i686 0:2.12-3 set to be updated
    --> Processing Dependency: glibc = 2.12-3 for package: glibc-devel-2.12-3.i686
    --> Processing Dependency: glibc-headers = 2.12-3 for package: glibc-devel-2.12-3.i686
    --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-3.i686
    ---> Package libgcc.i686 0:4.4.4-10.fc13 set to be updated
    ---> Package libgomp.i686 0:4.4.4-10.fc13 set to be updated
    --> Running transaction check
    --> Processing Dependency: glibc = 2.12-1 for package: glibc-common-2.12-1.i686
    ---> Package glibc.i686 0:2.12-3 set to be updated
    ---> Package glibc-headers.i686 0:2.12-3 set to be updated
    ---> Package ppl.i686 0:0.10.2-10.fc12 set to be updated
    --> Running transaction check
    ---> Package glibc-common.i686 0:2.12-3 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    =================================================================================================
     Package                  Arch             Version                       Repository         Size
    =================================================================================================
    Installing:
     dkms                     noarch           2.1.0.1-1.fc12                fedora             95 k
     gcc                      i686             4.4.4-10.fc13                 updates           8.1 M
     kernel-devel             i686             2.6.33.3-85.fc13              fedora            6.3 M
     kernel-headers           i686             2.6.33.3-85.fc13              fedora            760 k
    Installing for dependencies:
     cloog-ppl                i686             0.15.7-1.fc12                 fedora             81 k
     cpp                      i686             4.4.4-10.fc13                 updates           3.4 M
     glibc-devel              i686             2.12-3                        updates           960 k
     glibc-headers            i686             2.12-3                        updates           599 k
     ppl                      i686             0.10.2-10.fc12                fedora            1.1 M
    Updating for dependencies:
     glibc                    i686             2.12-3                        updates           4.3 M
     glibc-common             i686             2.12-3                        updates            14 M
     libgcc                   i686             4.4.4-10.fc13                 updates           103 k
     libgomp                  i686             4.4.4-10.fc13                 updates           109 k
    
    Transaction Summary
    =================================================================================================
    Install       9 Package(s)
    Upgrade       4 Package(s)
    
    Total download size: 40 M
    Is this ok [y/N]: y
    Downloading Packages:
    Setting up and reading Presto delta metadata
    updates/prestodelta                                                       |  87 kB     00:18     
    fedora/prestodelta                                                        |  414 B     00:00     
    Processing delta metadata
    Package(s) data still to download: 40 M
    (1/13): cloog-ppl-0.15.7-1.fc12.i686.rpm                                  |  81 kB     00:06     
    http://ftp.usf.edu/pub/fedora/linux/updates/13/i386/cpp-4.4.4-10.fc13.i686.rpm: [Errno 14] HTTP Error 200 : http://ftp.usf.edu/pub/fedora/linux/updates/13/i386/cpp-4.4.4-10.fc13.i686.rpm 
    Trying other mirror.
    (2/13): cpp-4.4.4-10.fc13.i686.rpm                                        | 3.4 MB     01:47     
    (3/13): dkms-2.1.0.1-1.fc12.noarch.rpm                                    |  95 kB     00:09     
    (4/13): gcc-4.4.4-10.fc13.i686.rpm                                        | 8.1 MB     04:06     
    (5/13): glibc-2.12-3.i686.rpm                                             | 4.3 MB     01:50     
    (6/13): glibc-common-2.12-3.i686.rpm                                      |  14 MB     04:43     
    (7/13): glibc-devel-2.12-3.i686.rpm                                       | 960 kB     00:22     
    (8/13): glibc-headers-2.12-3.i686.rpm                                     | 599 kB     00:15     
    (9/13): kernel-devel-2.6.33.3-85.fc13.i686.rpm                            | 6.3 MB     03:25     
    (10/13): kernel-headers-2.6.33.3-85.fc13.i686.rpm                         | 760 kB     00:24     
    (11/13): libgcc-4.4.4-10.fc13.i686.rpm                                    | 103 kB     00:05     
    (12/13): libgomp-4.4.4-10.fc13.i686.rpm                                   | 109 kB     00:04     
    (13/13): ppl-0.10.2-10.fc12.i686.rpm                                      | 1.1 MB     00:26     
    -------------------------------------------------------------------------------------------------
    Total                                                             32 kB/s |  40 MB     21:10     
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : kernel-devel-2.6.33.3-85.fc13.i686                                       1/17 
      Installing     : kernel-headers-2.6.33.3-85.fc13.i686                                     2/17 
      Updating       : libgcc-4.4.4-10.fc13.i686                                                3/17 
      Installing     : dkms-2.1.0.1-1.fc12.noarch                                               4/17 
      Updating       : glibc-2.12-3.i686                                                        5/17 
      Updating       : glibc-common-2.12-3.i686                                                 6/17 
      Updating       : libgomp-4.4.4-10.fc13.i686                                               7/17 
      Installing     : ppl-0.10.2-10.fc12.i686                                                  8/17 
      Installing     : cloog-ppl-0.15.7-1.fc12.i686                                             9/17 
      Installing     : cpp-4.4.4-10.fc13.i686                                                  10/17 
      Installing     : glibc-headers-2.12-3.i686                                               11/17 
      Installing     : glibc-devel-2.12-3.i686                                                 12/17 
      Installing     : gcc-4.4.4-10.fc13.i686                                                  13/17 
      Cleanup        : libgomp-4.4.4-2.fc13.i686                                               14/17 
      Cleanup        : glibc-common-2.12-1.i686                                                15/17 
      Cleanup        : glibc-2.12-1.i686                                                       16/17 
      Cleanup        : libgcc-4.4.4-2.fc13.i686                                                17/17 
    
    Installed:
      dkms.noarch 0:2.1.0.1-1.fc12                   gcc.i686 0:4.4.4-10.fc13                        
      kernel-devel.i686 0:2.6.33.3-85.fc13           kernel-headers.i686 0:2.6.33.3-85.fc13          
    
    Dependency Installed:
      cloog-ppl.i686 0:0.15.7-1.fc12     cpp.i686 0:4.4.4-10.fc13      glibc-devel.i686 0:2.12-3    
      glibc-headers.i686 0:2.12-3        ppl.i686 0:0.10.2-10.fc12    
    
    Dependency Updated:
      glibc.i686 0:2.12-3              glibc-common.i686 0:2.12-3     libgcc.i686 0:4.4.4-10.fc13    
      libgomp.i686 0:4.4.4-10.fc13    
    
    Complete!
    

  3. In the VirtualBox Guest 'Devices Menu', select 'Install Guest Additions...'
  4. mkdir /mnt/cdrom
  5. mount /dev/sr0 /mnt/cdrom/
  6. cd /mnt/cdrom/
  7. ./VBoxLinuxAdditions-x86.run
    • dmsetup status
      reveals that 953440/2097152 (512-byte sectors) or 448 MB of the 1024 MB overlay file has been consumed by the installation process
    • If upgrading from one VirtualBox version to another, start with fresh virtual disks and machines built with the new versions to avoid breakage.
  8. reboot
<Terminal log:>
[root@localhost ~]# mkdir /mnt/cdrom/
[root@localhost ~]# mount /dev/sr0 /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# cd /mnt/cdrom/
[root@localhost cdrom]# ./VBoxLinuxAdditions-x86.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 3.2.8 Guest Additions for Linux........
VirtualBox Guest Additions installer
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.8 modules                        [  OK  ]
Setting up the Window System to use the Guest Additions    [  OK  ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services componen[  OK  ]

[root@localhost cdrom]# dmsetup status
live-osimg-min: 0 8388608 snapshot 2344/2344 24
live-rw: 0 8388608 snapshot 953440/2097152 3720

Configure Screen

If you want to match the 16 bpp XO screen and a particular display size, you may

  1. Edit /etc/X11/xorg.conf to match the following section:
    • 832x624 - matches default XO display proportions
    • 1200x900 - XO reflective resolution
# VirtualBox generated configuration file
# based on /etc/X11/xorg.conf.

Section "Monitor"
  Identifier   "Monitor[0]"
  ModelName    "VirtualBox Virtual Output"
  VendorName   "Sun Microsystems Inc"
EndSection

Section "Device"
  BoardName    "VirtualBox Graphics"
  Driver       "vboxvideo"
  Identifier   "Device[0]"
  VendorName   "Sun Microsystems Inc"
EndSection

Section "Screen"
  Identifier   "Screen[0]"
  Device       "Device[0]"
  Monitor      "Monitor[0]"
  DefaultDepth 16
  SubSection "Display"
    Depth      16
    Modes      "832x624" "1200x900" "1024x768" "800x600"
  EndSubSection
EndSection

Clear user data

Finally,

  1. Open Terminal
  2. Terminal
  3. rm -rf ~/.sugar (if distributing image)
  4. su -
  5. shutdown -h now
  6. Now you can share the VDI file.

Backup discs

It would be wise to maintain a clone of your virtual disk image to restart if the working copy is damaged:

  1. From host command line (Windows cmd, or Linux terminal) See VirtualBox Help section 8.14.
    • VBoxManage clonehd <uuid>|<filename> <outputfile> [-format VDI|VMDK|VHD|RAW|<other>] [-remember]
  2. Reclone any virtual hard disks you would like to archive.

SSH connections

To enable SSH communications, we need to permit no passwords in the ssh daemon configuration:

  1. in Terminal,
  2. su -
  3. vi /etc/ssh/sshd_config
    1. [add] PermitEmptyPasswords yes
    2. :wq <Enter>
  4. service sshd restart