From Mageia wiki
Jump to: navigation, search



THIS PAGE IS A DRAFT

It requires improvements. If you want to improve it, simply log in and click on the Edit tab.

Please remove this {{Draft}} template, when you're sure the page is complete and correct.


Notes on getting the best out of Mageia Live run from removable storage ( USB-stick / SD card / CompactFlash... ) with persistence partition which store system updates, settings, and user files - optionally encrypting it all.


PAGE REVIEW TIME !

Contents

Quickstart

This page is long - but don't fear, it is basically easy:

Download a Mageia Live ISO, plug in a modern USB stick in your computer, start Mageia IsoDumper, select the stick, select the ISO, checkmark persistence and optionally encrypt, go! Done.

The rest of this page helps you improve your experience in various ways.

You have no tool to create persistence?

If you do not already run Mageia, you do not have IsoDumper to create the persistence partition.

Then use another tool to create a normal Live of Mageia 8 or later without persistence, then follow Creating persistence using only Live itself, then optionally create a swap file and/or other partitions.

Another way is to create a Mageia 8 Live to use as the tool, see Custom partitioning and note the (*1) there.

Advantages of persistence

  • Store your work, logins, settings.
  • Faster easier boot - no questions of locale, time, network, etc. configured - you can surf the net, reach your cloud... quickly and you can configure autostart of i.e web browser, so just plug in, turn on...
  • Have your printer and other devices and services installed, i.e file syncing.
  • Add additional program of choice.
  • Functionality updates to programs.
  • Security updates i.e. to the system and your web browser.
  • As it no longer uses the RAM file system, it stands more chance of working on machines with low amounts of RAM. (Like a conventionally installed system.)
  • If you really need to use one of the proprietary drivers, it doesn't have to be rebuilt each time you reboot. This is particularly important if you need the Broadcom wl driver, because that often only works after a reboot.
  • Live Installer will include all updates in the install. And user files, settings etc. (But still use new partitioning.)

Encryption

From Mageia 8 onwards you can select to have all persistence encrypted!

When the Live system boots it asks for a key. Also when you plug in the storage to a computer running Mageia or similar competent system you will be asked for key to be able to read or write your files. Without correct key the persistent content is not readable.

Advantages

You know everything you do is stored encrypted: network setup, your files, logins used by any programs, your documents,... (Even the added/updated program binaries...)

Drawbacks

  • Even when system install an updated kernel, it can still only boot the original.
  • In case of file system havoc (accidentally pulling it out, another system overwrites it, bad device), it requires specialists to recover content - while there exist several tools to recover non overwritten content from then non encrypted default ext4 formatted persistence.

Conclusion

Selecting to have IsoDumper make persistence encrypted is a both easy and secure solution. However, in some cases you may want to use a folder/file level encryption solution instead. An alternative is to do some Custom partitioning and have a separate encrypted partition only for some user files.

Availability

  • Mageia 8: All Live ISO works with persistence both with and without encryption. Another new is Mageia 8 support F2FS persistence.
  • Mageia 7.1: All Live ISO works with persistence. No encryption. 32 bit need fixing after updating.
  • Mageia 6.1 64 bit only, unofficial, not much tested. Persistence work but at least have the following shortcomings: 1) performs file system checks every boot due to unclean shutdown, but all writes should have been flushed, so should be OK. 2) you can install kernel updates, but the live system will always boot from the original kernel. In total it works without any tweaking for me on Dell Precision M4400 (but not Thinkpad T400) including after full update.

Alternative methods

Mageia can be installed to removable device like you would to a fixed disk.

You can spin a custom Live ISO that contains updated packages, additional programs per your taste, omit programs and languages you don't need... It may too be used with persistence per this wiki page.

Another way to make a different type Mageia Live USB.

Related pages

Release notes: Mageia 7, Mageia 8

Persistence with memory devices

IsoDumper put the ISO on removable storage and optionally the persistent partition, optionally encrypted.

You can use dd to install Live ISO to a flash drive as non persistent live, and then use Diskdrake.

Diskdrake is useful for adding persistence to an existing nonpersistent Live system, or making custom partitioning.

Why most tools including Diskdrake in Mageia 7 can not see the Live partitions and content: mga#27778#c6

Choosing storage

For the persistence, it is very important that the storage is fast at many small writes. Especially for package management, but also some programs can be affected. Helpful links:

Storage speed test results -- See if your device is there - or maybe add it.

How to test storage speed. -- Mageia have the tools packaged.

Choosing ISO

We offer four Live versions of each Mageia release: Three different preinstalled DE (Desktop Environment): Plasma, Gnome, and Xfce. All three in 64 bit, plus Xfce also in 32 bit version.

Thanks to persistence you can when the system is booted up add any DE Mageia have, so the choice is about taste, functions, compatibility, speed, and using less space.

Which Desktop

I suggest Xfce, regardless of what you are going to use later.

Because all updates above the pre-installed version take space like they were newly installed! That is because space, where any preinstalled package resides, is read-only.

So if you choose Plasma, which is big, and then there are lots of updates to Plasma, there will be a lot of wasted space occupied by the old versions in the large Plasma live ISO.

Anyway, even if you would want to normally use Plasma or Gnome, having xfce as a fallback is good, and to use on computers with USB2 / slow CPU / low amount of RAM.

Install another DE later (if you want) like Gnome and/or Plasma or another DE we support, after updating the system.

32 (i586) or 64 bit (x86_64)

64 bit runs slightly faster - use if you never need to run a 32-bit computer using this device.

32 bit is the most computer compatible. Because it is slightly smaller, it saves a *tiny* bit storage space, RAM, and load time.

Creating persistence using only Live itself

This currently only works on 64 bit Mageia 8 Lives. For other versions see [[#Create_Live_with_custom_persistence|Create Live with custom persistence].

  1. Boot the Live system to desktop.
  2. Use Diskdrake to create an ext4 partition. (Actually almost any kind; you set final type in step 4.) Save some unused space if you plan to use Optional partitions. If you want it encrypted, check mark that box and fill in encryption key - And note it down safely!
  3. Close Diskdrake, Reboot (*)
    • If you opted for encryption, it will ask for the key after the boot menu.
  4. Back in Diskdrake: select Expert mode, Type: set your desired type (i.e ext4, Btrfs, or F2FS), Format, Label: mgalive-persist, close Diskdrake.
    • For F2FS: Diskdrake can not label it, so use mkfs.f2fs per Labelling F2FS below, then return here.
  5. Reboot
  6. Continue at First boot with persistence.

(*) One quirk: At this point diskdrake refuse to format the partition. Normally this is no problem, but as example if you are replacing a persistence partition with another type or size, on next boot it may use that old persistence still there because it was not formatted, and is on the same place. Even encrypted partitions may be back! Solution: Reboot without persistence.

Labelling F2FS

Diskdrake can not label F2FS, so close Diskdrake and label it manually. First investigate how that partition is referenced: issue blkid , and use first part of the returned line per examples below, but replace "sdXN" with your specific part, i.e sdb5.

If you are not using encryption, execute a command like

mkfs.f2fs -f -l mgalive-persist /dev/sdXN

If using encryption it begins with "/dev/mapper", so your command will be like

mkfs.f2fs -f -l mgalive-persist /dev/mapper/crypt_sdXN

Removing or recreating persistence on itself

To remove persistence, simply boot without it, launch diskdrake, and delete the partition.

To create new persistence now you can continue from point 2 in previous chapter.

Recipe for updated Live

How to create an updated Live system from scratch.

  1. Choose storage device.
  2. Choose ISO.
  3. Use IsoDumper to put the ISO on the storage, checkmark persistence, and optionally encryption if Mageia 8 and later. ( Alternatively perform custom partitioning. )
  4. Boot it up. This first boot you select language etc.
  5. Configure wifi internet connection.
  6. Open a console terminal to enter the following commands:
  7. Become root user, in /root: su -
  8. Remove unneeded localisations: remove-unused-packages /!\Caution/!\ Deselect to remove drivers, and let it work. For more information on this, and possibly more things to remove, see Removing packages.
  9. Add (*) standard repositories, either from an automatically selected mirror: urpmi.addmedia --distrib --mirrorlist OR specify your favourite mirror: urpmi.addmedia --distrib http://ftp.acc.umu.se/mirror/mageia/distrib/7.1/i586 (edit URL to suit!).
  10. Update: urpmi --auto-up --auto
  11. If Mageia 7.1, run again remove-unused-packages as the updated version rinse more.
  12. If you are non-English but like to have English locale too, re-add it: urpmi locales-en autocorr-en hunspell-en hyphen-en mythes-en
  13. If you use Mageia 7 32 bit, read Updated Mageia 7 32 bit Live fail booting. You can right now before rebooting Fix Mageia 7 32 bit update boot problem.
  14. Reboot. If the menu option to reboot do not work, issue in a terminal: reboot.

After a successful reboot, do your custom settings, install other DE, other DM, useful programs. Maybe give "Live" a password, and make a guest user. Before and/or after, it may be a good idea to back up the memory folder.

(*) Keep the two default Live repos that are built into the ISO. They contain the necessary packages to install proprietary drivers and bootloaders. You can list their content using urpmq --list --media 'Live'. They are good to keep in case you need drivers to get connected. "Removing" what is in ISO stored repo does not save space anyway.

Custom Live ISO

For those interested, it is possible to spin custom/updated ISOs.

It can be much reduced in size just because you do not need to include all translations - that change alone on the Live Xfce ISO will save over 800 MB. You can omit programs you do not need, include them you do need, use another desktop, preconfigure desktop background...

Also custom ISOs support persistence.

See Building the Live ISOs, using draklive2, a mastering tool that creates an ISO image containing a Mageia live system (or 'Live ISO' for short). The image is a hybrid ISO, allowing it to be used with both optical media and a variety of flash storage.

Persistence tricks

Basics

In the persistent partition, you find the folder memory. It contains any changes from the plain Live ISO: settings, documents, system logs, changes, new programs and updates... In its subfolder /home you find your user(s) subfolder(s) and documents like on a normal install. The other subfolders contain changes to the initial system, in conventional layout, and while you can i.e reach memory/etc/ you should use the normal path /etc/ etc.

If memory is missing or renamed it will be automatically created at boot.

Altering persistence

/!\ This should not be done while persistence is in use, so either boot the Live skipping using persistence, or plug the Live storage into another system to edit it.

To back up everything (updates, settings, documents...), you can copy the memory folder. To be sure to get everything, and keep date and ownership! One way is to use the command cp with the switch -a. Example plug in Live your normal Mageia system, mount the mgalive-persist partition, and in a console enter su -, cp -a run/media/Your_Computer_User/mgalive-persist/memory/ /where/you/want/it/ Adapt links as suitable - the "run/media/Your_Computer_User/" part is from using Dolphin to mount it.

Maybe you want to take a backup after you have first configured and updated the storage, before adding your personal choice of programs and documents.

Moving, duplicating

Everything

Any Mageia Live system based on the exactly same Live ISO file can exchange the whole memory folder.

So you can copy, replace, sync memory between such devices. (Just remember the systems should not be running, and copy everything and keep ownership, time, etc.) Note that you may want to somehow omit/remove any large swap file if you have such - to save space - and recreate it on the target.

This facilitates moving to larger, smaller, different type storage devices, make preconfigured Lives to family and friends, and with custom partitioning you can add another partition, choose another file system, choose encryption or not...

User files

Between Live systems based on different ISOs, you can safely only move memory/home. (Normal procedures of eventually different user configuration applies.)

Swap file in persistent partition

Even just a few hundred megabytes of swap makes big difference on systems with small RAM. Also, simply having swap available enables kernel to work a bit more efficiently.

Adding swap in the form of a file instead of a swap partition have advantages:

  • It can easily be implemented without repartitioning.
  • You can more easily remove it to gain space for files - while running. And easily recreate a different size.
  • As Live can not boot with LVM, this is the way to have swap encrypted without an extra key entry.

How to create a working swap file

Below you find subchapters per type of filesystem chosen for the persistence, now go there, then back here.

Verify swap is working

To see swap is active you can as root issue any of swapon , free -h , grep -i swap /proc/meminfo

Remove / change size of swap file

1. Remove it:

swapoff -a         // unmounts all swap
rm /swapfile       // for the ext4 and F2FS examples
rm /swap/swapfile  // for the Btrfs example

Keep mount points and fstab as is, for reuse whenever you want to create a new swap. The system will boot without swap file with no delay.

2. Create a new like you did before, the size you want. No need for new mount points or to edit fstab.

3. If you want to use it right away, as root swapon -av activates all configured and available swap.

More than one swap file

You may have more than one swap file, so you can quickly reduce total swap whenever needed without removing all swap: Create them like the first one but use a different name (i.e "swapfile2") and add one line to fstab similar to last one before. To activate/deactivate one of them any time issue swapon/swapoff with full path, i.e: swapon -av /mnt/mgalive-persist/memory/swapfile2 / swapon -av /swap/swapfile2 . swapon lists all active swap including path, size and current size in use.

Swap file on ext4 persistence

Create a swap file

$ su -
# dd if=/dev/zero of=/swapfile bs=1M count=1k  // For size=1GiB (1ki times 1MiB). (more reliable than fallocate)
# mkswap /swapfile       // Mark it as swap
# chmod 0600 /swapfile   // Protect it

Add it to fstab
Kernel can not use swap on loop device, so we must let fstab mount the persistence partition, and then the swap file in it. So create a mount point for the persistence partition, as root: mkdir /mnt/mgalive-persist.

/swapfile is in the persistence partitions filesystem addressed as /memory/swapfile. So full path will be /mnt/mgalive-persist/memory/swapfile.

UUID is the most reliable way to identify partitions. To see the UUID of your persistence partition, issue: blkid | grep "persist".

Edit your /etc/fstab per below - but use the UUID number from that blkid output! First line is original, keep it like this. Add the second line to mount the persistence directly as block device, and the third for the swap file.

none / overlay defaults 0 0
UUID=a0406603-49e3-4908-820d-65736dd55f24 /mnt/mgalive-persist ext4 defaults 0 0
/mnt/mgalive-persist/memory/swapfile none swap sw 0 0

See if it works

# mount -a     // Perform mounts per /etc/fstab
# swapon -av   // Activate swap, verbose
# swapon       // Displays current swap usage

Swap file on F2FS persistence

Like above for ext4, with 2 changes:

  1. After the dd command, execute chattr +C /swapfile Capital "C" = noCOW file mode
  2. In fstab, replace "ext4" with "f2fs"

Swap file on Btrfs persistence

Which block device carry our "mgalive -persist"?

$ blkid | grep persist
/dev/mapper/crypt_sda5: LABEL="mgalive-persist" UUID="85979785-4e84-4489-9d62-0a1bd9c0811f" UUID_SUB="6fb0761f-127e-45cb-85b6-b1bebab38ddf" BLOCK_SIZE="4096" TYPE="btrfs"

Create a subvolume "@swap" in mgalive-persist
Use the /dev/... mount point from that blkid output! (in this example it is encrypted, so /dev/mapper/crypt_sd..)

$ su - 
# mkdir /mnt/x
# mount /dev/mapper/crypt_sda5 /mnt/x
# btrfs sub create /mnt/x/@swap
# umount /mnt/x
# rmdir /mnt/x

Create the mount point, and mount the subvolume

# mkdir /swap
# mount -o subvol=@swap /dev/mapper/crypt_sda5 /swap

Create the swapfile

# touch /swap/swapfile
# chattr +C /swap/swapfile   // Capital "C" = noCOW file mode
# fallocate /swap/swapfile -l4g  // "4g" = 4 GiB
# mkswap /swap/swapfile          // Mark it swap,
# chmod 600 /swap/swapfile       // protect, and try to
# swapon /swap/swapfile -v       // use it now. Verbose. Any error?

Add two lines to /etc/fstab
Below is the content of fstab after this edit: first line is original, add the second to mount the subvolume, and the third for the swap file. Use the UUID number from that blkid output above.

none / overlay defaults 0 0
UUID=85979785-4e84-4489-9d62-0a1bd9c0811f /swap btrfs subvol=@swap 0 0           
/swap/swapfile none swap sw 0 0

Test before rebooting

# swapoff -a
# umount /swap
# mount -a                // Perform mounts per /etc/fstab
# lsattr /swap/swapfile   // Check attributes...
---------------C---- /swap/swapfile  // yes C is there.
# swapon -av              // Mount all available swap, verbose
# swapon                  // Displays current swap usage

Custom partitioning

Very seldom needed, but for special needs, you can configure partitions manually in many ways. Here is the game plan:

  • Mageia Live automatically use a partition labelled mgalive-persist as storage. It only looks for this partition on the device it boots on. It is tested with ext4, Btrfs, and F2FS filesystems. When created by IsoDumper, file system is ext4.
  • You can create any other partition you like, i.e a swap partition, and/or a partition formatted suitable for sharing space when the device is plugged into another operating system.
  • CAUTION: Make sure you do not set a UUID or partition label identical to something else on the running system, or any system it will be attached too or booted on, as that may confuse mounting and use of filesystems. See (*1) . (Exception: Always name persistent partition "mgalive-persist".)
  • For any LUKS encrypted partition, you will at boot be asked for the key for each. mgalive-persist can be encrypted.
  • LVM is not supported.
  • Prior to Mageia 8, encryption of mgalive-persist is not supported.
  • Never change anything concerning mgalive-persist while it is in use.

Create Live with custom persistence

  1. Choose ISO and storage device.
  2. Write the live ISO to the device using IsoDumper. Do not enable persistence.
  3. Use Mageia 8 (for Mageia 8 Live see (*1) ) for next step;
  4. Start Diskdrake: (*2) to create the persistence partition;
    • Size: Maybe leave empty space at end of the storage for Optional partitions).
    • Type: i.e ext4, Btrfs, or F2FS (*3)
    • Optional: select to encrypt, input (and memorise!) encryption key.
    • Important: Set the label to mgalive-persist. (For F2FS see Labelling F2FS)
    • CAUTION: When exiting Diskdrake, DO NOT let it save fstab (as it would then be manipolating the fstab on the running system).
  5. Exit Diskdrake. (*4)

(*1) About the running system

  • If you use another Live as tool, do NOT use one created from the same ISO as your target Custom Live - (Same UUID of partitions may confuse tools/kernel) . So i.e boot on Live Plasma to partition Live Xfce.

(*2) About partitioning

  • The suggested order of partitions makes it easier to extend the persistence partition if needed.
  • Use expert mode in Diskdrake (button down right) to be able to access more functions like labelling, and more file systems.
  • /!\ In this step if Diskdrake ask: say no to save changes to fstab - as that may render your running system unbootable!

(*3) Filesystem choice
ext4 is your choice if if you value reliability most: It is the most supported by both different *nix systems, and repair and recover tools, so the files can be accessed when plugged into another unix system, and to retrieve files if the filesystem breaks.
Btrfs is more optimised for flash storage than ext4 so works a bit faster and with less wear.
F2FS is even more optimised for flash, probably fastest and make leas wear, but is the most fragile and have least possibilities to repair. This is the one most in development. Warning: on-disk format have varied with kernel; Be restrictive about using this partition from another system: The data contained on F2FS partitions can become unusable if the kernel version on the running machine is older than the kernel version used to create the partition. (Thankfully retrieved from ArchWiki)

All three use journal for resilience. The many options to tweak them, and alternative filesystems are out of scope of this document, like the interesting snapshot functionality in Btrfs, and compression and encryption at file or folder level.

(*4) Do not exit if Live is Mageia 7.1 64 bit
Because there Diskdrake can not work on its own partitions. Instead, use the running Diskdrake for optionally creating swap and the sharing partitions too. Then skip to Optional partitions

First boot with persistence

This first time you choose language, accept license, select keyboard...

  1. Remove unneeded localisation (this also is to verify if your storage is fast), see Recipe for updated Live.
  2. Configure network, configure repositories, update the system.
  3. Reboot - it should now boot up to desktop no questions asked (except optional encryption key)

Optional partitions

Naturally, you must have reserved space for this when you created the persistence partition.

Perform these actions using Diskdrake on the booted Live system. Let Diskdrake save changes to fstab if it ask.

Exception: If this is Mageia 7.1 64 and you already have added partitions per *4 above, you now need to register them in fstab. Currently that is out of scope for this wiki page.

Quirk: Diskdrake fail to both create and format in the same session. So first create the partition(s) you desire, reboot, then again start diskdrake, again set type of the partitions, and format them.

Quirk2: Swap partition fail TODO Workaround: use swap file.

Swap partition

Swap is useful on computers with little RAM, or if you want to hibernate your live system.

A swap partition should be encrypted if anything else is. You will at boot be asked for key for each encrypted partition, so a tip is to use same keyword.

You probably find a swap file suits your need better than a partition.

Regardless of swap type, you may want to set low swappiness, which is out of scope for this article - do a web search.

Needless to say, you should use swap only on a fast and large enough storage device.

Partition for sharing files

Some other well known operating systems as well as other devices are unable to read ext4, Btrfs, F2FS, etc.

So you may want to have a partition formatted to share content with them? Then create an NTFS or FAT32 partition. Format it and label it suitably, i.e FAT32-share. Optionally select a mount point, i.e /media/FAT32-share. Default fstab options are OK: default,nofail,umask=000 0 0 (any user, skip if it have problem (accidentally deleted or whatever).

A booted Mageia 8 Live screenshot of Diskdrake and fdisk -l showing custom partitioning: a FAT32 partition in addition to the encrypted ext4 mgalive-persist.

Plugging it into other systems

  • There seem to be no problem using the added Microsoft style partitions.
  • Like Mageia, also other systems let users easily access the ESP partition, but don't alter things there!
  • /!\ Warning Some Microsoft Windows (R) versions pop up a dialog asking to format a disk, the "mgalive-persist", "to make it usable" - Don't!...

Alternative tools

You can also use dd, fdisk and mkfs. The usage is out of scope for this article, but an example is here. Be very careful as it i easy to make any mistake and destroy your running system!

Install your Live

You can install a copy of the Live system, with or without your changes, to a computer fixed storage or to another removable storage. You have full control over partitioning like if you used classic installer. If you want to remove or add packages, you do that when booted in the new system.

See Install to removable device, Live installer.

Boot options

The boot menu main items are described here.

Below we explain some more advanced options.

Also see how to enter kernel options.

Original kernel

If [F1] is shown, you can use it to toggle between booting the original kernel in the Live iso, or the updated one in persistence. (The text after [F1] toggles.)

Boot command line

You can change the kernel boot command line: Press e, use arrow keys to navigate into the line beginning with "$linux". It is a long line so usually two or more rows of text.

General examples

Remove the words splash quiet to see text output how booting proceeds.

For other options see How to set up kernel options. Some may help to solve graphics or other hardware problems.

Skip using persistence

When: Maybe some update made something not working on some computer so you want to try this Mageia Live ISO like it was before any updates. Or you want to backup or restore the persistence memory folder, or alter the mgalive-persist partition. Or you want to install to computer or another storage using Live installer without any changes you have made.

Even when booting without using persistence, the partition is available to mount so you can reach your files manually. The system will not start using persistence until next boot.

Two methods:

1) If your persistence partition is encrypted, simply press Ctrl-C at the key entry to skip unlocking and persistence will not be used.

2) Add mgalive.overlay=ram to the boot command line. This is a Mageia Live special, supported from Mageia 8 beta 2 onwards. If your persistence partition is encrypted, you will still be asked for the key, but persistence will not be used whether you skip that or not.

