Page 1 of 1

Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Thu Feb 07, 2019 2:57 pm
by leo-tech
Booted from Mint 19.1 USB Flash (Live CD), used Gparted: I re-sized the main partition on 512GB NVMe disk (477G after formatting etc) and created 2 additional partitions (nvme0n1p3 and nvme0n1p4, 40GB each) for testing various Linux distros on physical hardware and in full speed.

leo@leo-NUC7i7DNHE:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1,8T 0 disk
└─sda1 8:1 0 1,8T 0 part /disk2
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
├─nvme0n1p2 259:2 0 395,5G 0 part /
├─nvme0n1p3 259:3 0 40,5G 0 part /media/leo/rootMX18
└─nvme0n1p4 259:4 0 40,5G 0 part /media/leo/fee24aea-432e-4852-a750-b711ed43068b


Obviously I was wrong skipping proper mounting of the new partitions to the system and jumping to MX Linux installation on nvme0n1p3 (which I had to interrupt midway), so I will have to do it properly first and then go back to MX Linux installation.

More to follow soon.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do it properly

Posted: Thu Feb 07, 2019 3:10 pm
by philotux
You won't be needing to mount them anywhere in your current system to be able to install another OS onto those partitions.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do it properly

Posted: Thu Feb 07, 2019 3:19 pm
by leo-tech
philotux wrote:
Thu Feb 07, 2019 3:10 pm
You won't be needing to mount them anywhere in your current system to be able to install another OS onto those partitions.
That was precisely where I got confused, when MX Linux installation came to this point:

MX Linux
Select boot method
Install on: MBR -or- root -or- ESP
System boot disk: nvme0n1 477G... -or- sda 1.8T...

(I was not sure which Install on option to choose, whether or not I see here all available partition choices, with "not damaging subsequent multi-boot" in mind)

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do it properly

Posted: Thu Feb 07, 2019 3:28 pm
by philotux
leo-tech wrote:
Thu Feb 07, 2019 3:19 pm
Select boot method
Install on: MBR -or- root -or- ESP
System boot disk: nvme0n1 477G... -or- sda 1.8T...
Since this a UEFI mode install, if I remember correctly, the mx-installer will default to ESP as the location for the installation of the bootloader. That would be nvme0n1p1. But note that in that case MX 's Grub will be the one controlling the boot process.

Again If I remember correctly you could skip that step and install MX without a bootloader. Then when the installation is finished, you would need to reboot back into Mint and run

Code: Select all

sudo update-grub
so that your MX installation will be captured by Mint's Grub.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 9:53 am
by leo-tech
Thank you philotux, one more question please:

in MX Linux installation, step 4. Select boot method (no there is no option to skip this step, or at least I cannot see one) - there is Install GRUB for Linux and Windows option (tick in a box).

Say I decided to never ever entrust direct control of the hardware to Windows, then I guess I'll be OK with choosing NOT to Install GRUB for Linux and Windows (removing tick from that box), so then various Linux distros will agree between themselves on sharing GRUB in harmony? - or I still need to check that box for proper Linux-Linux multi-boot?

There is some related help info in that window on the left hand side:

Select Boot Method

MX Linux uses the GRUB bootloader to boot MX Linux and MS-Windows.

By default GRUB2 is installed in the Master Boot Record or ESP (EFI System Partition for 64-bit UEFI boot systems) of your boot drive and replaces the boot loader you were using before. This is normal.

If you choose to install GRUB2 at root instead, then GRUB2 will be installed at the beginning of the root partition. This option is for experts only.

If you uncheck the Install GRUB box, GRUB will not be installed at this time. This option is for experts only.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 11:36 am
by leo-tech
Installed with default option (with tick in the box and ESP), everything seems ok (Mint 19.1 is present in the boot menu).

