Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jrichards1408

macrumors 6502a
Original poster
Nov 4, 2016
615
194
See my code above: you're mounting your /dev/nvme1n1p7 EFI partition to /mnt/boot/efi, and your root system partition /dev/nvme1n1p7 to /mnt. You don't need to mount the swap to fix the bootloader.

The code on the system 76 site basically auto mounts some of the other necessary virtual file systems, then chroots into your mounted system, updates the initramfs then runs the systemD bootctl command to reinstall the bootloader & (we hope) fixes missing entries in NVRAM etc.
Do you mean nvme1n1p8 to /mnt/boot/efi and nvme1n1p7 to /mnt?

nvme1n1p8 is the efs partition you see from my pic i posted yesterday and the nvme1n1p7 contains the ext4 with all my data
 

mick2

macrumors 6502
Oct 5, 2017
251
237
UK
Yes, typo above, should be /dev/nvme1n1p8 to /mnt/boot/efi. The 2 code snippets I gave previously are correct - use those.
 
  • Like
Reactions: jrichards1408

jrichards1408

macrumors 6502a
Original poster
Nov 4, 2016
615
194
Cheers thanks.

After going through most of the steps I got an error after one of the steps reach completion.

Basically when I had executed

Update-initamfs - v - k all
8300cb4c4da619d578fd9934cb567831.jpg


some of the stack trace logs

Code:
DKMS: install completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.3.0-7642-generic -C /lib/modules/5.3.0-7642-generic/build M=/var
/lib/dkms/system76-io/1.0.1~1559663713~19.10~ea5f61a/build...
cleaning build area...

DKMS: build completed.

system76-io.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-7642-generic/updates/dkms/

depmod...
Running in chroot, ignoring request: restart

DKMS: install completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.3.0-7642-generic -C /lib/modules/5.3.0-7642-generic/build M=/var
/lib/dkms/system76/1.0.6~1568425791~19.10~5ba8ce9/build...
cleaning build area...

DKMS: build completed.

system76.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-7642-generic/updates/dkms/

depmod...
Running in chroot, ignoring request: restart

DKMS: install completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.3.0-7642-generic -C /lib/modules/5.3.0-7642-generic/build M=/var
/lib/dkms/system76_acpi/1.0.1~1571170639~19.10~d625910/build...
cleaning build area...

DKMS: build completed.

system76_acpi.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.3.0-7642-generic/updates/dkms/

depmod...
Running in chroot, ignoring request: restart

DKMS: install completed.
   ...done.
