0

while changing the colour for the boot splash screen, i could not reboot back into GDM.

in the grub command line, i tried to mount the sda for repair but it says mount point does not exist.

i also tried the automatic boot repair under FOSS. it says repair successful but it could not boot into GDM too.

then i tried the instructions here:

https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux%20%20

but i have problem when come to this step:

grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 grub> initrd /boot/initrd.img-3.13.0-29-generic

the original installed kernel is 4.15 generic which i have deleted after upgrading to 4.19. but in the /boot directory of the root device i can only find vmlinuz and initrd.img for the 4.15 version.

is there another location where the newly installed 4.19 kernel is kept? i upgraded it using UKUU

0

I have a bash based utility I authored to update the kernel. I also include a way to handle problems such as you describe above.

Here is a link to the repo: https://github.com/mtompkins/linux-kernel-utilities

As AskUbuntu prefers a direct answer:

  1. Boot to a linux based LiveCD (e.g. GParted on a USB)
  2. Open Terminal
  3. Mount the partition: sudo mount /dev/sdXY /mnt
    where sdXY is likely your sda1
  4. Mount some special partitions:
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
  5. Chroot into the /mnt: sudo chroot /mnt
  6. Remove the kernel packages you just installed with
    dpkg -r yourRecentKernels
    They must be removed in a non-dependency order, so just take your time.
    dpkg --list | grep "ii[[:space:]][[:space:]]linux-[f,h,i,l]"

You should be able to use any additional tools you need like grub repair, etc.

HTH

6
  • hello, to confirm the bash based utility you authored is for normal updating or can it be used for rescue situations like in my case? – lenovolobo Nov 28 '18 at 11:31
  • hello, to confirm the bash based utility you authored is for normal updating or can it be used for rescue situations like in my case? also for point 3, the partition means the root partition where i installed ubuntu? 1. the ubuntu installation DVD can be used? 6. Remove the kernel packages you just installed. can you clarify this point? i installed v4.19 after that i deleted v4.15. but now only v4.15 remains in the /boot directory. v4.19 is nowhere to be seen. do you mean to remove the remaining references to v4.15? – lenovolobo Nov 28 '18 at 11:39
  • The utility can be used in both circumstances. In your situation, it can be used after you've properly bind mounted and chrooted. I'd suggest you do a little reading on what chroot is and why it works. I can't speak specifically on your instance without really getting involved, however, without knowing too much more, what I believe should work is 1) Setup the chroot environment as I've described above. 2) install git and then install my utilities. 3) use update_ubuntu_kernel.sh from the utilities and pick a different kernel. 4) reboot. You may still need to run the boot-repair utility – Mark Nov 28 '18 at 18:50
  • i was able to execute sudo mount /dev/sdXY /mnt (to confirm this is where grub is installed the /boot/efi esp partition correct?) but i was unable to execute the rest of the commands --bind. mount point does not exist. i tried this both on Live CD and a new installation of ubuntu on another partition. i am able to access the grub menu via the new installation. is there another way to point the grub menu back to the old installation? – lenovolobo Nov 29 '18 at 13:19
  • sudo mount /dev/sdXY is not the actual command. You have to adjust it for your specific block device. That is what "where sdXY is likely your sda1" is referencing. – Mark Nov 29 '18 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.