Surface Pro 4 Win10 + Manjaro on uSD

At the first link ( the helpful post), you must do the [2 Additional Commands ]
efibootmgr did not show the manjaro entry, implying you did not do them.

Do them, if you think you've done them, do again. If still having problems, look at the section [Difficult problems ] and check out the links there for your computer type.

PS: do not do the chroot method.
It may complicate matters. If the first link don't help, the chroot method won't, either.

2 Likes

Thanks, you're the writer of some of those posts I linked earlier!

The reason you don't see the manjaro entries in efibootmgr -v-output is because I deleted them. I had multiple non-functional entries. The grub recovery instruction added a new one, too, however.

I just dug my hole a bit deeper. I think I have overwritten my Windows bootrecord (that's what they're called, right?). When booting from the Live Boot USB it is no longer listed. Probably because I followed the steps from the Grub Restore instructions while I still had that my /dev/nvme0n1p1 mounted to /boot/efi/ as well (through /etc/fstab, when I tried to follow the instructions of the other Surface Pro 4 post I linked in my original post; I suppose that's the extent of my 'common sense'. I should be able to recover it at some point using a Windows 10 installation USB.

I'll continue with the Manjaro boot first... :slight_smile:

Yes, looks like you destroyed windows efi file with the chroot method (restore bootloader).
But, to be fair, if done properly, you shouldn't destroy it. Just more easily to get things wrong.

Anyway, check if windows efi file is still somewhere, at the esp partition,and if it is not there, get back the windows boot first. If it is there, getting manjaro bootloader will get your windows to boot.

I won't be online for the next 8 hours. In fact , I'm typing from phone and saw that you're about to hit a dangerous corner.

Catch you later.

1 Like

Thanks for the help so far!
After changing my /etc/fstab, and unmounting my /dev/nvme0n1p1 partition, my windows partition is listed in my Live Boot USB's grub again. Also, mounting the nvme partition again, I can see a Microsoft EFI record. So all seems well!

I appreciate the help. It's really great from both of you. Are you in China/asia, per chance? Not being online for 8 hours... I believe office hours are starting in that timezone about now, right? :slight_smile:

Good to hear. Hopefully you gat your manjaro back too.
Yes, I'm at utc +8.
Cheers.

2 Likes

EDIT; seem to have triggered a post of my reply by mistake, still need to finish it...
EDIT2; writing out my question word-by-word helped me understand what I did better.. I managed to boot to Manjaro without Live Boot USB and my Windows partition shows up in grub as well!
I'll simply post what I did, in case it might help someone else.

I ended up having two EFI System Partitions, by following this guide. They were /dev/nvme0n1p1 and /dev/sdb1 from my original sudo blkid-output.

The hint by @gohlip in the post I quoted in the original post helped me get on the right track.

  1. I edited my /etc/fstab to include the following line:
    UUID=5634-9BBE /boot/efi vfat defaults,noatime 0 2
    Where that UUID corresponds to the nvme0n1p1-partition.
  2. Unmounted the current /sdb1 from /boot/efi
    sudo umount /boot/efi
  3. Mounted nvme0n1p1 to /boot/efi
    sudo mount /dev/nvme0n1p1 /boot/efi
  4. Refered to step 10 from the useful post, but replaced /dev/sda by /dev/nvme0n1
sudo rm /boot/grub/grubenv
sudo grub-editenv /boot/grub/grubenv create
sudo grub-editenv - set boot_success=0
sudo grub-install /dev/nvme0n1
sudo update-grub
  1. Referred to the UEFI-specific instructions from the useful post, again substituting my relevant partition in the commands
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/nvme0n1 -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

One thing that I still need to resolve is that I am launched into grub rescue when I simply boot the system... I need to manually select the manjaro boot entry from UEFI in order to boot my system. Any ideas on what this means and how to resolve it?

I'm another step closer to a properly booting system, though. Thanks for all help! :slight_smile:

Aha! Your sdb drive is msdos.
o And your root partition (manjaro) is located there (sdb3) - never good for uefi to be in msdos partition.
o Your Manjaro $esp is at nvme (/dev/nvme0n1p1) and most likely shared with Windows (which is okay).
o The so-called efi partition at sdb3 is not working and will never work. And neither windows nor manjaro uses it.
o Not surprisingly, you do not have a efiboot entry for manjaro.

Your setup is not good.
You will need to make your Manjaro partitions in gpt.
A reinstall is necessary, sorry.

A few pointers.
o It is okay to set your manjaro $esp (/boot/efi) in /dev/nvme0n1p1
For having a nvme disk, suggest you do use a nvme partition as $esp.
reminder - do not format this at reinstallation.
o /dev/nvme0n1p4 is windows reserved partition - do not touch this.
o You can use other manjaro partitions outside nvme - root, swap, home
but must be in gpt partitions, not msdos partitions.
o noticed your swap fstab parameters contain luks. Any idea?
When reinstalling, since swap in sdb will be wiped out, just do a 'simple' swap.

Oh, after reinstalled, it good to do this at manjaro terminal (not livecd)

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi

and print out

efibootmgr -v
cat /etc/fstab
sudo parted -l
sudo blkid

just to make sure you have a manjaro efiboot entry

Good luck.

3 Likes

Luckily, reinstalling Manjaro is no problem, it's an empty OS for now. But I think I should fix the boot into grub rescue issue first, or do you recon this will be fixed when I reinstall Manjaro?
It got this way when I tried to follow the restore guide (and probably made a mistake). The working Manjaro boot entry is the first in the boot-order when I enter UEFI, so I'd expect to boot straight into this when not using any modifiers.

EDIT: the grub rescue doesn't seem to have any modules available, I cannot issue a reboot command, nor search.file or configfile.

Yes. That should fix it.
But the important thing is that the disk has to be gpt.
You must do this -->
Use gparted, device tab --> create partition table --> gpt.

grub rescue does not have these modules. only grub. There is a way to get to grub prompt from grub rescue prompt (maybe, sometimes not) and a hassle. But... since you're reinstalling.... ?

1 Like

Ok. So then I'll just nuke the current install... Curious what causes the boot into grub rescue, though.
Boot0005 seems weird to me...

efibootmgr -v
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,0004,0005,0001,0002,0000
Boot0000* Internal Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)SDD.
Boot0001* USB Storage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)USB.
Boot0002* PXE Network	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(50670071-478f-4be7-ad13-8754f379c62f)PXE.
Boot0003* SurfaceFrontPage	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)/FvFile(4042708a-0f2d-4823-ac60-0d77b3111889)VOL+.
Boot0004* manjaro	HD(1,GPT,7626a74d-7e69-4adf-815b-b06a09f2d6a3,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)
Boot0005* Windows Boot Manager	HD(1,GPT,7626a74d-7e69-4adf-815b-b06a09f2d6a3,0x800,0x82000)/File(\EFI\manjaro\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0006* manjaro	HD(1,GPT,7626a74d-7e69-4adf-815b-b06a09f2d6a3,0x800,0x82000)/File(\EFI\Manjaro\grubx64.efi)

Thanks for all the help!

Yes, I noticed this earlier. I guess you had used easyBCD or something like this to get the windows boot use grub. Is that true? I have never tried to use windows boot for anything else except for windows. But just doing the restore grub (chroot) shouldn't change windows boot into using grubx64.efi. Unless you chroot into windows {scrap that} or select windows $esp in your chroot selection {more likely}. Again, I rarely use chroot, so that is also just a guess. Another reason I avoid chroot and if unavoidable, I do it manually.

But when we have a working grub, that shouldn't matter, I guess.
You do have the windows efi file, right? I remember you said that, somewhere.

Oh, you're welcome.

@AgentS re: grub rescue
I have not got into grub rescue for a very very long time.
I have no problems in grub for such a long time I cannot recall getting into grub rescue.
However hard I try, I just cannot get into grub rescue (to test, of course).
Do you know how to get into it (from a good grub)?
Thanks.

1 Like

I noticed I didn't reply to this point. The luks got in there because I specified it to be, again, following instructions from this wiki. It advised to format is as 'linuxswap' which ended up as luks.
As I am using a laptop (surface pro 4) I'd like to be able to hibernate the device, so I thought I'd require a swap partition (not sure if Manjaro has file-based swap on root?)

Thanks for the reply on swap. I'm not the swap guy and I don't pay too much attention to it. So I really don't know if your swap fstab parameter is correct. I have a swap partition (not swap file) but my parameters are much simpler. Hope you're right (I'm skeptical, but you're reinstalling) so after you reinstall, let's take a look at your swap parameters again. Just let the system take care of it. If there is some thing weird, let's have some swap guy take a look at it.

Let's not worry about it now.

1 Like

I don't recall using any tool like that, I've never heard of it.

I actually haven't used chroot either. Already being able to boot into the installed Manjaro through the Live Boot USB, I simply executed the command from this point on directly.

I'm not sure exactly what the Windows efi should look like, but I am able to get into Windows through the Manjaro boot entry (UEFI -> Manjaro -> GRUB -> Windows).

My /boot/efi looks like this:

/boot/efi/
├── EFI
│   ├── Boot
│   │   └── bootx64.efi
│   ├── manjaro
│   │   └── grubx64.efi
│   └── Microsoft
│       ├── Boot
│       │   ├── ar-SA
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── BCD
│       │   ├── BCD.LOG
│       │   ├── BCD.LOG1
│       │   ├── BCD.LOG2
│       │   ├── bg-BG
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── bootmgfw.efi
│       │   ├── bootmgr.efi
│       │   ├── bootspaces.dll
│       │   ├── BOOTSTAT.DAT
│       │   ├── boot.stl
│       │   ├── cs-CZ
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── da-DK
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── de-DE
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── el-GR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── en-GB
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── en-US
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── es-ES
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── es-MX
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── et-EE
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── fi-FI
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── Fonts
│       │   │   ├── chs_boot.ttf
│       │   │   ├── cht_boot.ttf
│       │   │   ├── jpn_boot.ttf
│       │   │   ├── kor_boot.ttf
│       │   │   ├── malgun_boot.ttf
│       │   │   ├── malgunn_boot.ttf
│       │   │   ├── meiryo_boot.ttf
│       │   │   ├── meiryon_boot.ttf
│       │   │   ├── msjh_boot.ttf
│       │   │   ├── msjhn_boot.ttf
│       │   │   ├── msyh_boot.ttf
│       │   │   ├── msyhn_boot.ttf
│       │   │   ├── segmono_boot.ttf
│       │   │   ├── segoen_slboot.ttf
│       │   │   ├── segoe_slboot.ttf
│       │   │   └── wgl4_boot.ttf
│       │   ├── fr-CA
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── fr-FR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── FveTcg_0.log
│       │   ├── FveTcg_1.log
│       │   ├── FveTcg_2.log
│       │   ├── hr-HR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── hu-HU
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── it-IT
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── ja-JP
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── kd_02_10df.dll
│       │   ├── kd_02_10ec.dll
│       │   ├── kd_02_1137.dll
│       │   ├── kd_02_14e4.dll
│       │   ├── kd_02_15b3.dll
│       │   ├── kd_02_1969.dll
│       │   ├── kd_02_19a2.dll
│       │   ├── kd_02_1af4.dll
│       │   ├── kd_02_8086.dll
│       │   ├── kd_07_1415.dll
│       │   ├── kd_0C_8086.dll
│       │   ├── kdstub.dll
│       │   ├── ko-KR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── lt-LT
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── lv-LV
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── memtest.efi
│       │   ├── nb-NO
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── nl-NL
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── pl-PL
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── pt-BR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── pt-PT
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── qps-ploc
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── Resources
│       │   │   ├── bootres.dll
│       │   │   ├── da-DK
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── de-DE
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── en-US
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── es-ES
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── fi-FI
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── fr-FR
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── it-IT
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── nb-NO
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── nl-NL
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── pl-PL
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── pt-PT
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── sv-SE
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── zh-CN
│       │   │   │   └── bootres.dll.mui
│       │   │   ├── zh-HK
│       │   │   │   └── bootres.dll.mui
│       │   │   └── zh-TW
│       │   │       └── bootres.dll.mui
│       │   ├── ro-RO
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── ru-RU
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── sk-SK
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── sl-SI
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── sr-Latn-CS
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── sr-Latn-RS
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── sv-SE
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── th-TH
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── tr-TR
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── uk-UA
│       │   │   ├── bootmgfw.efi.mui
│       │   │   └── bootmgr.efi.mui
│       │   ├── updaterevokesipolicy.p7b
│       │   ├── winsipolicy.p7b
│       │   ├── zh-CN
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   ├── zh-HK
│       │   │   ├── bootmgfw.efi.mui
│       │   │   ├── bootmgr.efi.mui
│       │   │   └── memtest.efi.mui
│       │   └── zh-TW
│       │       ├── bootmgfw.efi.mui
│       │       ├── bootmgr.efi.mui
│       │       └── memtest.efi.mui
│       └── Recovery
│           ├── BCD
│           ├── BCD.LOG
│           ├── BCD.LOG1
│           └── BCD.LOG2
└── System Volume Information
    └── IndexerVolumeGuid

64 directories, 171 files

Okay, strange.
(without chrooting) There is no way a linux can change a windows efi entry.
But stranger things have happened when we install uefi into a msdos partition.
Still wondering how/why we still let this happen (install uefi into msdos).

Never mind. Just reinstall.
Make sure you have a gpt disk and installed uefi.

1 Like

Are you suggesting the Manjaro installer will create a swap partition by itself? I recall when trying to install to my microSD I only had the option for 'manual install'.

At installation choose the swap partition and moount it as swap.
Okay, I don't let installer make partitions. I make partitions ready before installation and I use manual or expert or advanced or... method.

1 Like

Screenshot%20from%202019-04-22%2022-05-41
This should work, in terms of having the /dev/sdb-drive formatted as GPT, mounting nvme0n1p1 as /boot/efi(not /boot, right?).

Also, you may notice the two LUKS partitions. This changed from linuxswap and ext4 for the red and orange partitions, respectively after selecting they should be encrypted.

Please tell me you have done this.
Before installation.

1 Like

I have! :muscle:
The screenshot's first line under the partition diagrams says "Create new GPT partition table on /dev/sdb..." :slight_smile:

I just booted from the new installation. Seems much smoother. Still boot into grub recovery, however. Going to try log into my Windows OS and check if I can catch any error messages...

Forum kindly sponsored by