Installing a kernel in Recovery mode

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Installing a kernel in Recovery mode

Post by IanM2 »

When I boot into recovery mode and drop to root prompt, I want to learn how to install a kernel. I have an wired ethernet with DSL that works fine when the PC is booted up, but apparently not at the root prompt in recovery mode. I run

Code: Select all

 sudo apt update
get an output about "can't be reached...." It can just be a simple apt to test. Something like mousepad or gparted. My system is:

Code: Select all

Kernel: 5.8.0-55-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 4.8.6 
           wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
            Intel Ethernet I219-V vendor: ASRock driver: e1000e v: 3.2.6-k port: efa0 
           bus ID: 00:1f.6
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing an apt in Recovery mode

Post by IanM2 »

I've tried enabling networking in the recovery mode. It seems to do that. Then I chose root and then enter, then

Code: Select all

sudo netplan apply
It comes back to the prompt with no error. Then I ran

Code: Select all

mount -o remount,rw /
It comes back to the prompt with no error. The running

Code: Select all

sudo apt update
fails with a list of errors.

Code: Select all

Sudo apt install linux-oem-20.04b
(or any other even an app fails.)
Update manager and

Code: Select all

sudo apt update
both work fine when the system is booted.
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing an kernel in Recovery mode

Post by IanM2 »

I should point out that went in rescue mode and networking enabled, I can ping my connection successfully with

Code: Select all

ping centurylink.net
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing a kernel in Recovery mode

Post by IanM2 »

No one knows how? I find that hard to believe. :(
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Installing a kernel in Recovery mode

Post by SMG »

IanM2 wrote: Tue Jun 08, 2021 3:44 pmWhen I boot into recovery mode and drop to root prompt, I want to learn how to install a kernel.
Is there a specific use case need for wanting to be able to do this? Maybe no one who has seen the thread understands why you would want to do it.

One can boot into Recovery Mode and then into Mint and install kernels through Update Manager, Synaptic Package Manager, or terminal.

Or one can select a different installed kernel in which to boot using the Advanced Options in grub.

What are you attempting to accomplish by doing this?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing a kernel in Recovery mode

Post by IanM2 »

I have seen a thread on the forum where it used to install a higher or different kernel when the ones in Advanced don't work. One example:viewtopic.php?f=49&t=350311&hilit=kernel&start=20
I'm curious how to do it and why the method they used didn't work for me when I tested it.
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Installing a kernel in Recovery mode

Post by ricardogroetaers »

IanM2 wrote: Tue Jun 08, 2021 3:44 pm When I boot into recovery mode and drop to root prompt, ......
In rescue mode, why go to "terminal in root mode" (command prompt), which does not enable networking, if there is graphical mode in "recovery mode" and enable networking and it works fine?

However, if it can be complicated, why will it be uncomplicated?
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Installing a kernel in Recovery mode

Post by SMG »

IanM2 wrote: Sat Jun 12, 2021 10:39 pm I have seen a thread on the forum where it used to install a higher or different kernel when the ones in Advanced don't work. One example:viewtopic.php?f=49&t=350311&hilit=kernel&start=20
I'm curious how to do it and why the method they used didn't work for me when I tested it.
As I read that person's description, that person went into Recovery Mode and booted into the Mint GUI and opened the Terminal app. Then that person installed the kernel using commands in the Terminal app.

That person did not drop to a root prompt like you have described doing.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing a kernel in Recovery mode

Post by IanM2 »

From the thread:
Okay update, good news, but I don't want to say SOLVED yet. I successfully booted into 5.10 OEM kernel. The edge iso didn't work like didn't even show a crash log just went straight back into my BIOS so I did a clean install of what I had available (Linux Mint 20.1 Ulyssa Ubuntu 20.04 with 5.4.0.58 kernel). Went into grub menu, advanced options, entered recovery mode, then in terminal window typed command
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Installing a kernel in Recovery mode

Post by SMG »

IanM2 wrote: Sun Jun 13, 2021 10:56 am From the thread:
Okay update, good news, but I don't want to say SOLVED yet. I successfully booted into 5.10 OEM kernel. The edge iso didn't work like didn't even show a crash log just went straight back into my BIOS so I did a clean install of what I had available (Linux Mint 20.1 Ulyssa Ubuntu 20.04 with 5.4.0.58 kernel). Went into grub menu, advanced options, entered recovery mode, then in terminal window typed command
Yes, I read that exact same passage and will now explain what it means since it appears you and I are interpreting those words differently. I will explain what I understand those words to mean based on the many people I've helped install the 5.10-oem kernel mentioned in that thread.

Here is an article with the options for Recovery Mode Linux Mint Recovery Mode or Advanced Boot Options which has screen shots of the options. Please take a look at those options in the screen shots and compare them to what I will describe.

In the thread you quoted, that person selected a kernel with (recovery mode) after it (see the screen shot under "Step 2: Start Linux Mint with Advanced boot options"). By selecting "Recovery Mode", graphics drivers are disabled and the system boots in software rendering mode. (The issue in that thread was a problem getting the correct graphics drivers to load. The system would boot to a black screen if a Recovery Mode option was not selected.)

Then on the next screen (under "Step 3: Recovery mode in Linux Mint") they clicked resume - Resume normal boot which is the first (top) option. That booted their session with graphic drivers disabled which means the GUI was in software rendering mode. They then opened a terminal window from the menu option on the Cinnamon desktop just like you would open a terminal window if Linux Mint booted normally. From that terminal window they ran the command to install the kernel. They they rebooted the computer for the kernel to load.

Based on what you have described, it appears you are assuming instead of selecting the first option of resume and ending up at the Cinnamon desktop that they went to the next-to-the-last option of root - Drop to a root shell prompt and ended up in a tty.

I do not keep count, but I'm sure by this time I've helped at least a dozen people get the necessary graphics by installing that 5.10-oem kernel. I assure you I have told none of them to drop to a root shell prompt to do it.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
IanM2
Level 1
Level 1
Posts: 26
Joined: Thu Jul 30, 2020 5:53 pm

Re: Installing a kernel in Recovery mode

Post by IanM2 »

I think you are dead on right. Maybe a kernel can't be installed at the grub menu.
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Installing a kernel in Recovery mode

Post by SMG »

IanM2 wrote: Sun Jun 13, 2021 1:51 pmMaybe a kernel can't be installed at the grub menu.
One has to be careful regarding permissions when running as root, so that would not be a preferred way to install a kernel when trying to help someone via the internet--especially when other less risky methods are available.

There may be a way to do it, but I can not think of a reason at the present time as to why one would do it that way.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Installation & Boot”