Difference between revisions of "Root filesystem clean up procedure"

From VNUML-WIKI
Jump to: navigation, search
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
You can even do mixed lists
+
<h1 class="firstHeading">Root filesystem clean up procedure</h1>
# and nest them
+
 
# inside each other
+
Derived from a Fermin's message to the list  [https://lists.dit.upm.es/pipermail/vnuml-devel/2006-June/000411.html 1]
#* or break lines<br>in lists.
+
 
#; definition lists
+
This is a description of the general procedure carried out to clean up a root_fs after upgrading/installing new packages.
#: can be  
+
 
#:; nested : too
+
In order to clean the filesystem two steps should be performed, in sequence:
 +
 
 +
<ol>
 +
<li> Start a virtual machine that uses the filesystem in ''direct'' mode (that is, using the directive <fylesystem type="direct">. If you plan to update packages you will also need connection to Internet from the virtual machine. Alternatively, you can mount the filesystem and use chroot from host. Once you are ''inside'' the filesystem:</li>
 +
 
 +
<ul>
 +
<li>Clean the APT cache (after apt-get update, install, upgrade, etc. or whatever other APT operation you have done)</li>
 +
 
 +
> apt-get clean
 +
 
 +
<li>If the kernel you plan to use with the filesystem does not support TLS, you have to check if the /lib/tls directory exists (it seems to be created sometimes during the upgrading of some packages) and rename it to /lib/tls.disabled (removing previous existing /lib/tls.disabled directory) (*)</li>     
 +
 
 +
<li>It is not exactly a clean up operation, but you should also edit and change the /etc/root_fs_tutorial-version file (*)</li>
 +
 
 +
<li>Optionally, to speed up virtual machines startup, you have to disable the scripts that start services like apache, quagga or racoon using the following  commands:</li>
 +
 
 +
  > update-rc.d -f apache2 remove
 +
  > update-rc.d -f quagga remove
 +
  > update-rc.d -f racoon remove
 +
 
 +
</ul>
 +
 
 +
<li>"Outside" filesystem, supposing is mounted in /mnt/loop</li><br>
 +
 
 +
  > cd /mnt/loop/var/cache/apt
 +
  > rm -f pkgcache.bin srcpkgcache.bin (**)
 +
  > cd /mnt/loop/tmp
 +
  > rm -rf *
 +
  > rm -f /mnt/loop/root/.bash_history
 +
  > cd /mnt
 +
  > umount /mnt/loop
 +
 
 +
</ol>
 +
 
 +
(*) This step also can be done from "outside" filesystem
 +
 
 +
(**) And, in general, any other file, except the archive/ directory
 +
 
 +
 
 +
 
  
  
Extracted from Fermin's message [https://lists.dit.upm.es/pipermail/vnuml-devel/2006-June/000411.html 1]
+
-------------
  
This is a description of the general procudure carried out to clean up a root_fs after upgrading/installing new packages. This is more or less what I do when generating a new root_fs release (for example, 0.3.99 based on previous 0.3.3). I'm sending to the list in the hope it could be useful for developers working in their own "root filesystem branches" based on root_fs provide by VNUML Project.
+
test stuff to delete:
  
In order to clean the filesystem two steps should be performed, in sequence:
 
 
# "Inside" filesystem (I mean, using a running virtual machine that uses this filesystem as <fylesystem type="direct"> or mounting it and chrooting from host):
 
# "Inside" filesystem (I mean, using a running virtual machine that uses this filesystem as <fylesystem type="direct"> or mounting it and chrooting from host):
 
#* Clean the APT cache (after apt-get update, install, upgrade, etc. or whatever other APT operation)
 
#* Clean the APT cache (after apt-get update, install, upgrade, etc. or whatever other APT operation)
    apt-get clean
+
:::apt-get clean
#* It is not exactly a clean up operation, but if the /lib/tls directory exists (it seems to be created sometimes during the upgrading of some
+
#* It is not exactly a clean up operation, but if the /lib/tls directory exists (it seems to be created sometimes during the upgrading of some packages) rename it to /lib/tls.disabled (removing previous existing /lib/tls.disabled directory) (*)
packages) rename it to /lib/tls.disabled (removing previous existing /lib/tls.disabled directory) (*)
 
 
#* It is not exactly a clean up operation, but you should also edit and change the /etc/root_fs_tutorial-version file (*)
 
