=== XINUTOP-NAV === By Frank Baudet http://marinux.pk973.org Kourou, French Guiana South America, 2013 1) PRESENTATION 2) PRESENTATION (FR) 3) INSTALLATION 4) OTHERS INFOS 5) MARINE CHARTS 6) TECHNICAL SUPPLEMENT 7) DISCLAMER * 1) PRESENTATION * Xinutop-nav is a Linux portable marine OS, including a lightweight base applications from Xfce family, and provide, with less of 400Mo, essential marine applications such as: - Fldigi: reception and display radio weather-fax and NAVTEX, via the sound card. - OpenCPN: chartplotter, tides, AIS, grib files, GPS interface and others navigation datas (dashboard). - Polarcom: virtual instrumentation, from NMEA datas. - XTide: tides with numerical and graphical display, worlwide coverage. - Zygrib: download and display weather grib files. - Muplex: NMEA multiplexer. - OSD Depth: display water depth with big digits above any application (aka "on top"). Xinutop is made with a special care of lightness, simplicity, efficacy, reliability and can operate from multiple datas supports (HDD, SSD, USB, Flash) on a great variety of i386 compatible computers, specially on low power processors, or those unfairly considered as obsolete, poorly supporting the growing greed of currents OS, less and less compatible with embedded hardware. Xinutop can run as a portable operating system on removable device, but also as a main operating system on hard drive (same install). The memory usage after startup is about 100MB. To make Xinutop unbreakable (may I say "unbrickable" or almost ?), the essentials sytem files and directories are locked and can't be deleted or modified by a normal way (even in root mode). Xinutop is assembled with Ubuntu 12.04 packages (Precise), including the scripts "lrd" by Gauvain Pocentek and provide: - A robust architecture (main file system in squashfs, no write access). - A persistent mode that allows to keep the datas and system changes in user layer (as Linux-Android system). - A restore mode, allowing to findnize exactly the original system (simply by deleting the user layer). - A "home-save" function, to automatically save and move user home datas during a restoration. - A ramdisk mode, which boost time access, running Xinutop from a virtual harddisk emulated in memory. - The full compatibility with applications of the Ubuntu distribution. Xinutop is under GPL V3, then you are free to use, distribute and modify it, but at your own risk and under your own responsability ! * 2) PRESENTATION (FR) * Xinutop-nav est un OS portable Linux marine, incluant une base d'applications légères de la famille Xfce, et fournit, avec moins de 400Mo, des applications marines essentielles telles que: - Fldigi: réception et affichage des radio fax-météo et du NAVTEX, via la carte son. - OpenCPN: cartographie, marées, AIS, fichiers grib, interface GPS et autres données de navigation (dashboard). - Polarcom: instrumentation virtuelle, à partir de données NMEA. - Xtide: marées avec affichage numérique et graphique, couverture mondiale. - ZyGrib: téléchargement et affichage des fichiers météo grib. - Muplex: NMEA multiplexer. - OSD Depth: Affiche la profondeur d'eau en grands caractères par-dessus toute application (se dit "on top"). Xinutop est conçu avec un souci particulier de simplicité, de légèreté, d'efficacité, de fiabilité et peut fonctionner à partir de plusieurs supports de données (disque dur, disque SSD, USB, Flash) sur une grande variété d'ordinateurs compatibles i386, et spécialement avec les processeurs à faible consommation, ou ceux injustement considérés comme obsolètes, supportant mal la voracité grandissante des OS actuels, de moins en moins compatibles avec le matériel embarqué. Xinutop peut fonctionner comme système d'exploitation portable sur périphérique amovible, mais aussi comme système d'exploitation principal sur disque dur (installation identique). L'occupation mémoire après démarrage est d'environ 100Mo. Pour rendre Xinutop incassable (ou presque ?), les fichiers système essentiels sont bloqués et ne peuvent s'effacer ou se modifier selon une procédure normale (y compris en mode root). Xinutop est assemblé avec les paquets et mises à jour de Ubuntu 12.04, incluant les scripts "lrd" de Gauvain Pocentek et fournit: - Une robuste architecture (système de fichiers principal en squashfs, aucun accès en écriture). - Un mode persistant qui permet de conserver les données et modifications système en couche utilisateur (idem Linux-Android). - Un mode restauration, permettant de retrouver exactement le système d'origine (en effaçant simplement la couche utilisateur). - Une fonction "home-save", qui sauvegarde et déplace automatiquement les données utilisateur durant une restauration. - Un mode "ramdisk", qui accélère les temps d'accès, en exécutant Xinutop à partir d'un disque virtuel émulé dans la mémoire. - La totale compatibilité avec les applications de la distribution Ubuntu. Xinutop est sous licence GPL V3, vous êtes donc libres de l'utiliser, le distribuer et le modifier, mais à vos propres risques et sous votre entière responsabilité ! Voyez les conditions de licence à la fin de ce document * 3) INSTALLATION * Carefull ! any error on devices names can erase datas or complete disk ! 3.1) THE SIMPLEST WAY, FROM *.IMG FILE, FOR LINUX OR WINDOWS USERS: Prerequisity: - One computer running Linux or Windows at less 256Mo RAM - One inscriptible and bootable target device, at less 512Mo - Connect an USB stick, SD card, or main HDD, all will be erased - Download file xinutop-nav-yy.mm.img at http://marinux.pk973.org Only particulars Xinutop operations are described here. General procedures, as adjust BIOS to choose the medium boot, use of programs described, etc... are abundant on the software concerned website, and more generally on the web. Execution: - Linux users, USB stick connected but not mounted, with only one command line: dd if=//xinutop-nav-yy.mm.img of=/dev/sd ex: dd if=/home/user/download/xinutop-nav-13.03.img of=/dev/sdb - Windows users, with some clicks: download, unpack and execute win32diskimager at https://launchpad.net/win32-image-writer/+download image file: \xinutop-nav-yy.mm.img device: your target device and write. C'est fini, just you have to configure your BIOS to boot on the device so prepared. 3.2) THE ADVANCED WAY, FROM *.TAR FILE FOR LINUX USERS: Prerequisity: - One computer with a running linux installed or live (or an another Xinutop): - gparted (grafical) / parted (cmd line) - syslinux / extlinux - One inscriptible and bootable target device, or main HDD Only particulars Xinutop operations are described here. General procedures, as adjust BIOS to choose the medium boot, use of programs described (program --help), use of sudo (almost all the commands must be made by super user etc... are abundant on the website concerned software, and more generally on the web. Abreviations: "sdxy": x=letter of device, y=number of partition (ex: sdc1). "mountpoint": any mountpoint (ex: media, mnt). "sourcexinutop": the place where you have downloaded Xinutop files. "yy-mm": version number of Xinutop Execution: 1) insert the device, if removable. if mounted, umount it. 2) gparted / parted delete the current partition 3) optional: may resolve device not bootable, reinitialize the mbr gparted: device / create partition table cmd line: dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdx 4) gparted / parted create a new ext4 partition 5) gparted / parted insert the flag boot 6) mount the partition create a mountpoint: mkdir /mountpoint/sdxy mount /dev/sdxy /mountpoint/sdxy 7) create a boot directory. mkdir -p /mountpoint/sdxy/boot/extlinux 8) make the partition bootable by installing extlinux. extlinux -i /mountpoint/sdxy/boot/extlinux 9) unpack the Xinutop archive. cd /mnt/sdxy tar -xvf /sourcexinutop/xinutop-nav-yy.mm.tar C'est fini, just you have to configure your BIOS to boot on the device so prepared. * 4) OTHERS INFOS * - The language choice is memorized for the next boot. - Error message after start: problem of identification of boot medium. The most reliable procedure, by UUID is described in /(base)/boot/extlinux/extlinux.*. - Linux contains a large number of drivers integrated in it kernel and modules. However, some components, very recent, exotic, or whose manufacturers don't give informations necessary to write drivers by the Linux community, can be bad or non recognized. E.G soundcards, wifi cards, or more embarrassing, grafic cards. On Ubuntu documentations you can find lists of compliant hardware. * 5) MARINE CHARTS * See in /(base)/configs/etc/local.sh and user.sh how configure a charts iso file and start automatically OpenCPN, centered on your position. Marine charts are generally composed by a crowd of files, so it's a good choice for time access and transferts to make an iso file (with xfburn) of your charts and use this script to mount the file. See technical supplement how to get more space on the partition. * 6) TECHNICAL SUPPLEMENT * - How Xinutop run: At start, during the initrd phase, the lrd script mount the /sfs/system.sfs squashfs file, (which is an image of a standard Linux system tree) on / in read only mode. Next, it mount (or create if not exist) an another layer in read/write access, persitent on the medium (/(base)/data directory). This layer is superposed to / (aufs - Another Union File System - mode) and Linux kernel "see" that tree as conventional. The medium original structure is remounted in /initrd/base, linked by /base. Note: in this text, (base) is marked between parenthesis, foruse it depends if your medium is mounted as "passive" on a linux box or if Xinutop is running. - Increase the partition size: The *.img file is created from a 512Mo compact-flash, the minimal size to run Xinutop. If you need others programs, you get rapidly a "no space left on device" message; so to use Xinutop on a larger partition, you have two solutions: 1) Plug your device (as "passive") on another running Linux box (may be an another Xinutop) and use gparted to increase the partition size 2) Use the method described in 3.2 to install Xinutop on any partition. - Directory /(base)/configs: Contain essential configuration files as hostname and network and customisable scripts. Theses files are linked from their original place in the squashfs file system. So your can reconfigure theses files at your convenience. - Directory /usr/local and subdirs (in squashfs system file): Contain all the modified files. As /(base)/configs, theses files are linked from their original place in the squashfs file system. Some files, (ex: group, sudoers) can't be relocated, so a link is created from theses targets to /usr/local and subdirs. The first purpose is to prevent any update to erase the modified files (only links) and the second is gather all the modifications in one place for inspect or debug. - Reset system: When you reset the system, the contents of /(base)/configs directory is erased and replaced by their original version from /(base)/boot/.configs. All the system modifications layer is erased. The home user(s) contents is saved, moved to /(base)/home-save. - Password: Due to the original and safe structure, there is no password, the session is automatically started and marinux user have full rights on the system. You can make big errors, a reset system will give back exactly the original configuration, exept if you have made modifications in /(base)/boot or /(base)/system with chattr (see unlock files system)...re-download Xinutop ! - Add packages: Normal way, apt-get update (sources.list are ready) and apt-get install - Remove packages: Normal way, apt-get purge , theses files are marked as "removed" but naturally they still stay in squashfs system file and reappear if you reset the system. Note: the menu is customized in /usr/local/share/applications, so you must also delete manually the corresponding entry, which is not a part of the regular package, if it subsist. - Updates: It's not advisable to make an apt-get upgrade (and yet less apt-get dist-upgrade); your user layer risk to grow considerably. Except a big security hole or a missing functionality, I am not devotee of theses incessants updates on a stable system. Wait the next version of Xinutop... - Conventional install: You can unsquashfs the /(base)/sfs/system.sfs on /, adjust the boot and run Xinutop as a standard (but lightweight !) Linux OS - Unlock system files: The /(base)/system and /(base)/boot are locked in inamovible mode with . So, a command even executed by root can't delete or mofify theses directories or contents. If you know what you do, use to remove the protection and to renew lock. In any way, /(base)/system is automatically locked every reboot and /(base)/boot every reset. Comments and feedbacks are welcome and I would apreciate a spelling check of texts (translations ?). Sorry for my approximative english, I was born in French Britanny but I hope that explanations are understandable. webcom.marinux(at)gmail(dot)com Bon vent, belle mer. Frank ************ 7) LICENSE GPL V3 DISCLAMER: THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. LIMITATION: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. # EOF