[SOLVED] Damaged my other Linux OS using Mint installer

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

[SOLVED] Damaged my other Linux OS using Mint installer

Post by sanmig »

This is part 2 of my attempt to install Mint.

My system was: i5, 8GB, NVIDIA (GTX 750), BIOS boot,
sda: SSD 500GB (dos, PCLOS on sda1 ext2, sda2 extended, sda5 swap, sda6 ext4 data, 200GB free space),
sdb: HDD 1TB (sdb1 500GB ext4, sdb2 160GB ext2 copy of PCLOS, 300GB free space).

Because I (n00b) wanted to use my SSD (sda) for PCLOS and Mint, not the HDD (sdb), I've opted for "Something else" at the installer.
From the official guide I saw "Linux Mint requires one partition to be mounted on the root directory".
But till now I did not find whether setting up Mint requires a swap partition or not or even can't handle it.

I don't like swap, but traditionally (being back in time ...) I set up sda7 20GB ext4 for system, sda8 4GB swap and sda9 80GB ext4 user home space.

Both ext4 had a check to format the partition, the swap had not (could not even be set, what I found strange).
But by continuing ("Install now") I was informed that also both the swaps, from PCLOS (sda5) and Mint (sda8), would be formatted.

I freaked out.
Searching did not give much info re formatting swap and the consequences, only my nose ... Anyway, I had no chance to un-tick / prevent the formatting of my PCLOS swap (sda5), so I proceeded.

Q1: Why would the installer format anything when there is no checkbox set in the detail window (sda5, sda8)? I see this as an error.

Q2: Why touch a partition I did not set up during install (sda5)?

Q3: Did I miss the chance to prevent sda5 from formatting?

But now it gets complicated, because I understand less than I write:
PCLOS on sda1 is ext2.
The extended partition sda2 had the PCLOS swap (sda5) and an ext4 partition (sda6).
The Mint installer added sda7 (ext4), 8 (swap) and 9 (ext4).

Q4: Is it generally a problem to have two swaps in one (extended) partition?

Q5: Will Mint use both swaps now?

Q6: Is there a difference in a swap with and w/o systemd, GParted doesn't seem to make a difference.

Q7: On cold booting Linux, why is there a problem when the swap is empty? What is the purpose of swap at boot? Isn't it used "just in case" during running?

My next (set of) questions (sorry) will be dedicated to repair booting PCLOS / GRUB. I hope to understand a bit more in the meantime before I'm going to sudo update-grub.
The preferred solution would be to have the PCLOS grub with the option for Mint.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

In that long post I didn't really anything describing your actual problem but I'll take a wild guess saying you'll need to update etc/fstab on the PCLOS root partition with the possibly changed UUID of the sda5 swap partition.

This will tell you the UUID:

Code: Select all

lsblk -f
If not the UUID it could be the LABEL. Depends how the fstab entry looks.

MInt is probably configured to use both swaps now, yes. You had the option not to do that, yes, but you can still change it now (e.g. Disks tool > select the swap partition > cogs icon > edit mount options > uncheck to mount at startup).
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

gm10 wrote: Fri Dec 07, 2018 7:33 pm In that long post I didn't really anything describing your actual problem but I'll take a wild guess saying you'll need to update etc/fstab on the PCLOS root partition with the possibly changed UUID of the sda5 swap partition.

This will tell you the UUID:

Code: Select all

lsblk -f
If not the UUID it could be the LABEL. Depends how the fstab entry looks.

MInt is probably configured to use both swaps now, yes. You had the option not to do that, yes, but you can still change it now (e.g. Disks tool > select the swap partition > cogs icon > edit mount options > uncheck to mount at startup).
Thanks for pointing at the solution (etc/fstab, UUID).

My problem is the installer claiming a partition which has nothing to do with Mint,
+ not showing that in the format column.

Where did I miss the option not to do that?
Again thanks for the solution using Disk Tools.
But you know I want the why and how to prevent that for the next n00b ...
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Damaged my other Linux OS using Mint installer

Post by fabien85 »

Described like this, it looks like a bug in the installer, but I would need to check to be sure.
Anyway Mint 19 (like Ubuntu 18.04) now uses by default a swapfile instead of a swap partition. So "how to prevent that for the next n00b" is to not set up any swap partition at all.
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