#* It is not exactly a clean up operation, but you should also edit and change the /etc/root_fs_tutorial-version file (*)
 
# "Outside" filesystem, supposing is mounted in /mnt/loop
 
# "Outside" filesystem, supposing is mounted in /mnt/loop
 +
 
   cd /mnt/loop/var/cache/apt
 
   cd /mnt/loop/var/cache/apt
 
   rm -f pkgcache.bin srcpkgcache.bin (**)
 
   rm -f pkgcache.bin srcpkgcache.bin (**)
Line 28: Line 66:
 
   umount /mnt/loop
 
   umount /mnt/loop
  
(*) This step also can be done from "outside" filesystem
 
  
(**) And, in general, any other file, except the archive/ directory
+
 
 +
 
 +
List Examples:
 +
 
 +
Wiki:
 +
 
 +
You can even do mixed lists
 +
# and nest them
 +
# inside each other
 +
#* or break lines<br>in lists.
 +
#; definition lists
 +
#: can be
 +
#:; nested : too
 +
 
 +
HTML:
 +
 
 +
<ol>
 +
  <li>list item A1
 +
    <ol>
 +
      <li>list item B1</li>
 +
      <li>list item B2</li>
 +
    </ol>continuing list item A1
 +
  </li>
 +
  <li>list item A2</li>
 +
</ol>

Latest revision as of 22:28, 15 October 2006

Root filesystem clean up procedure

Derived from a Fermin's message to the list 1

This is a description of the general procedure carried out to clean up a root_fs after upgrading/installing new packages.

In order to clean the filesystem two steps should be performed, in sequence:

  1. Start a virtual machine that uses the filesystem in direct mode (that is, using the directive <fylesystem type="direct">. If you plan to update packages you will also need connection to Internet from the virtual machine. Alternatively, you can mount the filesystem and use chroot from host. Once you are inside the filesystem:
    • Clean the APT cache (after apt-get update, install, upgrade, etc. or whatever other APT operation you have done)
    • > apt-get clean
      
    • If the kernel you plan to use with the filesystem does not support TLS, you have to check if the /lib/tls directory exists (it seems to be created sometimes during the upgrading of some packages) and rename it to /lib/tls.disabled (removing previous existing /lib/tls.disabled directory) (*)
    • It is not exactly a clean up operation, but you should also edit and change the /etc/root_fs_tutorial-version file (*)
    • Optionally, to speed up virtual machines startup, you have to disable the scripts that start services like apache, quagga or racoon using the following commands:
    •  > update-rc.d -f apache2 remove
       > update-rc.d -f quagga remove
       > update-rc.d -f racoon remove
      
  2. "Outside" filesystem, supposing is mounted in /mnt/loop

  3.   > cd /mnt/loop/var/cache/apt
      > rm -f pkgcache.bin srcpkgcache.bin (**)
      > cd /mnt/loop/tmp
      > rm -rf *
      > rm -f /mnt/loop/root/.bash_history
      > cd /mnt
      > umount /mnt/loop
    

(*) This step also can be done from "outside" filesystem

(**) And, in general, any other file, except the archive/ directory




test stuff to delete:

  1. "Inside" filesystem (I mean, using a running virtual machine that uses this filesystem as <fylesystem type="direct"> or mounting it and chrooting from host):
    • Clean the APT cache (after apt-get update, install, upgrade, etc. or whatever other APT operation)
apt-get clean
    • It is not exactly a clean up operation, but if the /lib/tls directory exists (it seems to be created sometimes during the upgrading of some packages) rename it to /lib/tls.disabled (removing previous existing /lib/tls.disabled directory) (*)
    • It is not exactly a clean up operation, but you should also edit and change the /etc/root_fs_tutorial-version file (*)
  1. "Outside" filesystem, supposing is mounted in /mnt/loop
  cd /mnt/loop/var/cache/apt
  rm -f pkgcache.bin srcpkgcache.bin (**)
  cd /mnt/loop/tmp
  rm -rf *
  rm -f /mnt/loop/root/.bash_history
  cd /mnt
  umount /mnt/loop



List Examples:

Wiki:

You can even do mixed lists

  1. and nest them
  2. inside each other
    • or break lines
      in lists.
    definition lists
    can be
    nested 
    too

HTML:

  1. list item A1
    1. list item B1
    2. list item B2
    continuing list item A1
  2. list item A2