You are not logged in.

#1 2018-07-27 10:06:35

db
Member
Registered: 2017-10-21
Posts: 18

Grub install after moving to new laptop

Hey guys

I posted a while back about moving to a new laptop.

I decided to follow the rsync method. This excludes some of the /dev, /proc directories etc. I've updated the /etc/fstab, and I'm ready to try booting, but I can't get grub installed.

The new laptop has EFI on /dev/sdb1, and I've copied my install to /dev/sdb9. I tried following a couple of guides to get grub installed on EFI from a live DVD, but they don't seem to work. Is it to do with arch-chroot and the fact that some of the /dev /proc etc are empty on /dev/sdb9?

I've reinstalled grub before on different distros using chroot and live DVDs etc , though not with EFI and now I'm lost.

Help?

Offline

#2 2018-07-27 10:57:50

nl6720
Wiki Maintainer
Registered: 2016-07-02
Posts: 97

Re: Grub install after moving to new laptop

The /dev/ /proc/ etc. get populated on boot or bind mounted when running arch-chroot, in most other cases they should be empty.

The instructions for GRUB on UEFI are in the wiki: GRUB#UEFI systems. How exactly did you try installing GRUB and what didn't work? Where did you mount the EFI system partition?
Post the contents of /etc/fstab and the output of fdisk -l and lsblk -f

Offline

#3 2018-07-27 13:05:35

db
Member
Registered: 2017-10-21
Posts: 18

Re: Grub install after moving to new laptop

I created a new partition and did a fresh install to try and get around the grub install. It worked in that it now recognises the NEWarch, Windows and COPIEDarch installs.

I can boot from NEWarch and Windows, but when I boot from COPIEDarch (what I really want) i now get a kernel panic. 'unable to mount root on unknown block (0,0)'. It's very early in boot. I rechecked the UUIDs and they look correct

Mmmm. From ddging, it seems like I have now moved onto an initramfs/mkinitcpio issue.

Offline

#4 2018-07-27 13:13:40

nl6720
Wiki Maintainer
Registered: 2016-07-02
Posts: 97

Re: Grub install after moving to new laptop

Are you sure you're booting with the matching kernel and initramfs?

Does NEWarch and COPIEDarch share the same /boot partition?

Offline

#5 2018-07-28 03:41:01

db
Member
Registered: 2017-10-21
Posts: 18

Re: Grub install after moving to new laptop

No, I don't think they share the same /boot and I would guess they have different kernels etc.

Something that I had not considered that may be relevant was that I believe that COPIEDarch was not from an EFI install.

I have 3 OS partitions Windows, NEWarch (fresh install) and COPIEDarch. COPIEDarch hasn't been updated in a month or two.

In the EFI partition:
*NEWarch  mounts it as /boot/efi and has its own directory in there with the file.  Selecting that from grub works.
*Selecting the Windows Bootloader from grub works.
*COPIEDarch also has its own directory in the EFI partition, and I also added a mount to /etc/fstab for /boot/efi. But that probably wasn't in place when I had tried things previously. So I think I need to regenerate the EFI directory/entry, but as it's already listed in grub, I shouldn't have to reinstall or update grub?

Thx for the help

Last edited by db (2018-07-28 03:43:42)

Offline

#6 2018-07-28 07:38:53

nl6720
Wiki Maintainer
Registered: 2016-07-02
Posts: 97

Re: Grub install after moving to new laptop

You have multiple instances of GRUB on the ESP? One should be enough.

Chroot into COPIEDarch, reinstall the kernel and rerun the grub-install & grub-mkconfig commands.

Offline

#7 2018-07-28 08:23:35

db
Member
Registered: 2017-10-21
Posts: 18

Re: Grub install after moving to new laptop

I think I have multiple grubs on different disks. I think the instructions I've been following have assumed only one linux install and say to install to /boot/grub/grub.cfg. Which are not shared on NEWarch or COPIEDarch. So I should just put that on the ESP drive as well? It won't hurt anything/get wiped?

Well, I did a chroot into COPIEDarch, did a mkinicpio, rebooted, then chrooted again and redid the grub install and grub-config and.....I've booted into COPIEDarch!! I'm doing all the updates etc as it's been a couple of months.

But....grub has lost NEWarch and Windows bootloader listings. I guess it's related to the non shared grub above?

Offline

#8 2018-07-28 08:37:09

nl6720
Wiki Maintainer
Registered: 2016-07-02
Posts: 97

Re: Grub install after moving to new laptop

Only GRUB EFI binary should be on the ESP. Don't move /boot/grub/grub.cfg anywhere.

To boot other OSes read the tip about os-prober in GRUB#Generate the main configuration file and GRUB#Dual-booting.

Offline

#9 2018-07-28 09:03:24

db
Member
Registered: 2017-10-21
Posts: 18

Re: Grub install after moving to new laptop

It's strange, I tried regenerating grub.cfg and reinstalling it from NEWarch, and it detects the OSs properly but I'm back to the kernel panic when I select COPIEDarch.

I can still get to COPIEDarch (or select any grubs I've got installed) via F12 on boot to access the EFI selections.

I'll check out the links you provided and try and compare the grub entries from those grub.cfg above.

Offline

Board footer

Powered by FluxBB