View previous topic :: View next topic |
Author |
Message |
Featherfoot Veteran
Joined: 28 Dec 2002 Posts: 1108 Location: Stuart, Florida
|
Posted: Wed Apr 17, 2019 2:10 am Post subject: Moved gentoo to a new system, can't set up grub2 right (SOLV |
|
|
I am trying to move my gentoo system to my new computer, an amd64 system with an M.2 drive. I did this by installing Linux Mint and then using grsync to copy my system from my old computer to the new one. I was able to chroot into the new gentoo partition to recompile the kernel and to re-emerge nvidia-driversl. My problem is that I am not able to set up a grub2 entry that will successfully boot up the gentoo system.
The gentoo system has the /boot directory in the partition with the rest of gentoo. When I boot, the system runs for a while until it is time to mount the root partition. I get the following mesage at that point:
Code: |
Unable to resolve root UUID=18241631-312b-4763-b53a-96c9764ec70b
|
There is something wrong with the "linux" command in the grub entry, but I have no idea what is wrong.
Here is the section of grub code that is supposed to boot gentoo:
Code: |
jc@flyboy:~$ cat 07_jc
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Gentoo 4.19.27-r1 on SSD' --class gentoo --class gnu-linux --class os {
recordfail
insmod part_gpt
insmod ext2
set root='(hd0,gpt7)'
search --no-floppy --fs-uuid --set=root 18241631-312b-4763-b53a-96c9764ec70b
linux /boot/kernel-genkernel-x86_64-4.19.27-gentoo-r1 root=UUID=18241631-312b-4763-b53a-96c9764ec70b ro recovery nomodeset
initrd /boot/initramfs-genkernel-x86_64-4.19.27-gentoo-r1
}
|
Here is the fstab entry that mounts the gentoo system as /gentoo:
Code: |
jc@flyboy:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=cd43263c-2ccc-4a6a-9416-507ff3f25192 / ext4 errors=remount-ro 0 1
# /gentoo was on /dev/sda7 during installation
UUID=18241631-312b-4763-b53a-96c9764ec70b /gentoo ext4 defaults 0 2
# /home was on /dev/sda10 during installation
UUID=b8528f08-0ea3-4e39-bea1-c058c0c9aae5 /home ext4 defaults 0 2
# /misc was on /dev/sda8 during installation
UUID=5cabe092-1153-4c44-bd69-b4bcf75be8db /misc ext4 defaults 0 2
# swap was on /dev/sda9 during installation
UUID=daa9c594-b685-45bc-8759-e13a8334610a none swap sw 0 0
jc@flyboy:~$
|
Last edited by Featherfoot on Thu Apr 18, 2019 12:32 am; edited 1 time in total |
|
Back to top |
|
|
Savoritias n00b
Joined: 07 Oct 2013 Posts: 21
|
Posted: Wed Apr 17, 2019 9:22 am Post subject: |
|
|
I think the problem is either with the filesystem or the M2 hardrive. Maybe something is missing or has be configured wrong in the kernel during the move from Linux Mint.
I would also maybe try to compile the kernel with a genkernel default configuration to see if it boots.
If all else fails maybe try to remove the UUID and put the /dev to see if it boots. |
|
Back to top |
|
|
littletux n00b
Joined: 08 Dec 2003 Posts: 74
|
Posted: Wed Apr 17, 2019 9:24 am Post subject: |
|
|
I have a possible idea. Your hard disk is a M.2. Is it maybe a nvme type ssd? If yes check if your kernel config has BLK_DEV_NVME in kernel. the option should be built in and not as a modul, because you want boot from there.
oh yes and i forgot
if this message comes after a time of booting kernel and then stops, you have the ability to boot your system. if the boot stops where i think it does, you can only type in either Code: | /dev/yourpartition
or
LABEL=yourpartitonlabel
also you can type
UUID=youruuid
but this is masochistic (lol)
| there where it stops, and the kernel will the rest of the boot process
this will only work if it is not the missing kernel option that prevent the boot process |
|
Back to top |
|
|
Featherfoot Veteran
Joined: 28 Dec 2002 Posts: 1108 Location: Stuart, Florida
|
Posted: Wed Apr 17, 2019 7:25 pm Post subject: |
|
|
I rebuilt the kernel with a bunch of NVME kernel options and it now boots!
The problem I now have is that it is being mounted read-only, as far as I can tell. As a result, tmp files can't be created. I was able to verify this by failing to delete several extraneous files in /root.
The NVME options that are available in the kernel are not obviously read-write controls... |
|
Back to top |
|
|
Featherfoot Veteran
Joined: 28 Dec 2002 Posts: 1108 Location: Stuart, Florida
|
Posted: Thu Apr 18, 2019 12:31 am Post subject: |
|
|
I redid the fstab entry for / and explicitly added "rw" to the options line and added an errors=remount-ro option. I haven't had to explicitly saw "rw" for a long time. |
|
Back to top |
|
|
|