I have a 1TB drive that used to have only Manjaro on it. I shrank this partition to 650GB, and then installed Ubuntu on the other 350GB. Ubuntu works fine, but trying to boot into Manjaro results in an error message that says "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0).
However, I am able to boot Manjaro just fine using the fallback initramfs in the advanced options:
I was going to post a picture of the full error screen, but apparently you have to be a higher TL on this forum to do thatā¦
How do I fix this? Can you help me understand how and what I broke so I can learn from this, and hopefully not make the same mistake in the future?
Because Iām sure Iāll be asked this, here are the outputs of various commands run from my Manjaro installation:
$ pacman -Q linux
linux54 5.4.58-1
$ uname -a
Linux x570-mycomp 5.4.58-1-MANJARO #1 SMP PREEMPT Tue Aug 11 15:46:30 UTC 2020 x86_64 GNU/Linux
$ sudo update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Found Ubuntu 20.04.1 LTS (20.04) on /dev/nvme0n1p5
Found Windows 10 on /dev/sda1
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done
Why are you using an MS-DOS MBR partition table on a UEFI system?
Sure, in theory it should be supported, but not all UEFI implementations do, and Manjaro officially only supports a GPT partition table on systems that boot in UEFI mode. And with an NVMe drive, you do indeed need to boot in UEFI mode, because the legacy BIOS compatibility mode does not support that.
I have no idea how I ended up with that. What tool can I use to fix it (can I even fix it without losing my current OS installations)? Would changing that fix my initramfs issue?
It is possible to convert an MBR partition table into GPT, yes, but to be honest, Iāve been exclusively running GNU/Linux for over twenty years, and Iām not touching that topic with a ten-foot pole. Itās tricky, and you could end up losing everything.
Iām not sure, but I suspect itās related. The only difference between the standard initramfs and the fallback is that the fallback doesnāt include the autodetect hook.
Addendum: You could try rebuilding your initramfs.
Now you have me wondering if itās worth it to wipe this drive and start from scratchā¦
Regarding your addendum:
$ sudo mkinitcpio -G
mkinitcpio: invalid option -- 'G'
$ sudo mkinitcpio --help
mkinitcpio 27
usage: mkinitcpio [options]
Options:
-A, --addhooks <hooks> Add specified hooks, comma separated, to image
-c, --config <config> Use alternate config file. (default: /etc/mkinitcpio.conf)
-g, --generate <path> Generate cpio image and write to specified path
-H, --hookhelp <hookname> Display help for given hook and exit
-h, --help Display this message and exit
-k, --kernel <kernelver> Use specified kernel version (default: 5.4.58-1-MANJARO)
-L, --listhooks List all available hooks
-M, --automods Display modules found via autodetection
-n, --nocolor Disable colorized output messages
-p, --preset <file> Build specified preset from /etc/mkinitcpio.d
-P, --allpresets Process all preset files in /etc/mkinitcpio.d
-r, --moduleroot <dir> Root directory for modules (default: /)
-S, --skiphooks <hooks> Skip specified hooks, comma-separated, during build
-s, --save Save build directory. (default: no)
-d, --generatedir <dir> Write generated image into <dir>
-t, --builddir <dir> Use DIR as the temporary build directory
-D, --hookdir <dir> Specify where to look for hooks.
-V, --version Display version information and exit
-v, --verbose Verbose output (default: no)
-z, --compress <program> Use an alternate compressor on the image
$ sudo mkinitcpio -g
mkinitcpio: option '-g' requires an argument
Thanks, this was a good suggestion, but ultimately did not work. The same error is displayed booting from the main initramfs . Unsurprisingly, Iām still able to boot from the fallback initramfsā¦just worried about a kernel update breaking that too, or something.
Here was the output of that comand, if itās relevant:
I installed the 5.7 kernel per your suggestion, but noticed it wasnāt showing up in the Grub menu. In an attempt to remedy this, I reinstalled Grub like so:
sudo grub-install /dev/nvme0n1
sudo update-grub
This ended up replacing the Grub installed by Ubuntu with the Manjaro Grub. Loading both Ubuntu and Manjaro with either version kernel (5.4 or 5.7) now works.