What's next, now if I boot Mint 19.1 and use sudo update-grub, it will reverse the boot order, i.e. Mint will go to the first place, and MX Linux will go to second place? (not counting some other boot options)

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 11:57 am
by leo-tech
...now if I boot Mint 19.1 and use sudo update-grub, it will reverse the boot order, i.e. Mint will go to the first place, and MX Linux will go to second place (not counting some other boot options)
I booted Mint and tried sudo update-grub and it did not work the way it was supposed to, so as of this moment MX Linux retains control over GRUB/boot order. What else I can do to reverse this? (the boot order is not terribly important, I'm just learning, at the same time trying not to damage Mint which is my main system).

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 12:13 pm
by philotux
leo-tech wrote:
Sun Feb 10, 2019 9:53 am
... then I guess I'll be OK with choosing NOT to Install GRUB for Linux and Windows (removing tick from that box)...
leo-tech wrote:
Sun Feb 10, 2019 9:53 am
Select Boot Method

MX Linux uses the GRUB bootloader to boot MX Linux and MS-Windows.

By default GRUB2 is installed in the Master Boot Record or ESP (EFI System Partition for 64-bit UEFI boot systems) of your boot drive and replaces the boot loader you were using before. This is normal.

If you choose to install GRUB2 at root instead, then GRUB2 will be installed at the beginning of the root partition. This option is for experts only.

If you uncheck the Install GRUB box, GRUB will not be installed at this time. This option is for experts only.
Since Mint being your main system, I suppose that you wanted it to be in control of the grub. Then I would have chosen this option for not installing Grub for MX, letting the installation finish and then booting into Mint and running sudo update-grub from there.

Now I think you could go into the Bios settings, navigate to the section for boot options ( in my bios it is called Startup options ), change the boot order and put Ubuntu first and reboot to get to Mint's Grub. Boot into Mint and run the grub update command.
(You can enter settings from the MX' Grub menu)

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 1:21 pm
by leo-tech
In BIOS - UEFI Boot Prority - Boot Drive Order I only have one entry UEFI : MX18 : PART 0 : OS Bootloader (nothing else, nothing for Mint)

I guess I can use Timeshift in reverse, even though I'm not sure if I have the latest snapshot (I checked and it's 5 days back, no radical changes to the system in the last days, except re-partitioning NVMe disk and installing MX Linux in one of the created partitions) - but it would more interesting for me to fix it without Timeshift, i.e. to re-write GRUB record to restore the initial Mint control, assuming it is possible without re-installing Mint.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 1:39 pm
by philotux
If it doesn't bother you to boot into Mint via MX' grub menu, I would leave it as is. But if you want to reinstall Mint's bootloader you will find instructions from @Pjotrs blog on how to do so here: https://easylinuxtipsproject.blogspot.c ... epair.html

Please read the instructions carefully and adapt the commands to your situation.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 1:45 pm
by leo-tech
If it doesn't bother you to boot into Mint via MX' grub menu, I would leave it as is...
Thank you, I will probably do just that, for the time being ... however, at some point I intend to replace MX Linux with some other distro for testing, then what would be the best strategy, is there something that can be done about the same issue during the other distro installation? (to re-phrase, in what way I can at least keep it as it is, without making more silly mistakes, I would need to replace MX Linux GRUB with that other distro GRUB?).

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Sun Feb 10, 2019 1:56 pm
by philotux
If you remove MX then you will have to restore Mint's bootloader. Then if you want Mint to be in control of the booting process, then I should think the best option would be to find out how to install the other distro without a bootloader. Like you actually could have done with MX.

Mint uses ubiquity as it's installer. It comes from Ubuntu. So if a distro uses the same installer, you could always start it in the live environment from the terminal with the command ubiquity -b. Like this it will not install any bootloader. Then you will boot into Mint and simply run a grub update for Min'ts grub to capture the new install and put an entry for it in the boot menu.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Mon Feb 11, 2019 9:29 am
by leo-tech
What is supposed to happen if I use the Timeshift for restoration now - i.e. can I expect it to restore the initial Mint control over GRUB/boot properly? (this may, or may not be related: the last snapshot was created prior to me re-sizing the main partition and creating two smaller ones for testing). I don't mind re-installing Mint from scratch, but also it is interesting if Timeshift can handle precisely this situation.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Mon Feb 11, 2019 9:34 am
by philotux
You could try that. There is a setting for reinstalling grub as well. I think it is toggled on by default but you can check that yourself to make sure. Hope that it will resolve the issue.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Mon Feb 11, 2019 9:36 am
by leo-tech
philotux wrote:
Mon Feb 11, 2019 9:34 am
You could try that. There is a setting for reinstalling grub as well. I think it is toggled on by default but you can check that yourself to make sure. Hope that it will resolve the issue.
The way I see it, it's not the issue per se, more like a great fun! :D

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Mon Feb 11, 2019 9:41 am
by philotux
leo-tech wrote:
Mon Feb 11, 2019 9:36 am
The way I see it, it's not an issue per se, more like a great fun! :D
That's the spirit! I'm glad to hear that.
Anyways, I don't think that it's an unresolvable issue.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Mon Feb 11, 2019 9:49 am
by philotux
leo-tech wrote:
Mon Feb 11, 2019 9:29 am
What is supposed to happen if I use the Timeshift for restoration now - i.e. can I expect it to restore the initial Mint control over GRUB/boot properly?
When restoring the snapshot, under "Bootloader Options (Advanced) you will find the settings related to the installation of the Grub. Make sure you choose the right partition for it's installation in the drop-down menu.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Tue Feb 12, 2019 4:00 am
by leo-tech
Maybe I need to post it under "Mint ideas and suggestions" - I guess it would make sense to add Boot Order Management in some form to Administration menu, similar to boot order selector on macOS system preferences (like a GUI utility capable of detecting bootable drives in the system and allowing users to change the boot order).

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Tue Feb 12, 2019 4:47 am
by philotux
Sounds like a good idea. I would certainly use it.

Re: Resizing partition, creating 2 additional small partitions for testing, learning to do multi-boot properly

Posted: Thu Mar 21, 2019 11:28 am
by hcentaur13
It is simple:

in UEFI install the installer will install grub in /efi/ubuntu for pass 1 that presents any bootable system AND in /boot/grub to boot up the in pass1 selected installed system.

Mint installs itself as ubuntu because it uses the secure key in UEFI to get secure install working. So only 1 mint or ubuntu can be installed! The last install overwrites any prior UEFI boot manager.

In launchpad.net you'll find a tools named rEfind that is able to UEFI-boot while the UEFI mootmenue is defective. That will boot any installed operating system by its bootmanager. Then you can use the bootmanager of the booted system to get the UEFI bootmanager repair itself.

Windows likes to destroy the bootentry of linux. rEfind gives the choice to boot the installed linux and you would use h terminal
sudo grub-install
followed by
sudo update-grub

man efibootmgr tells you the help about linux EFI bootmgr.