Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Upgrade and Reconfigured Kernel. 2 Problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Dragomundo
n00b
n00b


Joined: 11 Dec 2019
Posts: 1
Location: Arkansas, USA

PostPosted: Sat Feb 01, 2020 11:31 pm    Post subject: [SOLVED] Upgrade and Reconfigured Kernel. 2 Problems Reply with quote

I have a Dell XPS 13 9360 been running gentoo on it for a while. Whole reason I'm upgrading kernel is to get virtualbox working for this OS class for school so i can run a specific linux VM...
Then I get this great idea of giving manual kernel configuration a try, being that I used Genkernel --all before(couldnt manually configure kernel at first so gave up) but anyways here we go

when I boot GRUB says that it cant find the linux image 4.19.66(old one, I want 4.19.97). So I have to manually edit the menuentry in the boot menu for it to boot.
When it boots the new linux kernel the keyboard doesn't work :(

So I go to edit the menuselection file and change the linux and initrd entries. It ORIGINALLY says(originally configured kernel using GENKERNEL)

Code:

insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
..blahblah if statement
echo        'Loading Linux x86_64-4.19.66-gentoo ...'
linux        /kernel-genkernel-x86_64-4.19.66-gentoo root=UUID=818b8a11-8eb4-4056-ae12-0f0f388abc56 ro
echo        'Loading initial ramdisk ...'
initrd         /initramfs-genkernel-x86_64-4.19.66-gentoo


So to successfully boot i changed it to the following

Code:

insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
..blahblah if statement
echo        'Loading Linux x86_64-4.19.66-gentoo ...'
linux        /boot/vmlinuz-4.19.97-gentoo root=UUID=818b8a11-8eb4-4056-ae12-0f0f388abc56 ro
echo        'Loading initial ramdisk ...'
initrd         /boot/initramfs-4.19.97-gentoo.img


and boom it boots!

But my keyboard doesn't work...probably didn't load a module or include support for it in the kernel config. I thought that make localmodconfig would include the drivers used, including the driver currently allowing me to type at that time.

Anyways to manually upgrade kernel I typed in the following commands in order using brand new config(mind you the partition scheme is [ / (sda1) , none (sda2) , /home (sda3) ]:

Code:

eselect list
sudo eselect set 1 (showed linux-4.19.97 as the only entry)
ls -al /usr/src/linux (linux -> linux-4.19.97-gentoo)
cd /usr/src/linux
sudo make localmodconfig
sudo make gconfig
sudo make -j8
sudo make modules_prepare
sudo make modules
sudo emerge \@module-rebuild
sudo make modules_install
sudo make install
sudo genkernel --install initramfs
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot


grub did find previous(4.19.66) and current(4.19.97) linux & initrd image

[SOLVED]
So I had to boot from a Gentoo minimal install USB, mount the file systems and go in and rebuild the part of the kernel I left out. Turns out I'd not noticed that I had AT keyboard unselected under Device Drivers -> Keyboards -> AT keyboard. After re-making and installing kernel, I recreated the initramfs and /boot/grub/grub.cfg file and rebooted.
At this point I still had to manually edit the grub menuselection to boot, but keyboard worked!
To fix GRUB not picking up the new changed config, I had noticed that I had installed the grub directory onto the root ( / ) folder instead of ( /boot ) so I deleted that /grub folder and reinstalled grub using
Code:
grub-install --boot-directory=/boot /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

That fixed everything

As a side note regarding virtualbox, I initially installed the virtualbox-bin package to no avail(had successfully modprobed the vboxdrv module too). I installed the regular virtualbox, virtualbox-additions, virtualbox-extpack-oracle and was then finally able to run virtualbox but only as root. Even after adding my regular user to vboxusers group
That kind of bothers me, because it wastes root partition space. Ill try to either get it working without root, or pass the VM over to a USB instead


Last edited by Dragomundo on Sun Feb 02, 2020 9:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 227

PostPosted: Sun Feb 02, 2020 10:09 am    Post subject: Reply with quote

Hi,

Try checking
Quote:
modules_load
in /usr/share/genkernel/arch/x86_64 or your arch.

Quote:
MODULES_USB="......


sometimes I manually purge this file and have had your issue, maybe that's not the best way.


:)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14971

PostPosted: Sun Feb 02, 2020 5:47 pm    Post subject: Re: Upgrade and Reconfigured Kernel. 2 Problems Reply with quote

Welcome to the forums.
Dragomundo wrote:
Whole reason I'm upgrading kernel is to get virtualbox working for this OS class for school so i can run a specific linux VM...
Does it need to be Virtualbox? Qemu/KVM is quite well supported too.
Dragomundo wrote:
when I boot GRUB says that it cant find the linux image 4.19.66(old one, I want 4.19.97). So I have to manually edit the menuentry in the boot menu for it to boot.
Probably you either didn't update the configuration file before rebooting, or you updated some input file and did not remind grub to rebuild the live file from the input file.
Dragomundo wrote:
When it boots the new linux kernel the keyboard doesn't work :(
What keyboard do you have? When it does work, what kernel driver is responsible for it?
Dragomundo wrote:
But my keyboard doesn't work...probably didn't load a module or include support for it in the kernel config. I thought that make localmodconfig would include the drivers used, including the driver currently allowing me to type at that time.
You used an initramfs. Does that initramfs solicit keyboard input before the root filesystem is mounted? If yes, did you put the keyboard module into the initramfs? If no, then your keyboard will not work until root is mounted. Generally, you should build into the kernel any component that you expect will be loaded constantly for the system. This covers the keyboard, mouse, drivers for any non-hotpluggable storage (e.g. internal SSD), and non-hotpluggable network devices. It's your choice whether to use modules for things that are hotpluggable.
Dragomundo wrote:
Code:
eselect list
sudo eselect set 1 (showed linux-4.19.97 as the only entry)
ls -al /usr/src/linux (linux -> linux-4.19.97-gentoo)
cd /usr/src/linux
sudo make localmodconfig
sudo make gconfig
sudo make -j8
sudo make modules_prepare
sudo make modules
sudo emerge \@module-rebuild
sudo make modules_install
sudo make install
sudo genkernel --install initramfs
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
Why are you sudoing everything? If you need a root shell, start one. Also, note that with a bit of setup, you won't need root to build the kernel, only to install it.
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 78

PostPosted: Tue Feb 04, 2020 4:13 pm    Post subject: Reply with quote

Your shown example files are showing old naming schema. Please make sure you are aware of https://www.gentoo.org/support/news-items/2019-12-30-genkernel-4-default-filenames.html
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
rufnut
Apprentice
Apprentice


Joined: 16 May 2005
Posts: 227

PostPosted: Thu Feb 06, 2020 1:21 pm    Post subject: Reply with quote

Whissi wrote:
Your shown example files are showing old naming schema. Please make sure you are aware of https://www.gentoo.org/support/news-items/2019-12-30-genkernel-4-default-filenames.html

Interesting, I had no idea things had changed back
https://wiki.gentoo.org/wiki/Genkernel#Genkernel.3F_Genkernel-next.3F_Dracut.3F


thanks for the tip. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum