Page 1 of 1

[SOLVED] install Mageia preserving old users data at /home?

PostPosted: Mar 13th, '19, 03:19
by adhefe
Looking for information on how to install Mageia over an existing linux installation without loosing users data at /home. I've googled around and search in this forum and couldn't find.

I have partitions as:

1-SSD with the system (/) and swap;
2-SSHD with /home.

Mageia installer, even marking "using existing partitions", warns that all data will be lost if I go on.
Thus, if I did not simply misunderstood installer messages, how to preserve users data at /home and how to configure users after installation so that their old data are available exactly where they used to find it?

Thanks

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 13th, '19, 05:07
by benmc
Are you using the Live Installer or Classic Installer?

you should choose "Custom Disk partitioning".
then after choosing your mount points /, and /home, and press continue (or next / ok) you are offered the option to format the partitions.
because you have more than 1 drive, you will need to toggle the drive options (top right) to choose your partitions.
usually / is set for format with a check mark, and /home has no check mark.
how-ever, if you are installing over a non-Mageia system, the installer may choose to offer to format /home.
just make sure it is unchecked and you should be good to go.

Nearly forgot. you have backed up /home before you started?

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 13th, '19, 18:56
by adhefe
Thanks for the tips!
I've tried installation but since the old distro had a btrfs partition and the Mageia 7 beta2 installer seems not to support it I had to stop to think what is the best option:

1 - Mageia 6.1 installer does support btrfs? If so, is it better to install mageia 6.1 and then update to mageia 7 beta2?
2 - Is it better to change from btrfs to another (XFS, Ext-4) ?
3 - Is it recommended to wait until the mageia 7 final is released (because it is supposed to support btrfs)?

Thanks

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 13th, '19, 18:59
by adhefe
benmc,

"Are you using the Live Installer or Classic Installer?"

I've tried both, none have support to btrfs.

Thanks again

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 13th, '19, 21:25
by benmc
under the "custom disk partitioning", choose expert mode.
this will allow you to choose any supported file system.

I have just created and run up a virtual box and installed with 13GB /(btrfs), /swap, /home(ext4), /mnt/windows(ntfs) with no issues from plasma-Beta-2.

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 13th, '19, 23:10
by martinw
It sounds like the installer is failing to correctly identify the btrfs partitions created by your old distro.

As a test, I created a two-disk virtual system in VirtualBox, and installed Mageia from the Mageia-7-beta2-x86_64 ISO with a 16GB btrfs root partition and 4GB swap partition on the first disk, and a 10GB btrfs /home partition on the second disk. I then reran the installer and selected "use existing partitions". "Next" took me to a screen asking me to "Choose the mount points" (and automatically proposed the correct mount points). "Next" then took me to a screen asking me to "Choose the partitions to format" (and automatically proposed to format the old root partition and not to format the old /home partition, keeping btrfs on both). At no point did it warn me I was going to lose all my data.

If you would like to explore why this isn't working for you, please rerun the installer, select "use existing partitions", and proceed until it warns you about losing your existing data. Then press Ctrl-Alt-F2, which should take you to a command line prompt. Plug in a formatted USB memory stick (FAT formatted will do) and enter the command "bug" at the command prompt. That should write a file named "report.bug" to the USB stick. Compress that file (xz compression is best) and attach it here, and we can look at what the installer thinks it's doing!

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 14th, '19, 02:51
by adhefe
I believe I've made a working installation following benmc tips. However, the system doesn't go to the graphical mode. Following Isadora's recommendation I'm opening another topic

viewtopic.php?f=15&t=12691

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 14th, '19, 10:57
by martinw
No worries. It would have been nice to know why "using existing partitions" didn't work for you, in case there was a bug in the installer that could be fixed, but the main thing is you are making progress :-)

Please mark this topic solved by editing your original post and adding "{SOLVED]" at the start of the Subject line.

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 14th, '19, 15:54
by adhefe
In fact, the option "using existing partitions" probably would work to me too. The point is that I'm very new with the mageia's installation program and did not do this with the required attention...

For example, I've seen my btrfs partition signed as "other" (not XFS, Windows, EXT, etc...) and thought it was not supported. The option "see" would give me that the partition was recognized as btrfs ...

Sorry for generating noise in this discussion!

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 14th, '19, 16:00
by doktor5000
martinw wrote:No worries. It would have been nice to know why "using existing partitions" didn't work for you, in case there was a bug in the installer that could be fixed, but the main thing is you are making progress :-)

I believe this might be because some other distros use btrfs subvolumes for most folders under /, see e.g. https://en.opensuse.org/SDB:BTRFS#Default_Subvolumes

@adhefe: Would be good to know what distro you were using beforehand, or what was your existing linux installation, that would be helpful.

Re: how to install Mageia preserving old users data at /home

PostPosted: Mar 14th, '19, 16:06
by adhefe
I failed to mark this as SOLVED because it seems the subject line is limited to few characters. Is it true?

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 14th, '19, 16:23
by doktor5000
Yes, the length of the subject line is pretty limited, I've adjusted it accordingly ;)

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 14th, '19, 20:16
by benmc
martinw wrote:It sounds like the installer is failing to correctly identify the btrfs partitions created by your old distro.


after a few experiments in VB, I did manage to get the installer to fail formatting the btrfs file system.
in fact, when I made it fail, it would fail with any file system.

it appears that if you change your mind during the partition stage but before formatting the partitions and cancel the install, then start again, it will fail .
it is better to logout of the live system, and then log back in and start again from there.

do you want a bug report on that Martin?

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 15th, '19, 03:12
by adhefe
@doktor5000,

What do you mean by "linux installation"?

Just in case, I have an installation pretty much like it is now:

1-SSD (480GB) with a 300MB /boot/efi EFI System Partition FAT32 plus a BTRFS partition with the root /
2-SSHD (1TB) with a EXT4 partition for /home
I also have a intel optane device with 16GB I formatted for SWAP.

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 15th, '19, 03:24
by benmc
Hi,

from your first post:
adhefe wrote:Looking for information on how to install Mageia over an existing linux installation without loosing users data at /home.


then:
adhefe wrote:@doktor5000,

What do you mean by "linux installation"?
.

I think he wants to know which linux distribution had you previously used.

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 15th, '19, 10:55
by martinw
benmc wrote:it appears that if you change your mind during the partition stage but before formatting the partitions and cancel the install, then start again, it will fail .
it is better to logout of the live system, and then log back in and start again from there.

do you want a bug report on that Martin?


I've also noticed problems if you cancel part way through an install (but only with the live installer, not the classical installer). If you create a bug report, that'll remind me to look into it.

Re: [SOLVED] install Mageia preserving old users data at /ho

PostPosted: Mar 16th, '19, 01:30
by benmc
see here:

https://bugs.mageia.org/show_bug.cgi?id=24518
(Live install (from desktop) if cancelled after partition info is written to disk, will fail to format partitions if rerun )