You are not logged in.

#1 2018-02-17 13:44:52

LindaJeanne
Member
Registered: 2018-02-17
Posts: 3

[solved] Kernel panic on boot after updating another os's grub

Hi!

While booting into Arch this morning, I (finally?) noticed it complaining about firmware being unable to update. Did a search, installed intel-ucode and ran

grub-mkconfig -o /boot/grub/grub.cfg

and rebooted.

...of course, the above had absolutely no effect, because back when I added the Ubuntu dual-boot, the Ubuntu grub took over. Which had always bugged me anyway, but I had been too lazy to figure out how to fix it. But I decided now was time.

After some more searching, I used efibootmgr to change the boot order. Trying to boot from Arch didn't work. OK, want to figure out what I'm doing wrong there eventually; for now, I'll just set it back to let it use Ubuntu's grub, then figure out how to fix the firmware thing from there.

Set back to the original boot order. Confirmed I was now able to get into Arch.

Rebooted, went into ubuntu. apt-get had never heard of intel-ucode. Did some searching, found something saying that that was because Ubuntu calls it  intel-microcode. Fine. Installed intel-microcode and ran grub-mkconfig again. Rebooted, tried to get into Arch.

....and Arch gave me a kernel panic:

Kernel panic - not synching: VFS: unable to mount foot fs on unknown-block(0,0)

sad

I am able to boot into Ubuntu. But I only use Ubuntu for Steam and gaming (and writing this post). I use Arch (with i3) for everything else, so I spend most of my time there.

So,


* How is it that setting Ubuntu's grub to update the firmware broke the filesystem on the Arch drive?
* How do I fix it?

Thanks! smile

Last edited by LindaJeanne (2018-02-21 17:37:43)

Offline

#2 2018-02-17 14:18:42

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [solved] Kernel panic on boot after updating another os's grub

LindaJeanne wrote:

Arch gave me a kernel panic:

Kernel panic - not synching: VFS: unable to mount foot fs on unknown-block(0,0)

That error is usually seen if /boot is not mounted correctly when the kernel image is updated (so the installed kernel modules do not match the subsequently booted kernel), it could be that Ubuntu's GRUB has found an old Arch kernel image somewhere and is trying to boot that — we would need to see /boot/grub/grub.cfg to be sure though.

To get Arch booting again, load up the Arch live ISO image, mount all of your partitions, (arch-)chroot into your system and then re-install the kernel image and run `grub-install` & `grub-mkconfig` again from there to wrest control of the bootloader from Ubuntu.

Offline

#3 2018-02-18 22:23:55

LindaJeanne
Member
Registered: 2018-02-17
Posts: 3

Re: [solved] Kernel panic on boot after updating another os's grub

Thanks! This pointed me in the right direction smile.

However, I've hit another snag:

$ sudo mkdir  /mnt/my_arch
$ sudo mount /dev/sda2 /mnt/my_arch
$ ls /mnt/my_arch

bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr  vmlinuz.old

$ ls /mnt/my_arch/boot/efi

$ sudo mount /dev/sda1/ /mnt/my_arch/boot/efi
$ ls /mnt/my_arch/boot/efi

EFI grub

$ sudo mount --bind /mnt/my_arch /mnt/my_arch
$ ls /mnt/my_arch/boot/efi

$ ls /mnt/my_arch

bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr  vmlinuz.old

I can mount the EFI partition fine initially, but as soon as I begin setting up binds to chroot, it vanishes. (first time through, I didn't notice it was missing until I had finished setting up and chrooted in, so I know it's not visible inside the chroot, either.)

$ sudo umount /mnt/my_arch
$ ls /mnt/my_arch/boot/efi

EFI grub

As you can probably tell, I don't have a lot of experience doing mounts and unmounts and bind-mounts, so I suspect I'm missing something really obvious.

I also tried

$ sudo mount --bind /mnt/my_arch /mnt/my_arch
$ sudo mount --bind /mnt/my_arch/boot/efi /mnt/my_arch/boot/efi
$ ls /mnt/my_arch/boot/efi

no dice.

It seems to be related to the efi partition having a mount point that is itself on a mounted partiton.   How do I get it so that chroot can see the efi partition?

Thanks!

edited to add: oh, yeah, I should point out that I'm logged in via USB stick, not via either OS on the system.

Last edited by LindaJeanne (2018-02-18 22:30:04)

Offline

#4 2018-02-18 22:33:57

seth
Member
Registered: 2012-09-03
Posts: 51,067

Re: [solved] Kernel panic on boot after updating another os's grub

I'm not sure what you're trying to achieve with those binds.
1. read up https://wiki.archlinux.org/index.php/Change_root
2. "--rbind", but you really should not need that at all.

Offline

#5 2018-02-18 22:51:43

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [solved] Kernel panic on boot after updating another os's grub

Please post the output of the following and indicate which partitions are used in arch and their mount points

# fdisk -l

Offline

#6 2018-02-21 17:00:20

LindaJeanne
Member
Registered: 2018-02-17
Posts: 3

Re: [solved] Kernel panic on boot after updating another os's grub

Doesn't look like I can add [solved] to the title myself?

The --bind/--rbind was because without it, the /proc was unpopulated and lots of things (like pacman) didn't work. (Unfortunately, I was working from an Ubuntu live usb and didn't have arch-chroot, which I understand populates that automatically)

I got the specific commands from https://wiki.archlinux.org/index.php/In … the_chroot.

That first one was the one I understood the least; from googling, all it seemed to be doing was setting up a chroot jail? So, since you said it shouldn't be necessary, and that was the one causing the vanishing-mount problem I skiped it, and just did the binds to get the /proc and such populated:

sudo mkdir /mnt/my_arch
sudo mount /dev/sda2 /mnt/my_arch
sudo mount /dev/sda1 /mnt/my_arch/boot/efi

sudo mount -t proc /proc /mnt/my_arch/proc
sudo mount --make-rslave -rbind /sys /mnt/my_arch/sys
sudo mount --make-rslave -rbind /dev /mnt/my_arch/dev
sudo mount --make-rslave -rbind /run /mnt/my_arch/run

sudo chroot /mnt/my_arch /bin/bash

pacman -S linux
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch --recheck
grub-mkconfig -o /boot/grub/grub.cfg

exit

Then unmounted everything and rebooted.

Arch is back! smile. And back in charge of Grub!

...the new grub install didn't find the Ubuntu system, but that's something I (hope I) can get working myself without too much difficulty, and is a separate problem anyway.  so this issue is solved!

Thanks all smile

Offline

#7 2018-02-21 17:04:43

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [solved] Kernel panic on boot after updating another os's grub

LindaJeanne wrote:

Doesn't look like I can add [solved] to the title myself?

Editing the first post gives you the option to change the title.  You may have reached the maximum title length when you attempt to prepend [SOLVED]

Offline

Board footer

Powered by FluxBB