=== XINUTOP-NAV === By Frank Baudet http://marinux.tuxfamily.org Martinique, West Indies Central America, 2019 Revision V2.4 1) PRESENTATION 2) INSTALLATION 2.1) LINUX 2.2) WINDOWS 3) RUNNING XINUTOP 3.1) LANGUAGES 3.2) CHARTS 3.3) PROGRAMS AT START 3.4) SLEEP MODE 3.5) RESIZE PARTITION 3.6) FACTORY RESET 3.7) PACKAGES MANAGEMENT 4) TECHNICAL SUPPLEMENT 4.1) PASSWORDS 4.2) HOW RUN XINUTOP 4.3) CONVENTIONAL INSTALL 4.4) LOW MEMORY SYTEMS 4.5) ERRORS AND BUGS 5) CONTACT 6) DISCLAMER ****************************** 1) PRESENTATION ****************************** XINUTOP-NAV is a Linux portable or installed marine OS, builded from Debian stable packages with Xfce desktop environnement. It provide, with about 700Mo, a basic generalist system and 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 NMEA navigation datas (dashboard). Handle raster (*.kap) and vector charts (CM93, S57/S63). - PolarCOM: virtual instrumentation, from NMEA datas. - PolarView: chartplotter, tides, AIS, grib files, GPS interface and others NMEA navigation datas (dashboard). Handle raster (*.kap) and vector (S57/S63) charts. Try version, but fully fonctionnal, one month validity. - XTide: tides with numerical and graphical display, worlwide coverage. - Zygrib: download and display weather grib files. - Muplex: NMEA multiplexer. - Rastow: raster charts organizer. - OSD Depth: display water depth with big digits above any application (aka "on top"). Xinutop is made in the KISS mind, with a special care of simplicity, efficiency, reliability, lightness (who say bloatware ?) on a great variety of x86 compliant computers, from up-to-date hardware to low power or old processors. They poorly supporting the growing greed of currents OS, less and less compatible with embedded hardware, according to Wirth's law. Today it's much easier to add programs (only the programs that you need) on a simple system base than eradicate from the system heart softwares that you are useless. Xinutop can run as a portable operating system on removable device, but also as a main operating system on hard drive. The memory usage after startup is about 100MB. To make Xinutop unbreakable (may I say "unbrickable ?"), the necessary system files are locked and can't be deleted or modified by a normal way. Xinutop is assembled with Debian 8.x packages (Jessie) and include these features: - A robust architecture: main filesystem in squashfs, boot system protected, no write access. - A fast boot provided by lrd scripts, more simple and very much faster at boot than casper, the default live system for Debian-Ubuntu. (ex: 30s from a compact-flash on a modest Intel/Atom n270 single core platform) - A persistent mode that allows to keep the user datas and system changes in a transparent user layer above the main filesystem (as "data" partition in Linux-Android). - A restore mode (factory reset), allowing to findnize exactly the original system (simply by deleting the user layer). Interesting if you want try audacious or hazardous sofware solutions ! - 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 (RAM mini 1Go). You can start it from a slow device as an USB key and run it faster than a conventional installation on a HDD. All your changes and datas are keeped at reboot. - A simplified boot and installation (few questions !), simply copying by block mode to your device. - The full compatibility with applications of the Debian distribution. You can install and run any other application from your user layer. 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) INSTALLATION ****************************** Carefull ! any error on devices names can erase datas or complete disk ! Prerequisity: - One computer running Linux or Windows with at less 256Mo RAM - as my Panasonic CF-M34 (2003) - One inscriptible and bootable target device, at less 1Go - Connect an USB stick, SD/flash card, HDD or SSD, all will be erased - Download file xinutop-nav-yy.mm.img at http://marinux.tuxfamily.org NOTE 1: All datas on the target will be erased ! NOTE 2: 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 device/software concerned website, and more generally on the web. NOTE 3: Command lines are preceded by a "#". 2.1) FROM LINUX *************************** - Memory device connected but not mounted, with only one command line: # dd if=//xinutop-nav-xXX-X.X.img of=/dev/sd example: # dd if=/home/user/download/xinutop-nav-x86-2.1.img of=/dev/sdb NOTE: you can also designate a hardisk as target and Xinutop will be installed in the same way. In this case it's possible to boot the computer with a second Xinutop from USB key, to keep the disk free for the operation. All disk datas will be erased ! 2.2) FROM WINDOWS *************************** - With some clicks: download, unpack and execute win32diskimager at http://sourceforge.net/projects/win32diskimager/ image file: \xinutop-nav-yy.mm.img device: your target device and write. C'est fini, you have just to configure your BIOS to boot on the device so prepared. NOTE: if your PC has UEFI, deactivate it and use BIOS emulation (legacy BIOS compatibility). ****************************** 3) RUNNING XINUTOP ****************************** NOTE: in this text, [base] is marked between hooks, foruse it depends if your medium is mounted as "passive" on a linux box or if Xinutop is running. 3.1) LANGUAGES ************************** The language choice is memorized for the next boot. English, French, German, Spanish languages are included. Others languages can be download from Debian repositories after install. The startup "other language" is the choice menu to make if you have installed an another language. To install others locales: - connect to internet - launch terminal - invoque the script: # sudo add-langs.sh - and follow the instructions. During this operation, you will be able to reconfigure your keyboard. NOTE: you can change your keyboard layout at any moment by /menu/settings/settings_manager/keyboard/layout. 3.2) CHARTS ************************** Take a look at: /home/marinux/Charts/README.TXT. 3.3) PROGRAMS AT START ************************** By /menu/parameters/session_and_start/autostart you can make a choice to autolaunch an application at start as a chartplotter, Muplex or x11vnc server (to remote Xinutop from Linux, Windows, Android, iOS). 3.4) SLEEP MODE ************************** By default, after 10 minutes of inactivity, there is a diaporama during 1 minute and the system tilt in sleep mode. If you want display your photos, simply copy it into [base]/exemples/photo/. If you want get the the system always on, click on /computer/presentation_mode button, at right on the taskbar. NOTE: on some laptops, Xfce presentation don't apply (bug #1193716). You can bypass this problem untick power management and screensaver in /menu/parameters/session_and_start/autostart. 3.5) RESIZE PARTITION ************************** The *.img file is created from a compact-flash, ~600Mo is the minimal size to run Xinutop. It's just for start and test but rapidly not enough for regular use. At the first boot (or reset) the Xinutop partition is set at maximum alvailable. If you don't wish this automatic operation, choice the ramdisk mode at the first boot. For this startup and subsequent, in any mode (standard or ramdisk), this operation will be canceled. 3.6) FACTORY RESET ************************** When you choice at boot to 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 on the user layer is erased. The home user contents is saved, moved to [base]/home-save. 3.7) PACKAGES MANAGEMENT ************************** - Add packages, use the Debian standard way: # apt-get update (sources.list are ready) and # apt-get install If you prefer use a graphical installer: # apt-get install synaptic - Remove packages, use the Debian standard way: # apt-get purge If you remove integrated Xinutop package, the files will be marked as "removed" and disapear, but naturally they still stay in squashfs system file and reappear if you reset the system. NOTE: some launchers are 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: with Debian stable, only important and security update are proposed. It's a good thing. So your user layer don't risk to grow considerably. Optionnaly, you can refine it, keeping only the line in [base]/configs/apt/sources.list and comment the others sources. I am not devotee of these incessants updates (who say perfusion ?), it's one of the reasons of my choice to use Debian stable. Sometime update create new problems and a stable system is a stable system. However you can update a specified program, using apt-get install or wait the next version of Xinutop... ****************************** 4) TECHNICAL SUPPLEMENT ****************************** 4.1) PASSWORDS *************************** If needed, the password is "xinutop" for root and marinux users. Due to the original and safe structure, the password is not asked, 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 system/configuration, exept if you have made modifications in [base]/boot or [base]/system with (see conventional install)... In the baddest case, reinstall Xinutop and recopy your charts ! The purpose of Xinutop is a navigation tool, shared by the skipper and the crew; if you have very personal datas, use an external device and/or create a password in your bios. However, you can restrict the sudo usage: see into /usr/local/etc/sudoers.d/ NOTE: all programs which normally require superuser password are marked "(sudo)" in the menu. 4.2) HOW RUN XINUTOP *************************** - 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 (aufs - Another Union File System -) is superposed to / and Linux kernel "see" that tree as conventional. The access of original media structure is preserved, remounted in [base]/initrd/base, linked by [base]. - Directory [base]/configs: Contain essential configuration files as hostname, network and customisable scripts. These files are linked to their original place in the squashfs file system. So your can reconfigure these files at your convenience. - Directory /usr/local and subdirs (into squashfs system file): Contain all the modified files, customized scripts, workaroud native bugs (as blueman) and non-debs format packages. As [base]/configs, the Debian modified files are linked to their original place in the squashfs file system. The original file is renamed with dpkg- extension. The first purpose of this choice 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. 4.3) CONVENTIONAL INSTALL *************************** For middle / advanced users. Xinutop run as a live system, running from a squashfs file system. If you prefer install it as a conventional Linux distro on HDD/SSD, follow these instructions. Any automatic procedure at this time, the best way to learn something and know what are you doing ! Prerequisities: - A memory device with Xinutop live installed (source), must be runned at less one time with language choice configured. - A running Linux box (target), can be powered by an another running Xinutop. - A root or sudo access ( with Xinutop and use to paste in console). NOTE: bring attention at "/" with rsync commands Operations: - create a free ext4 partition on your target (gparted). Minimum 2Go + charts. - name it as you want and put the flag bootable if Xinutop will be the main system. - exit from gparted and mount this new partition. - initialize paths variables (no "/" at the end of path) # SOURCE= # TARGET= - unlock the protected files: # chattr -Rf -i $SOURCE/boot $SOURCE/sfs - create a mountpoint for the system squashfs file: # mkdir /tmp/sfs - mount the squashfs file: # mount -t squashfs -o loop $SOURCE/sfs/system.sfs /tmp/sfs - copy the contents: # (g)rsync -r -p -o -g -l -D /tmp/sfs/ $TARGET/ be patient... Now you have (almost) a conventional Linux tree on your target. - finalize the copy: # mkdir $TARGET/base # rsync -r -p -o -g -l $SOURCE/charts $TARGET/base/ # rsync -r -p -o -g -l $SOURCE/configs $TARGET/base/ # rsync -r -p -o -g -l $SOURCE/exemples $TARGET/base/ # rsync -r -p -o -g -l $SOURCE/boot $TARGET/ --exclude ".configs" --exclude "ldlinux.sys" # rsync -r -p -o -g -l $SOURCE/data/home $TARGET/ # cp -d $SOURCE/vmlinuz $TARGET/vmlinuz # cp -d $SOURCE/initrd.img $TARGET/initrd.img The boot process, (maybe difficult): - Xinutop is your main system on /dev/sda1 # extlinux -i $TARGET/boot/extlinux # mv $TARGET/boot/extlinux.conf $TARGET/boot/extlinux.sfs # cp $TARGET/boot/extlinux.cnv $TARGET/boot/extlinux.conf Take a look into the new $TARGET/boot/extlinux.conf if Xinutop don't reside on sda1. - Xinutop is not your main system: ex: grub-pc # update-grub (not tested) and compare parameters with extlinux.cnv grub-legacy (0.97) manually, take your inspiration from extlinux.reg Windows Sorry, any experience. I have abandonned this bloat and opaque OS since XP version. Take a look at grub4dos and grub2win. Your experience is welcome. Now you can reboot and run Xinutop as any Debian OS. 4.4) LOW MEMORY SYTEMS *************************** Xinutop can run from 256Mo of RAM, but it's very few. To get better performance: - create a swap partition, it will be recognized and mounted at boot. - by default, the /tmp dir is mounted as a ramdisk in memory. To retriewe this space, comment the lines: and in [base]/configs/fstab to deactivate it. The /tmp directory will be created on the disk. Avoid this solution with devices which have limited writes operations as memory cards and SSD. 4.5) ERRORS AND BUGS *************************** - Error message after start: boot medium identification failed. The most reliable procedure, by UUID is described in [base]/boot/extlinux/cheatcodes.txt. - 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 but rare, grafic cards. On Debian documentations you can find lists of compliant hardware. Look also for "firmware" in packages ("apt-cache search firmware") if you can find a compliant driver. By default they are not all installed. - Debian provide an universal Linux kernel, running from servers to mini-PC. The result is good but a little big for our project. Xinutop has a smaller customized kernel. It's able to run from non PAE processors to recents multicores. This kernel don't handle more than 4Gb of RAM, but with ~100Mo occuped at start, you have more than enough to run comfortably a chart-plotter. ****************************** 5) CONTACT ****************************** Comments, feedbacks, bugs descriptions are welcome and I would apreciate a spelling check of texts. Sorry for my approximative english, I was born in French Britanny. A correction is welcome, but I hope these explanations are understandable. marinux[among]tuxfamily.org Bon vent, belle mer. * Frank * ****************************** 6) 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