Setting up linux-image-generic (5.3.0-7642.34~1584408018~19.10~21df4b1) ...
Setting up linux-headers-generic (5.3.0-7642.34~1584408018~19.10~21df4b1) ...
Setting up linux-generic (5.3.0-7642.34~1584408018~19.10~21df4b1) ...
Setting up linux-system76 (5.3.0-7642.34~1584408018~19.10~21df4b1) ...
Processing triggers for linux-image-5.3.0-7642-generic (5.3.0-7642.34~1584408018~19.10~21d
f4b1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.3.0-7642-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.3.0-7642-generic
kernelstub.Config    : INFO     Looking for configuration...
kernelstub           : INFO     System information:

    OS:..................Pop!_OS 19.10
    Root partition:....../dev/nvme1n1p7
    Root FS UUID:........cd4bb972-4e52-4aa4-a7ad-96bcc653caab
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme1n1p8
    ESP Partition #:.....8
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash
    Kernel Image Path:.../boot/vmlinuz
    Initrd Image Path:.../boot/initrd.img
    Force-overwrite:.....False

kernelstub.Installer : INFO     Copying Kernel into ESP
kernelstub.Installer : INFO     Copying initrd.img into ESP
kernelstub.Installer : INFO     Setting up loader.conf configuration
kernelstub.Installer : INFO     Making entry file for Pop!_OS
kernelstub.Installer : INFO     Backing up old kernel
kernelstub.Installer : INFO     Making entry file for Pop!_OS
/etc/kernel/postinst.d/zz-kernelstub:
kernelstub.Config    : INFO     Looking for configuration...
kernelstub           : INFO     System information:

    OS:..................Pop!_OS 19.10
    Root partition:....../dev/nvme1n1p7
    Root FS UUID:........cd4bb972-4e52-4aa4-a7ad-96bcc653caab
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme1n1p8
    ESP Partition #:.....8
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash
    Kernel Image Path:.../boot/vmlinuz
    Initrd Image Path:.../boot/initrd.img
    Force-overwrite:.....False

kernelstub.Installer : INFO     Copying Kernel into ESP
kernelstub.Installer : INFO     Copying initrd.img into ESP
kernelstub.Installer : INFO     Setting up loader.conf configuration
kernelstub.Installer : INFO     Making entry file for Pop!_OS
kernelstub.Installer : INFO     Backing up old kernel
kernelstub.Installer : INFO     Making entry file for Pop!_OS
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-7642-generic
Found initrd image: /boot/initrd.img-5.3.0-7642-generic
Found linux image: /boot/vmlinuz-5.3.0-22-generic
Found initrd image: /boot/initrd.img-5.3.0-22-generic
Found linux image: /boot/vmlinuz-5.3.0-20-generic
Found initrd image: /boot/initrd.img-5.3.0-20-generic
  /dev/sda: open failed: No medium found
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Found Windows Boot Manager on /dev/nvme1n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done
Error: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit -.mount is masked.
 

jrichards1408

macrumors 6502a
Original poster
Nov 4, 2016
615
194
Despite the error above I continued the process and it seem to finally boot into my pop os!

Woot!

Man I owe u big time for this!

Thank you so much mate!

Really appreciate it!

On a separate topic, is there clone backup tool/time machine feature where I can backup everything including the apps and data as is and restore it if ever I completely mess it up again?
7716a25f8ebd9620d39a1730c3cd085d.jpg
 

mick2

macrumors 6502
Oct 5, 2017
251
237
UK
:cool:

fwiw the error is because the initramfs update auto ran a grub-update(!), which obv fails cos you're not using grub.

Nice one for sticking with it - fixing a knackered bootloader is one of the Linux rights-of-passage and the fact you've done it once will def come in use in the future.

A couple of recommendations:

Backup: I use Timeshift. By default it only backs up system dirs & not home, but you can just add home dir for a full machine backup. Works brilliantly and you can wipe out an install and get it back easily by booting to a live USB, installing Timeshift and running restore from there.

Partitioning: I'd rethink your partitioning scheme. As @c0ppo said above, you should put your /home dir on a separate partition. That way, if you have to reinstall the OS, you don't touch any of your /home data and all the .configs for your apps remain. I also have separate /boot, /swap and root / partitions, but these are more a matter of taste.

You still have 2 EFI partitions which works but is kind of non standard. Usually both Windows and Linux would share the same EFI. Your case has the advantage that windows updates can't bork your Linux EFI but you need to bear your nonstandard setup in mind when doing future stuff that might affect the EFI or booting.

The only other thing is that personally i'd nstall Grub2 as a bootloader rather than systemD. Again, systemD works but its rather non-standard and you'll find it much easier to get help / follow guides if you're using Grub as its what most people know. If the above had failed and we needed to get into the guts of systemD boot config i couldnt have helped you, whereas if you'd been using Grub I could have.

Anyway, cool that you got it back in the end :D
 
Last edited:
  • Like
Reactions: jrichards1408

jrichards1408

macrumors 6502a
Original poster
Nov 4, 2016
615
194
:cool:

fwiw the error is because the initramfs update auto ran a grub-update(!), which obv fails cos you're not using grub.

Nice one for sticking with it - fixing a knackered bootloader is one of the Linux rights-of-passage and the fact you've done it once will def come in use in the future.

A couple of recommendations:

Backup: I use Timeshift. By default it only backs up system dirs & not home, but you can just add home dir for a full machine backup. Works brilliantly and you can wipe out an install and get it back easily by booting to a live USB, installing Timeshift and running restore from there.

Partitioning: I'd rethink your partitioning scheme. As @c0ppo said above, you should put your /home dir on a separate partition. That way, if you have to reinstall the OS, you don't touch any of your /home data and all the .configs for your apps remain. I also have separate /boot, /swap and root / partitions, but these are more a matter of taste.

You still have 2 EFI partitions which works but is kind of non standard. Usually both Windows and Linux would share the same EFI. Your case has the advantage that windows updates can't bork your Linux EFI but you need to bear your nonstandard setup in mind when doing future stuff that might affect the EFI or booting.

The only other thing is that personally i'd nstall Grub2 as a bootloader rather than systemD. Again, systemD works but its rather non-standard and you'll find it much easier to get help / follow guides if you're using Grub as its what most people know. If the above had failed and we needed to get into the guts of systemD boot config i couldnt have helped you, whereas if you'd been using Grub I could have.

Anyway, cool that you got it back in the end :D
Brilliant thanks I'll try that backup :)
 

jrichards1408

macrumors 6502a
Original poster
Nov 4, 2016
615
194
Lenovo has excellent linux support, it's way easier to install firmware or bios updates then in windows for example.
But never the less, never install anything without checking first.

With all that said, have you tried to enter GRUB menu? Actually, popos uses systemd-boot instead of GRUB. Try to use it.
If it doesn't boot then, don't panic. Set your BIOS to boot to popos directly. I'm afraid I can't tell you the exact procedure, since I don't have my X1E anymore. Google it up tough, it's possible.

And even if that doesn't work, make a new PopOS install disk and then try to repair your install. I highly doubt that firmware update wiped it out.

P.S.
It's always a good thing to make separate root (/) and home folders during install of any linux distro. That way you separate your files from the OS. That way all you would have to do now is reinstall popos without touching home folder.
Hi . so i am trying to reinstall everything again but on the custo install pop OS screen , how do i select the first EFI boot partition that was originally created by windows? It keeps asking me for another place to instyall the boot/efi for pop os?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.