location of new kernel for rescuing grub?











up vote
0
down vote

favorite












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










share|improve this question


























    up vote
    0
    down vote

    favorite












    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










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      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










      share|improve this question













      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







      18.04 grubrescue






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 at 14:19









      lenovolobo

      162




      162






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          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






          share|improve this answer





















          • 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 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 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 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 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 at 14:45













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096510%2flocation-of-new-kernel-for-rescuing-grub%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          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






          share|improve this answer





















          • 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 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 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 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 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 at 14:45

















          up vote
          0
          down vote













          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






          share|improve this answer





















          • 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 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 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 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 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 at 14:45















          up vote
          0
          down vote










          up vote
          0
          down vote









          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






          share|improve this answer












          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







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 at 15:29









          Mark

          680516




          680516












          • 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 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 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 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 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 at 14:45




















          • 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 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 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 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 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 at 14:45


















          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 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?
          – lenovolobo
          Nov 28 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 at 11:39




          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 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 at 18:50




          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 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 at 13:19




          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 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 at 14:45






          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 at 14:45




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096510%2flocation-of-new-kernel-for-rescuing-grub%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mouse cursor on multiple screens with different PPI

          Agildo Ribeiro

          Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”