XPS15 Manjaro Deepin boot problems

I initially shrunk down the factory installed Windows 10 partition and installed Ubuntu 16.04 via existing EUFI Fat32 boot partition. I did this because at the time this was the only distro that had a full walk-thru for supporting all my hardware. I then installed Manjaro Deepin as well on a separate partition and was able to boot into it however it broke the Ubuntu boot capability. I could still boot W10 but I really don’t use it…I just didn’t want to blow out that license in case I ever needed it, 40GB out of 512, no biggie.

I tried repairing the Ubuntu boot from within Manajro but read somewhere that the boot-repair utility should be able to auto detect and fix the problem. Ok saves me time, I’m in. It sounded almost too good to be true and even the results looked promising…

nvme0n1p1 contains Windows Boot (windows)
nvme0n1p10 contains Manjaro Linux (linux)
nvme0n1p9 contains Ubuntu 16.04.1 LTS (linux)

1 disks with OS, 3 OS : 2 Linux, 0 MacOS, 1 Windows, 0 unknown type OS.

I did this by booting a Ubuntu live USB and ran boot-repair which did fix the Ubuntu boot as long as I choose Advanced boot options and key down to 4.4.0.53 kernel but anything else results in panic.

Additionally all of the Manjaro options result in the same error I had trying to boot into Ubuntu previously after installing Manjaro, something about blocklist error (hd, 0,0)

I fix one but break the other. Any help is greatly appreciated.

Use that Ubuntu’s grub and go into its grub prompt, follow up from here and when booted up at Manjaro terminal,

sudo grub-install
sudo update-grub

Thank you, I was able to boot into Manjaro again but the following commands:

sudo grub-install
sudo grub-install /dev/nvme0n1

both resulted in:

Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

What I am working with:

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  525MB   524MB   fat32           EFI system partition          boot, esp
 2      525MB   660MB   134MB                   Microsoft reserved partition  msftres
 3      660MB   67.0GB  66.4GB  ntfs            Basic data partition          msftdata
10      67.0GB  289GB   222GB   ext4
 7      289GB   289GB   150MB   ext4
 9      289GB   490GB   201GB   ext4
 8      490GB   498GB   8000MB  linux-swap(v1)
 4      498GB   498GB   472MB   ntfs                                          hidden, diag
 5      498GB   511GB   12.5GB  ntfs                                          hidden, diag
 6      511GB   512GB   1158MB  ntfs                                          hidden, diag

Oh and my /boot partition is 7, 150MB and is full. I tried using gparted to increase it but no luck. I then ran in Ubuntu:

sudo apt-get autoremove
sudo apt-get --purge autoremove

But it failed cleaning up any space complaining about missing libraries.

Edit: In Manjaro running gparted it allows me to resize partition 7 /boot but I get the following warning:

You have queued an operation to move the start sector of partition /dev/nvme0n1p7.  Failure to boot is most likely to occur if you move the GNU/Linux partition containing /boot, or if you move the Windows system partition C:.
You can learn how to repair the boot configuration in the GParted FAQ.
http://gparted.org/faq.php

Moving a partition might take a very long time to apply.

Ah… you did not install Manjaro as uefi then.
(It shouldn’t happen and installer should not let it happen but it did).

I assume it is gpt disk (should be)
Then you have to do these things…
Wait for my next post. You’re getting ahead of me.
show fdisk -l it should show gpt (must be sure)

sudo fdisk -l

Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 626067D6-7450-458E-A415-44251CBF2BC3

Device              Start        End   Sectors   Size Type
/dev/nvme0n1p1       2048    1026047   1024000   500M EFI System
/dev/nvme0n1p2    1026048    1288191    262144   128M Microsoft reserved
/dev/nvme0n1p3    1288192  130938879 129650688  61.8G Microsoft basic data
/dev/nvme0n1p4  972666880  973588479    921600   450M Windows recovery environment
/dev/nvme0n1p5  973588480  997953535  24365056  11.6G Windows recovery environment
/dev/nvme0n1p6  997953536 1000214527   2260992   1.1G Windows recovery environment
/dev/nvme0n1p7  565114880  565407743    292864   143M Linux filesystem
/dev/nvme0n1p8  957042688  972666879  15624192   7.5G Linux swap
/dev/nvme0n1p9  565407744  957042687 391634944 186.8G Linux filesystem
/dev/nvme0n1p10 130938880  564807679 433868800 206.9G Linux filesystem

Partition table entries are not in disk order.

