Changes between Version 51 and Version 52 of VboxApps


Ignore:
Timestamp:
Aug 8, 2013, 5:05:48 AM (11 years ago)
Author:
Christian Beer
Comment:

add some more commands helpful in creating a base image

Legend:

Unmodified
Added
Removed
Modified
  • VboxApps

    v51 v52  
    317317Make sure all roles are unselected before continuing.
    318318
     319==== Cleaning the Debian VM ====
     320
     321First step is to remove non-critical packages that are essential ([https://wiki.debian.org/ReduceDebian source]). For Debian Squeeze 7.1 that are:
     322{{{
     323acpi acpid busybox eject iamerican ibritish info ispell laptop-detect logrotate manpages net-tools os-prober tasksel traceroute usbutils wamerican
     324}}}
     325Use aptitude to also remove `linux-headers-*` packages but don't remove `dkms` or `virtualbox-guest-dkms`! Run `apt-get autoremove` after this to get rid of now unused packages. `apt-get autoclean` and `apt-get clean` should remove downloaded archives to free up space.
     326
     327In order to realy purge all files from previously removed packages this command is helpfull as it purges all configuration files from uninstalled packages:
     328{{{
     329dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`
     330}}}
     331
    319332==== Updating Grub ====
    320333
     
    3513641:2345:respawn:/sbin/mingetty --autologin root --noclear tty1
    352365}}}
     366
     367==== Disabling periodic fsck ====
     368
     369This will disable the periodic fsck run that occurs every 30 times the VM is turned on: `tune2fs -c -1 /dev/sda1`.
     370
     371==== Compact the VDI container ====
     372
     373To get a better compression ratio you may install and run the '''zerofree''' tool to overwrite all empty space on the VDI with zeros.
     374{{{
     375apt-get install zerofree
     376telinit 1
     377{enter root password}
     378mount -o remount,ro /dev/sda1
     379zerofree -v /dev/sda1
     380shutdown -hP 0
     381}}}
     382
     383Now open a terminal on the host System and compact the VDI file:
     384{{{
     385vboxmanage modifyhd FILENAME.vdi --compact
     386}}}