Tips

Running Live on weak computers

  • Using persistence save on RAM compared to using a ramdisk which otherwise is used.
  • Use swap to free more RAM - add a swap file or partition: Custom partitioning. A few hundred MB is enough unless you want to hibernate.
  • Use a lightweight desktop such as Xfce, or one of our even lighter desktops - IceWM is installed in all Lives already. Note that you can have several desktops installed and choose at each login which to use.
  • Use light weight programs. i.e Falkon for web browsing, and Gwenview for browsing-cropping-resizing photos. (Even Xfce by default use the heavy Firefox and Gimp, respectively)

Caution

Same ISO -> Identical UUIDs and labels

Naturally. But it do have complications:

Do not use two USB sticks created from the same ISO file in a system at the same time, as they will have identical root volume labels and UUIDs, and GRUB and the Linux kernel won't know which one to use. Take care when copying device contents.

Known problems

Reformatting (reusing) a Live system

Live ISOs are (hybrid) ISOs.

The ISO filesystem signature confuse many tools when you want to reformat a storage you have used for Live.

What works:

  • IsoDumper can format one partition, and then other tools can work if you need more.
  • Updated Diskdrake / Mageia 8 and later installer when you select "Clear all" to or use whole drive.
  • Command line tools, i.e use wipefs to wipe the iso9660 partition.