You have a separate /boot for Ubuntu and it’s full?
Then check what kernels you have (you must have 3 or more then for 150 MB to be full - please don’t use that /boot for Manjaro - just mount that sda1 as /boot/efi and do not format it at installation).

To remove extra kernels at Ubuntu,

sudo apt-get remove --purge 4.8.0-xx-*

where xx is a number and your kernel - must put in asterisk * (not a number) to remove everything

Manjaro will come in next, but at this point, recommend reinstalling, it is quited messed up with bios-legacy install and gpt disk and no fstab and no /booot/efi, probably /boot in esp and shouldn’t do that.

Stop using boot repair and do not resize using gparted now
It will mess things further.

/boot needs 500MB (sometimes more) and /boot/efi just need 100 MB.
And don’t recommend separate /boot in any situation (yeah, many people use it but I don’t want to discuss it)

Yes I see:

4.4.0.31 - seem like possibly partial
4.4.0.53 - this boots Ubuntu
4.4.0.57 - seem like possibly partial
4.4.0.59

So I should first log back into Ubuntu and free up space. (Fix /boot space problem) then boot into Manjaro USB and re-install, but this time pay attention to boot via EFI and install properly?

If I do this is it still necessary to mount /sda1 to /boot/efi (which is the USB drive)?

Writing ahead, now Manjaro (after you cleaned up Ubuntu)
If you still want to clean up rather tha reinstall.

Check Manjaro fstab, add an entry for /boot/efi
If you have an entry for /boot and it shares with Ubuntu, 150 (143) MB is not enough - reinstall Manjaro.
If you don’t have /boot, add an entry for /boot/efi as follows.

UUID=xxxxxxxxxx /boot/efi vfat umask=0077 0 1

Then install grub as efi (wait… In manjaro, unlike Ubuntu, it uses the same package name… (let me come back on this for the packages) - shown as [1] later on when I edit.

Then grub-install command - to be followed by [2] when edited.
and “update-grub”

Do this first. I will need to edit my previous post. Check on it (my previous post) later on.

sudo apt-get remove --purge 4.4.0.31-* 4.4.0.57-* 4.4.0.59-*

4.4- ? that’s an old ubuntu .

Check Manjaro fstab, add an entry for /boot/efi

Nope, shares with /boot - reinstall

Just so we are on same path, I have freed up space in Ubuntu’s /boot partition (143mb) after removing .31, .57 and .59. I have not rebooted yet.

Yup. Next post will have some hints. Wait for it before you reinstall.
Meantime clean up Ubuntu well. Suggest add latest kernel.

Okay, saw your post above. Ignore all below.

Post anyway - not to waste.

Instaed of editing previous post, I continue here (so you can see it instead of waiting).

After adding /boot/efi to fstab and making sure /boot isn’t there in the first place - (you cannot just remove /boot in fstab and hope it works - it won’t - you need to reinstall)
Install the following packages (dosfstools should be there - but make sure)

dosfstools efibootmgr efivar

sudo mount /dev/sda1 /boot/efi
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

Good luck.

I am obey.

Okay - Reinstalling Manjaro.

o First make sure you boot your install media in UEFI
You do that at your bios boot set up (usually F8 ~ F12)
You must see the screen as shown here. The black screen, not the green screen.

o Select only 2 mount points, the /root of course and /boot/efi, your sda1.
Do not format that sda1.

Actually … that’s it. :grin:

[edit] - after all is done, you might want to look into your Ubuntu /boot, and clear out all Manjaro stuff there. the kernels etc… but be careful not to remove stuff Ubuntu needs. If unsure, leave it there.

Do you mean

Just to avoid confusion :slight_smile:

Yes, thanks for the correction, kainonergon.
Whatever fdisk, blkid, parted says. Whatever bios says.
Cheers.

Select only 2 mount points, the /root of course and /boot/efi, your sda1 means:

/dev/nvme0n1p1/boot/efi

No, just /dev/nvme0n1p1

Mount that as /boot/efi in your installation procedure.
The installation will ask you to choose mount point, select that partition (just scroll) as /boot/efi.

Ok that went smooth and I’m now back in a fresh install of Manjaro and the boot menu was much cleaner but with only 3 options:

boot manjaro
advanced majaro
windows efi

What do you suggest for the proper method to restore the Ubuntu install on /dev/nvme0n1p9 that also has a boot partition /boot via part /dev/nvme0n1p7

Also there is the file size of /boot partition /dev/nvme0n1p7 which I’ve shrunk but still 128Mb with little room left. I have another 150mb unused space before that partition but I get the warning if I try to use gparted to increase the size.

Forum kindly sponsored by Bytemark