PAGE REVIEW TIME !
- 1 Mission
- 2 Three methods to create the system
- 3 Mageia Live
- 4 Live installer
- 5 Conventional install to removable device
- 6 What to look out for
- 7 Optimisations
- 8 Optimising speed
- 9 Program choices
- 10 To improve in this document
You want to take Mageia with you on a small device, together with files, logins etc, possibly encrypted.
Or maybe you want to use an old laptop for casual text editing or browsing; remove the hard disk and plug in a small slient device instead.
A vast array of removable storages can be used, like USB sticks, CompactFlash and SD-cards, and a portable SSD drive.
Three methods to create the system
- Conventional install: Install everything from scratch. (Optionally keeping user data from previous version.)
- Quickly create a Mageia Live by dumping a ISO file to it. Mageia 7 onwards can store updates, added programs, settings, and user files automatically by enabling persistence with a check mark. Thus they are a viable alternative and much less risky to create and use than a conventional install to a removable storage. From Mageia 8 onwards the storage can easily be made encrypted. For details see Persistent live systems.
- You can install your Mageia Live with or without your persistent content to a computers disk, or a portable media.
With all methods, you can install to fixed storage as well as to a portable storage.
Just put a Mageia Live ISO on a storage. With persistence it remember all your changes.
- + Quick to get going, using our easy tool IsoDumper.
- + Less risk of damaging the running system when creating it: IsoDumper takes care of where it writes.
- + Standardised base content, many users will have the same.
- + Very wide support for various hardware, graphics, wifi... to be able to boot on many computers.
- + The base content is compressed, so small for what it contain.
- + It have a boot mode to skip using persistence, in case some update or operator wrecked the system.
- +- It contain all languages for all programs included, which is quite a big chunk most of what you will not use...
- - Updates add new files (not replace original) so total used space also due to this becomes much larger than for conventional install.
- - Hard to create custom partitioning (i.e swap, and a FAT32 for sharing files), and do not support LVM.
- - If encryption is chosen, the original kernel will always be used despite upgrades.
You can spin a Custom Live ISO that contains updated packages, additional programs per your taste, omit programs and languages you don't need.
Install Your Live to a disk or other media, with or without your changes.
- + Easy to have all hardware support (and languages) installed - perfect for a portable system! -Hard to achieve using conventional install.
- + This is one way to via persistence preconfigure a system to install to more than one target.
- - If you do not already have a suitable Live, it is an extra step compared to conventional install.
- ...For rest of points see conventional install.
The normal way for indtalling to fixed drive."
- + Flexible partitioning.
- + You only install what you need.
- + Possible to let it self upgrade to next Mageia version - (But a backup of user files and new install is usually better anyway!).
- - A beginner may accidentally destroy the running system by installing or putting bootloader on fixed storage instead of the removable.
The Network Installer is the same as Classic Installer, except this ISO only contain stage 1 which in turn load stage 2 and packages from any local storage, or local or remote server (i.e Mageia repositories) you direct it to.
- + No excess download if you only do a small install.
- - Very dependent on reliable and fast connection, naturally.
As you already have a Live, we assume you have already selected 32 or 64 bit, and default desktop system.
- Mageia 8 support F2FS (also on system partition). However before RC version you need to install f2fs-tools before starting installer.
- Installer is started from Live boot menu or a booted Live using the desktop icon.
- You can choose partitioning as freely as with a conventional install.
- All performed settings, and removed, added, updated packages, and user files will propagate to the target! *
- So at first boot of target language etc is already set, as well as wifi settings.
- Installer ask if you want to remove unused locales and hardware support. You can run that tool later on the target system.
- Installer ask you to set root password, and a user. That users home folder will be linked to a copy of the live systems live user home.
NOTE: If you run a Live with persistence and do want to install with your changes (settings, changed packages, files), you can start Live without persistence so the only configuration you have made that will be installed is what you set at boot (language etc) and what you configure or install in that session before you start Live.
Conventional install to removable device
- Plan partitioning ahead. (See Planning storage space below.)
- Plan what to install. Make easy selections now - you can always install and remove packages later.
- Choose 32 or 64 bit Classic installer ISO. 64 bit systems can not run on 32 bit machines, on the other hand some programs are not available as 32 bit.
- Put the installer ISO on any storage (DVD, USB stick, SD card, CompactFlash, old disk...) your computer can attach and boot.
- Shut down.
- To be very sure you do not mess up your normal system, unplug all normal storage media; disks, SSD...
- Attach the storage containing Classic installer.
- Attach the device you want to install to.
- Boot installer.
It is a conventional install, so follow normal procedures in other documentation.
What to look out for
Important differences when you install to a removable storage:
- You risk destroying the system installed in the computer by mistake. Take extra care. Maybe remove the internal storage.
- Make sure you do not set any UUID or partition label identical to something on any system it will be attached too or booted on, as that may confuse mounting and use of filesystems. That includes physical partitions, as well as LVM groups and logical partitions.
- Smaller storage; need good planning.
- Select custom partitioning, and work by your plan. Sometimes Diskdrake get confused if you alter made choices. If so, exit and restart installer.
- Make very sure to select the correct device when partitioning.
- Also, in the end of install, installer may ask where to put boot loader. Take care to select the correct device!
- Setting up user: You may want to use the same name as you use on your normal computer, and set the same UID and GID number so you easily can transfer your files.
Planning storage space
See this as an example, authors taste.
- If we are going to encrypt the partition where system resides, we need a /boot ext4 partition, say 100MB
- For EFI compliance, we need a tiny EFI partition, like Mageia Live have: FAT12, 4MB, (Diskdrake refuse to make it smaller than 7MB. FAT16 or FAT32 works too). Mount point /boot/EFI, label "EFI".
- Want to easily share certain files by plugging in the device into another running system regardless of operating system? FAT32 is easily mounted by most operating systems. In FAT32, ownership is not preserved, so easy sharing. Maybe label it FAT32-share, and mount point /home/youruser/FAT32-share, or under /mnt or /media. Default fstab options are OK: default,nofail,umask=000 0 0 (any user, skip if it have problem (accidentally deleted or whatever)). Tip: Create this partition at *end* of the storage space, to facilitate move to another storage of "same" size - they normally differ slightly and it is much easier to resize FAT32 than an encrypted partition.
- Optionally, if you want swap and encryption, or swap and easy way to extend storage at cost of swap: at this point create a partition of type LVM (*1) using all available space, optionally select to encrypt it (*2) , remember the key /!\ (*3) , and activate it. In Diskdrake a new tab will show up - select it and there create the following partitions;
- A large partition mount point "/" for the whole system and user files. (*4) . Choose type per Filesystem choice. If not using LVM (previous point) and you want to encrypt your stuff, select to encrypt this partition.
- Swap may be very useful on computers with little RAM - even just a couple hundred MB will make difference there. If you want to hibernate your live system you need more, like 4GB. Maybe several small swap partitions (*5) Later on the running system, you probably want to set low swappiness, which is out of scope for this article - do a web search.
(*1) Using Diskdrake naming here. What we do is create a [LVM Physical Partition, optionally let LUKS encrypt it, and inside the created Volume Group create one Logical Volume for each of "/" and any swap.
(*2) If you encrypt anything you ought to encrypt swap too because "anything" may be swapped out. In order to avoid being asked for encryption key for every encrypted partition, lets use one encrypted LVM to contain any partition we like to have encrypted.
(*3) During boot you will be asked for that key. Also when you put the stick into a common Linux system you need to enter that key to be able to access your files.
(*4) One large partition is more efficient use of the scarce space, and need no manual housekeeping adjusting partition sizes. So separate /home /tmp /var etc. - One drawback is that growing content in folders /tmp, /var, /home may fill upp the partition and system may stall, so it is more important than usual to keep an eye of space left.
(*5) If you choose to use LVM, regardless of encrypted or not, you gain the power to online extend partitions inside LVM. So you can make several small swap partitions, and if you need more space in the big partition, unmount swap, and extend the big partition, that can all be done online when needed thanks to LVM. You can also simply when partitioning not use all available space when making partitions inside LVM, and later add swap, or extend partition.
If you are cautious, it is easiest to encrypt everything. (Except the eventual sharing partition, and /boot and EFI which will not work encrypted.) The CPU load for encryption is negligible.
If you instead value reliability before security, do not encrypt. Then you can use tools to recover files which got deleted or if the filesystem crash, especially if you choose filesystem ext4 which have many tools.
What to choose for the big partition containing the system and user files.
- Ext4 is the most used, and have the best best tools for recovering lost files - deleted or lost by file system problems. If you prefer speed over reliability, you can disable logging.
- Mageia 8 support booting on F2FS, which is optimised for flash devices - offering high speed, compression, and less wear. In installer/Diskdrake you reach this option in advanced mode.
- In Mageia 8, RPM can be set to do less writes. That may be good for old flash devices that are slow at small writes, but as long as we use modern faster devices the default traditional mode is probably better because the modern devices are actually fast at many writes, according to our tests.
- HOW? At https://wiki.mageia.org/en/Mageia_8_Release_Notes#New_RPM we write : Add automatic SSD detection and optimization (on Linux, disabled by default). I guess it is, from https://rpm.org/wiki/Releases/4.14.0.html: Add a configurable mode to minimize writes (at expense of more reads) to conserve SSD’s (RhBug:783480)
- To be able to work efficiently on a weak computer, select a lightweight desktop like Xfce or LXDE, or our even lighter desktops, a lean web browser like Falkon, for photo browsing-cropping-resizing use Gwenview. (Even Xfce by default use the heavy Firefox and Gimp, respectively)
- If there is enough space left on the storage (usually no problem nowadays) you can also have your favourite desktop and large programs installed and choose to use them when working on a powerful machine.
- Some monitoring that at a glance show you how much partitions are filled up, battery meter, ... - usually included in desktop.
- System tools for partitioning, file recover etc so you can use it as a tool to fix other systems.
To improve in this document
- Interlink optimisation and filesystem etc to other docs. Release with updated name "Mageia on removable device" ?, update links in- and out-going.
- F2FS settings like compression and other optimisations...
- F2FS support transparent encryption by itself. Per file type, per folder. How can that be utilised?
- Can we use a swap file instead of partition for easier efficient use of space, and also avoid that separate encrypted partition.
- How to install all hardware support in a conventional install, like hardware support is on official Live? (Looking for something easier than make list from Live content, or see how draklive2 resolves what to install.)