sanmig wrote: Fri Dec 07, 2018 8:17 pm My problem is the installer claiming a partition which has nothing to do with Mint,
+ not showing that in the format column.
It's not about formatting, it's about mounting. You would have needed to tell it not to use that partition, or unmount it before you even launched the installer. The Something else... mode leaves the responsibility to you.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

fabien85 wrote: Sat Dec 08, 2018 9:49 am Described like this, it looks like a bug in the installer, but I would need to check to be sure.
Anyway Mint 19 (like Ubuntu 18.04) now uses by default a swapfile instead of a swap partition. So "how to prevent that for the next n00b" is to not set up any swap partition at all.
... by default a swap file: Good news, thank you!
I don't like the extra partition, it is difficult to understand for a newbie coming from a modern OS why that would be necessary, either you have space on the partition or you are out of space.
No swap partition is really a great improvement, hurray!

- The only issue here: The install docs.
What about adding the words "... but does not require a swap"?

- Best: The installer not to suggest / allow but warn if one tries ...
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

gm10 wrote: Sat Dec 08, 2018 9:55 am It's not about formatting, it's about mounting.
Strange, it claims it will format it:
Image
But I trust your "mounting" because I have unsuccessfully tried to get / understand some info regarding a swap format difference Mint - PCLOS.
gm10 wrote: Sat Dec 08, 2018 9:55 am You would have needed to tell it not to use that partition, or unmount it before you even launched the installer. The Something else... mode leaves the responsibility to you.
(1) Where could I have "tell it not to use that partition"? I was using the installer.

(2) Where to unmount it, I've started from USB-live and selected the installer from the desktop icon, I did not know that (if ???) the swap from the other OS was mounted.

(3) I wouldn't have gone the "your responsibility" way if the installer would have been able to use the sda - SSD. See viewtopic.php?f=46&t=283063 - So don't blame the user.

Um, having issues with images, the URL seems to work?
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

As your screenshot shows, you are properly getting informed about what's about to happen. You could now go back, right click the partition you do not want to use and choose exactly that option from the dropdown.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