Graphics issues

May hinder booting. See Mageia 8 Errata.

Desktop specific issues

Gnome graphics and network, Cinnamon 32 bit Nemo, Xfce artifacts at login: See Mageia 8 Errata.

Updated Mageia 7 32 bit live fail booting

Fully updating a 32 bit Live persistent installation will make it fail booting. mga#27638

Workaround to boot: Use original kernel.

Booted up (or before rebooting after updating), you can perform the fixes below.

Fix Mageia 7 32 bit update boot problem

  1. Boot up with persistence working (by workaround above or before reboot after update)
  2. Open a console terminal to enter the following commands
  3. Become root user: su -
  4. Get the updated file: wget https://bugs.mageia.org/attachment.cgi?id=12009 -O mgalive-root.sh
  5. Make it executable: chmod +x mgalive-root.sh
  6. Put it in place: mv mgalive-root.sh /usr/lib/dracut/modules.d/90mgalive/ - confirm overwriting
  7. Before executing it, update the following line according to the latest kernel installed!
    dracut -f /boot/initrd-5.7.19-desktop586-3.mga7.img 5.7.19-desktop586-3.mga7

Timeout removing unused packages

On a slow device and ISO prior to Mageia 8 beta 2: mga#27580 urpmi killed by timeout while removing localisations - rpm database get irreparably broken.

Workarounds: Either of

  • Do not use a slow storage - if you hit this problem you would want to upgrade the storage anyway...
  • Update to the fixed drakxtools before using remove-unused-packages so it do not time out.
  • Do not use remove-unused-packages until after full update, or remove localisations manually a few at a time (tedious)!

To do in this document

Discussion and Documenting

Goal: This page is to fill the need in https://wiki.mageia.org/en/Docteam_Todo_list#Else_to_do_5 , point 4: persistent live ISO, pointing to forum topic [1], extending to [2], [3]

Note this is four closely related pages: When all content is revised, copy contents to make new final wiki pages - all four pages at once!

Use the following names:

I believe all internal links are set for that already.


- At that point also check the other points in Update below, if we can update something first.

When this page is moved and official

Update

Issue BR: xfce offer to hibernate, while technically impossible (too small swap, no kernel resume= parameter). How in other DE?

TEST 27860 below, and update in texts above, additional partitions !

Watch and verify when progressing

  • mga#27744 - IsoDumper development
  • mga#27860 - Diskdrake on Mageia 8b2 Live 32 bit is defect in comparison to 64 bit. Running on Live 32 bit, Diskdrake can not see other Live devices.
  • Also in that bug: it need be booted with working persistence in order to create and directly format a partition? (stil at 8final?) and can it then create swap?
  • mga#28165 - Diskdrake can not label F2FS. mkfs.f2fs can.

