Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Manual kernel update = no change?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Tue May 01, 2018 1:51 pm    Post subject: Manual kernel update = no change? Reply with quote

I thought I could be brave and update my 4.9.76 genkernel to a 4.9.95 custom kernel. A couple of compiling hours later, I invoked the usual order of commands:

Code:
# make modules_install
# make install
# mount /boot
# grub-mkconfig -o /boot/grub/grub.cfg


It said it found one init image and two kernels - which is correct. However, after the reboot grub still only offers me "Gentoo Linux" with the 4.9.76 kernel.

Code:
# genkernel all
# grub-mkconfig -o /boot/grub/grub.cfg
# reboot


That worked, ignoring any modifications though, since --kernel-config=/usr/src/linux/.config seemed to do nothing but delete that file. So I'm on 4.9.95 now, but I remembered that it might be interesting to know what happened. Does anyone know why?
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7458
Location: Goose Creek SC

PostPosted: Tue May 01, 2018 5:02 pm    Post subject: Reply with quote

Quote:
# make modules_install
# make install
# mount /boot
# grub-mkconfig -o /boot/grub/grub.cfg
my version of usual commands for your apparent layout would be:
Quote:
eselect kernel set <your kernel choice>
mount /boot
cd /usr/src/linux
make
make modules_install
make install
grub-mkconfig -o /boot/grub/grub.cfg
need make to build the kernel, if you have a separate boot partition it needs to be mounted at /boot before make install is run, if the boot partition is not mounted at /boot, make install will write the kernel on the root partition in the /boot directory.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Wed May 02, 2018 10:05 am    Post subject: Reply with quote

Sorry for being too imprecise - of course ;) I also typed make before. So what I did was quite what you did - but why didn't it work then?
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
tuggbuss
Apprentice
Apprentice


Joined: 20 Mar 2017
Posts: 203

PostPosted: Wed May 02, 2018 10:43 am    Post subject: Reply with quote

pun_guin wrote:
Sorry for being too imprecise - of course ;) I also typed make before. So what I did was quite what you did - but why didn't it work then?


Did you enter directory /usr/src/linux manually? Even if you were in that dir you have to enter the dir again. Think it has something with symlink to do.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Wed May 02, 2018 10:47 am    Post subject: Reply with quote

Yes, I did. All symlinks were set to "auto" though - and the major "problem" was that Grub said it foudn the new kernel but it wasn't there after the reboot. Hm!
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7458
Location: Goose Creek SC

PostPosted: Wed May 02, 2018 12:32 pm    Post subject: Reply with quote

if you have a separate boot partition it needs to be mounted at /boot before make install is run, if the boot partition is not mounted at /boot, make install will write the kernel on the root partition in the /boot directory.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Wed May 02, 2018 2:15 pm    Post subject: Reply with quote

Ah, that might be it. :!:
Yes, /boot is /dev/sda2 here ...

Thank you, I had not thought that far.
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7458
Location: Goose Creek SC

PostPosted: Wed May 02, 2018 2:35 pm    Post subject: Reply with quote

you can check what happened:
with /dev/sda2 not mounted, run: ls /boot; if a kernel is listed it is on /dev/sda4 ....
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Wed May 02, 2018 11:34 pm    Post subject: Reply with quote

There is a whole bunch of files (both from the old and the new kernel) in the unmounted /boot ... can I safely delete them?
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7458
Location: Goose Creek SC

PostPosted: Thu May 03, 2018 12:09 am    Post subject: Reply with quote

yes, but ...
I would:
Code:
mkdir /mnt/tmpboot
mv /boot/* /mnt/tmpboot
ls /boot #should be empty
ls /mnt/tmpboot #should now hold the misrouted files
mount /dev/sda2 /boot
then either
Code:
mv /mnt/tmpboot/* /boot
grub-mkconfig -o /boot/grub/grub.cfg
or (preferred)
Code:
grub-install /dev/sda2
if you want a manual kernel
Code:
eselect kernel set <your kernel choice>
mount /boot
cd /usr/src/linux
make
make modules_install
make install
with new manual kernel or not
Code:
grub-mkconfig -o /boot/grub/grub.cfg
If the files in /mnt/tmproot are moved or of no interest
Code:
rm -rf /mnt/tmproot
for cleanup, no typos 8O
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Thu May 03, 2018 12:17 am    Post subject: Reply with quote

Thank you - I could reboot from a "cleaned up" /boot and I'm still on 4.9.95.
eselect kernel list only has one entry: linux-4.9.95-gentoo.

How can I find out which of the kernels is booted? I still have only one entry in grub. :)
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7458
Location: Goose Creek SC

PostPosted: Thu May 03, 2018 4:11 am    Post subject: Reply with quote

uname -r is specific for running kernel version
uname -a reports more info including running kernel version
eselect kernel list reports what kernel sources have been emerged, ls /usr/src should provide the same list plus, as in my case:
Code:
ls /usr/src
linux  linux-4.16.6-gentoo  linux-4.17-rc3  x86_64-pc-linux-gnu

until you emerge a second kernel ebuild/package, eselect kernel list will report only one
until you build and add a second kernel to the boot partition (/dev/sda2 mounted at /boot) you and grub-mkconfig will be able to find only 4.9.95
"cleaned up /boot", a directory/mount point located on /dev/sda4, should be empty until /dev/sda2 is mounted there at which time it will show the contents of /dev/sda2
after I forgot to mount the boot partition on the /boot mount point for the umpteenth time I changed my /etc/fstab to remove noauto from the /boot entry. Subsequently, I stopped using a separate boot partition at all. The separate boot partition is a legacy from the era when BIOS' were unable to see a kernel that was not near the start of a hard disk.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pun_guin
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2018
Posts: 131

PostPosted: Thu May 03, 2018 9:17 pm    Post subject: Reply with quote

According to the Handbook, legacy boot systems should have one. I might try it without one once...
Thank you for your explanation! :)
_________________
I already use the new Genthree.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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