gm10 wrote: Sat Dec 08, 2018 7:39 pm As your screenshot shows, you are properly getting informed about what's about to happen. You could now go back, right click the partition you do not want to use and choose exactly that option from the dropdown.
Right, I've seen it, but many will not (or not think of possible consequences).
Right, I've tried now, but that's scary:
- I did not tell the installer (I'm responsible) to touch sda5 in any way. Don't!

On the contrary, I set sda7, sda8 and sda9 to my preferences - that's what I want the installer to do.

To go to sda5 (PCLOS) and "Change..." the "Use as swap area" to "do not use the partition" would need a clairvoyant - and a very brave n00b:
I want it a swap, but not for Mint.

Re UUID in fstab:
/etc/fstab on sda1(PCLOS) the UUID seems to be OK, so that's not the cause?
Image
/etc/fstab on sda7 (Mint) seems to use both swaps.
Image

Not that I want to keep it like that, but shouldn't that work anyway as I only run one or the other OS?
(I confess I didn't write how PCLOS fails to start, but I'm SLOW and want to understand the why, neither the "try this or that" nor the "shoot and forget" solution).

Re Disks tool:
I did not grasp how to select the swap on sda, it says partition 2 is 0.0 KB and unknown?
But I still have 333 GB free space, - love it (but not the Disks tool?).
Image
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

Additionally,
when booting from .iso (USB), GParted reports /dev/sda2 as "Busy", both swap partitions (sda5 and sda8) as "Active", each marked by a key icon.

Does it mean the live system also mounts all existing swap partitions?
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

sanmig wrote: Sat Dec 15, 2018 7:16 pm Does it mean the live system also mounts all existing swap partitions?
Yes, and that's why the installer does. If you unmount them before installation it should not use them.
Last edited by gm10 on Sat Dec 15, 2018 7:31 pm, edited 1 time in total.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

OK, but as I've asked before, is it any problem when PCLOS and Mint use the same swap, I mean one after the other?
So this double use is by "intention" but would not be part of the PCLOS booting issue?
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

sanmig wrote: Sat Dec 15, 2018 7:28 pm OK, but as I've asked before, is it any problem when PCLOS and Mint use the same swap, I mean one after the other?
Unless you hibernate one of them into that swap then no.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

Sorry for insisting, I don't know if PCLOS could hibernate, I always used shut down.
I guess a hibernate issue would boot into CLI?

So the PCLOS boot issue likely is not from Mint's using the PCLOS swap?
User avatar
Joe2Shoe
Level 5
Level 5
Posts: 850
Joined: Wed Oct 18, 2017 8:12 pm
Location: Ozone

Re: Damaged my other Linux OS using Mint installer

Post by Joe2Shoe »

I always boot from a Live LM USB for fresh installations. Then I immediately use Gparted to partition the disk with /swap / /boot /home
/Data partitions.
Then when you install, adjust anything on the disk using the LM installer using "Something else".
Don't know if this helps you, but good luck.
"Tolerance is the refuge of men without conviction."
"Common sense is not so common" - Voltaire
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

sanmig wrote: Sat Dec 15, 2018 7:52 pm Sorry for insisting, I don't know if PCLOS could hibernate, I always used shut down.
I guess a hibernate issue would boot into CLI?

So the PCLOS boot issue likely is not from Mint's using the PCLOS swap?
Not from using it, no. It could have modified it but you already checked that it's referenced by UUID in PCLOS and that the UUID didn't change, so that's not it.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

gm10 wrote: Sat Dec 15, 2018 8:14 pm
sanmig wrote: Sat Dec 15, 2018 7:52 pm Sorry for insisting, I don't know if PCLOS could hibernate, I always used shut down.
I guess a hibernate issue would boot into CLI?

So the PCLOS boot issue likely is not from Mint's using the PCLOS swap?
Not from using it, no. It could have modified it but you already checked that it's referenced by UUID in PCLOS and that the UUID didn't change, so that's not it.
Sounds good, thanks.

But I'm still chewing on Mint-live system accessing any swap it can find on the drives. It goes undetected because it is not visible in file manager.

- In low RAM that means the live system will write to disk?
And the installer will use the wrong swap because it's already mounted?
I think silently accessing any disk, swap or not, should be a no go for a live system.
- Who would be responsible to check that point?

Re my PCLOS boot issue:
As I wrote in the other thread, the boot seems to hang before fstab ist used. All nonsense in fstab doesn't change the boot messages on the screen.

My next guess would be a GRUB issue (... I often start from wrong assumptions).
- Should I start another thread for the boot problem?
May it depend on systemd-free PCLOS needing a different start info than e.g. Mint would need?
How to inform GRUB to use a different grub.config from a different partition to start PCLOS?

When I update-grub may the issue vanish? Which files will be touched, so I could copy them first, is it grub.cfg (on Mint) only?

! In my Mint grub.cfg at the PCLOS section there is a line "resume=UUID514aabla..." but no such drive / partition is mentioned in Mint lsblk -f ?

Too many questions, guess I have to read more.

And:
What about the "Disks" tool reporting wrong values / drive data (only when running from live system, not from installed system), see my last screenshot above?
It shows 300GB free, an unknown fs, but there is Mint installed and only 100GB remaining?
- I guess you don't use Disks, but is there anybody out there ...?
gm10

Re: Damaged my other Linux OS using Mint installer

Post by gm10 »

I don't understand your problem with using swap. It's not a data partition, so why would you care?

I don't know what's wrong with your disk and/or the Disks tool. Are those encrypted partitions? assuming the installer has the same issue I suppose that explains why you don't get to choose disks as per your other thread.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: Damaged my other Linux OS using Mint installer

Post by sanmig »

gm10 wrote: Sun Dec 16, 2018 8:38 pm PS: This might be your issue: https://github.com/storaged-project/udisks/issues/425
Um, I don't understand what they're talking about ... :cry:

Re swap:
When I try the Mint live system on a friend's computer, just to see if it would work and be accepted, I do not want it to damage the existing OS or leave any trace on the other computer.
This is the purpose of a live system:
Check if the system works, back up data if possible,
BUT do not write ANYTHING to the disks. The user is the master, he decides.
This is why disks / partitions are not automatically mounted.

Disks tool:
No, not encrypted, also the Installer's "Something else" partition manager has all details and corresponds to GParted.
- BUT: It is not only from live system.
And it depends ...

How to:
Boot Tara, log in.
Click Accessories-Disks: Shows everything OK, all partitions are there!
Close Disks tool.
Click Administration-GParted, pwd: Everything OK. Leave it open.
Click Accessories-Disks: Does not recognize partition 2.
Close programs.
Click Accessories-Disks: Does not recognize partition 2.

Strange.
Locked

Return to “Installation & Boot”