Difference between revisions of "Root-fs-installer"

From VNUML-WIKI
Jump to: navigation, search
(New page: {{Title|Automatic root_fs installation using root-fs-installer script}} DOCUMENT NOT FINISHED YET! == Using it == Instead of the manual procedure, you can use the root-fs-installer scri...)
 
m (Mirror selection)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Title|Automatic root_fs installation using root-fs-installer script}}
 
{{Title|Automatic root_fs installation using root-fs-installer script}}
 
DOCUMENT NOT FINISHED YET!
 
  
 
== Using it ==
 
== Using it ==
Line 9: Line 7:
 
In order to use the root-fs-installer script:
 
In order to use the root-fs-installer script:
  
* Download it
+
* Download it [http://www.dit.upm.es/vnuml/download/scripts/root-fs-installer from here].
  
* Invoke it, using the desired root_fs release as single argument. For example, if you want to get the 0.5.0 release.
+
* Invoke it:
  
   perl root-fs-installer 0.5.0
+
   perl root-fs-installer
  
 
That's all!
 
That's all!
 +
 +
If you want to download an specific version (e.g., 0.5.0) use it as argument after the script name (in the case you didn't specify a version number, the script tries to use the most recent one):
 +
 +
    perl root-fs-installer 0.5.0
  
 
== Features ==
 
== Features ==
  
The script will deal with the downloading of the .bz2 file (looking for a working mirror), unzipping, checking of MD5SUMs, installing in the proper place (either /usr/share/vnuml/filesystems/ or /usr/local/share/filesystems/, depending of your installation; if both directories exits, the former takes preference over the later) and updating the root_fs_tutorial symlink (to point to the greater root_fs version, maybe the one donwloaded.
+
The script will deal with the downloading of the .bz2 file (looking for a working mirror), unzipping, checking of MD5SUMs (in the case it can get them from an online master index maintained in the VNUML web server), installing in the proper place (either /usr/share/vnuml/filesystems/ or /usr/local/share/filesystems/, depending of your installation; if both directories exits, the former takes preference over the later) and updating the root_fs_tutorial symlink (to point to the just downloaded root_fs version, if you don't like this, just adjust the symlink when root-fs-installer has finished).
  
 
Moreover, if you have installed the linux-um package ('apt-get linux-um'), the script looks for the modules in /usr/share/linux-um and automatically install them in the just downloaded root_fs.
 
Moreover, if you have installed the linux-um package ('apt-get linux-um'), the script looks for the modules in /usr/share/linux-um and automatically install them in the just downloaded root_fs.
  
Of course, the script can not do miracles and some circumstances make it to fail (e.g., no one mirror can be found because your Internet connection is broken). In that case, it report the user what the cause of the problem was, aiming it to  execute it again when the error condition has been solved.
+
Of course, the script can not do miracles and some circumstances make it to fail (e.g., no one mirror can be found because your Internet connection is broken). In that case, it reports what the cause of the problem was to the user, aiming it to  execute it again when the error condition has been solved.
  
 
The script is designed to be polite, so it does not remove any conflicting file (typically, a root_fs_tutorial with the same name in /usr/share/vnuml/filesystem). In that case, the existing file is rename, suffixing it with the token 'old' plus a random string.
 
The script is designed to be polite, so it does not remove any conflicting file (typically, a root_fs_tutorial with the same name in /usr/share/vnuml/filesystem). In that case, the existing file is rename, suffixing it with the token 'old' plus a random string.
 +
 +
== Requirements ==
 +
 +
The script relies in some shell commands, that has to be available in the shell path:
 +
 +
* curl
 +
* wget
 +
* head
 +
* grep
 +
* bunzip2
 +
* mktemp
 +
* mount
 +
* /usr/bin/time (not miss with the time bash buil-in command!)
 +
* md5sum
 +
 +
Should you worry about that? Not too much. The script check the availability of these commands, and tell you if something is missing.
 +
 +
== Mirror selection ==
 +
 +
The script does its best trying to locate the best SourceForget.net mirror. In particular, the selection is based on the "faster" server available (i.e., the one that answer to HTTP request in the shortest time). However, it could happen (actually, it does :) that the shortest-time answering server is not the one providing the higher bandwidth throughput.
 +
 +
The problem of determining which mirror has the best throughput a priori is not easy (suggestions are welcome :), but, in the meanwhile, the user can "override" the mirror selection algorithm. In particular, edit root-fs-installer and look to the $override_mirror variable (near the beginning of the code):
 +
 +
  $mirror_override = "";
 +
 +
By default, the variable is empty and no overriding mirror is defined. You can change the value of the variable and put your preferred mirror:
 +
 +
  $mirror_override = "dfn.dl.sourceforge.net";
 +
 +
In that case, the $override_mirror is always used '''as long as it is available''' (if it is not available, the shortest-time mirror selection algorithm is applied to the available servers).

Latest revision as of 19:36, 22 August 2007

Automatic root_fs installation using root-fs-installer script

Using it

Instead of the manual procedure, you can use the root-fs-installer script to automatically install and set up a completely working root_fs. The script can be used with both the source (.tar.gz) or APT VNUML installations, although the last one is recommended.

In order to use the root-fs-installer script:

  • Invoke it:
 perl root-fs-installer

That's all!

If you want to download an specific version (e.g., 0.5.0) use it as argument after the script name (in the case you didn't specify a version number, the script tries to use the most recent one):

   perl root-fs-installer 0.5.0

Features

The script will deal with the downloading of the .bz2 file (looking for a working mirror), unzipping, checking of MD5SUMs (in the case it can get them from an online master index maintained in the VNUML web server), installing in the proper place (either /usr/share/vnuml/filesystems/ or /usr/local/share/filesystems/, depending of your installation; if both directories exits, the former takes preference over the later) and updating the root_fs_tutorial symlink (to point to the just downloaded root_fs version, if you don't like this, just adjust the symlink when root-fs-installer has finished).

Moreover, if you have installed the linux-um package ('apt-get linux-um'), the script looks for the modules in /usr/share/linux-um and automatically install them in the just downloaded root_fs.

Of course, the script can not do miracles and some circumstances make it to fail (e.g., no one mirror can be found because your Internet connection is broken). In that case, it reports what the cause of the problem was to the user, aiming it to execute it again when the error condition has been solved.

The script is designed to be polite, so it does not remove any conflicting file (typically, a root_fs_tutorial with the same name in /usr/share/vnuml/filesystem). In that case, the existing file is rename, suffixing it with the token 'old' plus a random string.

Requirements

The script relies in some shell commands, that has to be available in the shell path:

  • curl
  • wget
  • head
  • grep
  • bunzip2
  • mktemp
  • mount
  • /usr/bin/time (not miss with the time bash buil-in command!)
  • md5sum

Should you worry about that? Not too much. The script check the availability of these commands, and tell you if something is missing.

Mirror selection

The script does its best trying to locate the best SourceForget.net mirror. In particular, the selection is based on the "faster" server available (i.e., the one that answer to HTTP request in the shortest time). However, it could happen (actually, it does :) that the shortest-time answering server is not the one providing the higher bandwidth throughput.

The problem of determining which mirror has the best throughput a priori is not easy (suggestions are welcome :), but, in the meanwhile, the user can "override" the mirror selection algorithm. In particular, edit root-fs-installer and look to the $override_mirror variable (near the beginning of the code):

 $mirror_override = "";

By default, the variable is empty and no overriding mirror is defined. You can change the value of the variable and put your preferred mirror:

 $mirror_override = "dfn.dl.sourceforge.net";

In that case, the $override_mirror is always used as long as it is available (if it is not available, the shortest-time mirror selection algorithm is applied to the available servers).