Testing Done

(Plus a lot not documented...)

Mga8 final

  • F2FS, encrypted, swapfile. Stick can be plugged out and in during suspend.

Mga8RC second internal

  • Swapfile on ext4 pers.
  • Persistence on Btrfs, with swapfile
  • Test OK install to other removable storage
  • The solution with added FAT32 and swap works great.

Mga 8b2

  • X86_64 encr pers OK: Xfce, Plasma, GNOME
  • i586 Test OK Xfce i586 Live with encrypted persistence on Thinkpad T43 and T400, Dell Precision M6300 and Dimension M4400. (round 1 was failing with any persistence, round 2 OK)
  • X86_64 on sloooow storage: timeout test removing locales: OK fixed.

Mga 8b1

  • Mga8b1 x86_64 xfce with and without encryption: reboot OK Thinkpad T400
  • Mga8b1 i586 persistence FAIL BOOT Thinkpad T43 - both encrypted and plain.

Mga7.1

  • x86_64:Updates without reboot problem OK (fast storage) Thinkpad T400
  • i586 reboot fail, workaround fix documented above.
  • i586 Btrfs persistence OK
  • On slow storage: remove-unused-packages get timeout 10min -> rpm database crash! Proactive workaround documented above.

Mga6.1

  • Mga6.1 x86_64 Xfce persistence: OK - including full update on Dell precision M4400. (Fail booting on Thinkpad T400 - probably something incompatible - fails before persistence is used.)
  • Mga6.1 i586 Live fail booting on Thinkpad T43 and T400, different failure on Dell Precision M6300 and Dimension M4400.

Testing To do

See also chapter Update

  • 32 bit: mga#28213 - Diskdrake fail formatting and labelling on booted Live
  • Can it create swap on itself, so fstab get updated?
  • Mageia 7 see and can partition some Live, some other live do not even display as tab. (while dolphin can use partitions) - Bug?
  • Mga8RC diskdrake see the base system on 32 bit ISO as "Hidden HPFS/NTFS", while for 64 bit ISOs it displays it is iso9660, and displays the name of the ISO on the partition.

Swap file, improve:

  • Hibernation - possible to craft kernel parameter resume=?

Procedure verifications

Solve, Describe

  • Problem appear when you plug in a persistent live into a running system and want to read or write user files: users that have changed their UID and GID from default (Like I always do, so family members all have different) can not access it (Live user UID is 1000)

Author

  • Speedier boot on same machine: Hibernate using swap, skip hardware detection? systemctl mask mandriva-everytime.service, filessystem compression parameters