* [gentoo-user] system.map file in /boot. How to manage?
@ 2021-07-01 6:59 Dale
2021-07-01 7:22 ` William Kenworthy
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Dale @ 2021-07-01 6:59 UTC (permalink / raw
To: gentoo-user
Howdy,
The subject line pretty much describes this. How does one manage the
system.map file in /boot? Is it needed? Should it be updated with each
kernel? I tend to keep 2 to 3 kernels installed. I tend to keep 2 that
I know are stable and one testing. After a while, I may remove the
oldest one and only have two, just in case. Should I version the
system.map file the same as kernels? Does just one with no version get
the job done? Update the file with each kernel upgrade or install one
and done?
While at it, what does it even do? If it needs it, it doesn't matter
but just curious.
Thanks for any tips on this.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 6:59 [gentoo-user] system.map file in /boot. How to manage? Dale
@ 2021-07-01 7:22 ` William Kenworthy
2021-07-01 11:16 ` Dr Rainer Woitok
2021-07-02 23:07 ` Daniel Frey
2 siblings, 0 replies; 15+ messages in thread
From: William Kenworthy @ 2021-07-01 7:22 UTC (permalink / raw
To: gentoo-user
There is a lot online - basically its optional and needed just in case
(!) and should be versioned like its matching kernel and initrd.
BillK
one of many refs:
https://stackoverflow.com/questions/28936630/what-is-the-need-of-having-both-system-map-file-and-proc-kallsyms
On 1/7/21 2:59 pm, Dale wrote:
> Howdy,
>
> The subject line pretty much describes this. How does one manage the
> system.map file in /boot? Is it needed? Should it be updated with each
> kernel? I tend to keep 2 to 3 kernels installed. I tend to keep 2 that
> I know are stable and one testing. After a while, I may remove the
> oldest one and only have two, just in case. Should I version the
> system.map file the same as kernels? Does just one with no version get
> the job done? Update the file with each kernel upgrade or install one
> and done?
>
> While at it, what does it even do? If it needs it, it doesn't matter
> but just curious.
>
> Thanks for any tips on this.
>
> Dale
>
> :-) :-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 6:59 [gentoo-user] system.map file in /boot. How to manage? Dale
2021-07-01 7:22 ` William Kenworthy
@ 2021-07-01 11:16 ` Dr Rainer Woitok
2021-07-01 12:41 ` tastytea
2021-07-01 14:28 ` Neil Bothwick
2021-07-02 23:07 ` Daniel Frey
2 siblings, 2 replies; 15+ messages in thread
From: Dr Rainer Woitok @ 2021-07-01 11:16 UTC (permalink / raw
To: gentoo-user, Dale
Dale,
On Thursday, 2021-07-01 01:59:57 -0500, you wrote:
> ...
>
> The subject line pretty much describes this. How does one manage the
> system.map file in /boot? Is it needed? Should it be updated with each
> kernel? I tend to keep 2 to 3 kernels installed.
Same here. And whenever I configure a new kernel my kernel managing
script makes sure both, the kernel I'm currenty running on and the one
just configured are in "@world". That way "emerge --depclean" will nev-
er remove a kernel package.
When I finally decide to explicitly remove a kernel my kernel managing
script will basically execute this before calling "grub-mkconfig":
# Argument 1 must contain slot number of kernel to be removed.
emerge --deselect --quiet sys-kernel/gentoo-sources:$1
rm -fr /lib/modules/$1-gentoo /boot/*-$1-gentoo{,.old} \
/usr/src/linux-$1-gentoo
This is stuff I somewhere picked up from the Gentoo Handbook when I did
my first Gentoo install.
> ...
> Should I version the
> system.map file the same as kernels?
Not sure about that. Mine ARE versioned. That's probably what "grub-
mkconfig" is doing by default.
Sincerely,
Rainer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 11:16 ` Dr Rainer Woitok
@ 2021-07-01 12:41 ` tastytea
2021-07-01 13:01 ` Dale
2021-07-01 14:28 ` Neil Bothwick
1 sibling, 1 reply; 15+ messages in thread
From: tastytea @ 2021-07-01 12:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
On 2021-07-01 13:16+0200 Dr Rainer Woitok <rainer.woitok@gmail.com>
wrote:
> Dale,
>
> On Thursday, 2021-07-01 01:59:57 -0500, you wrote:
>
> > ...
> > Should I version the
> > system.map file the same as kernels?
>
> Not sure about that. Mine ARE versioned. That's probably what
> "grub- mkconfig" is doing by default.
I compile kernels with `genkernel`, and it produces versioned files:
System.map-5.4.97-gentoo-x86_64
System.map-5.10.27-gentoo-x86_64
initramfs-5.4.97-gentoo-x86_64.img
initramfs-5.10.27-gentoo-x86_64.img
vmlinuz-5.4.97-gentoo-x86_64
vmlinuz-5.10.27-gentoo-x86_64
Kind regards, tastytea
--
Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at
<https://tastytea.de/tastytea.asc>.
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 12:41 ` tastytea
@ 2021-07-01 13:01 ` Dale
0 siblings, 0 replies; 15+ messages in thread
From: Dale @ 2021-07-01 13:01 UTC (permalink / raw
To: gentoo-user
tastytea wrote:
> On 2021-07-01 13:16+0200 Dr Rainer Woitok <rainer.woitok@gmail.com>
> wrote:
>
>> Dale,
>>
>> On Thursday, 2021-07-01 01:59:57 -0500, you wrote:
>>
>>> ...
>>> Should I version the
>>> system.map file the same as kernels?
>> Not sure about that. Mine ARE versioned. That's probably what
>> "grub- mkconfig" is doing by default.
> I compile kernels with `genkernel`, and it produces versioned files:
> System.map-5.4.97-gentoo-x86_64
> System.map-5.10.27-gentoo-x86_64
> initramfs-5.4.97-gentoo-x86_64.img
> initramfs-5.10.27-gentoo-x86_64.img
> vmlinuz-5.4.97-gentoo-x86_64
> vmlinuz-5.10.27-gentoo-x86_64
>
> Kind regards, tastytea
>
This info is helpful. I tend to do mine by hand, I may only upgrade my
kernel once, maybe twice, a year. I don't reboot very often so there is
no point in upgrading every time a new one comes out. After reading
this, I've copied over the proper system.map files and versioned them to
match the kernel names. I'll run grub-mkconfig just in case shortly.
I've always had *A* file there but never copied newer versions over
before. Honestly, I didn't know if it was needed or not. It has a lot
of info in it tho so I figured it wise to ask.
Thanks to all for the info. Now I have a better understanding of what I
need to do and how.
Dale
:-) :-)
P. S. Back to the woods. Putting out fertilizer for the trees.
Supposed to rain in the next day or so.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 11:16 ` Dr Rainer Woitok
2021-07-01 12:41 ` tastytea
@ 2021-07-01 14:28 ` Neil Bothwick
2021-07-01 14:41 ` Dale
2021-07-01 15:13 ` Dr Rainer Woitok
1 sibling, 2 replies; 15+ messages in thread
From: Neil Bothwick @ 2021-07-01 14:28 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]
On Thu, 1 Jul 2021 13:16:29 +0200, Dr Rainer Woitok wrote:
> Same here. And whenever I configure a new kernel my kernel managing
> script makes sure both, the kernel I'm currenty running on and the one
> just configured are in "@world". That way "emerge --depclean" will nev-
> er remove a kernel package.
You can also do that with sets. Add this to sets.conf
[kernels]
class = portage.sets.dbapi.OwnerSet
world-candidate = False
files = /usr/src
add emerge -n @kernels once. Then depclean will never touch a kernel
source package.
> > ...
> > Should I version the
> > system.map file the same as kernels?
>
> Not sure about that. Mine ARE versioned. That's probably what "grub-
> mkconfig" is doing by default.
grub-mkconfig only reads the files, it is the make install step of kernel
installation that takes care of copying the files to /boot with the
correct version numbers. ISTR Dale prefers to copy the kernel files
manually, which is why his System.map is not versioned.
--
Neil Bothwick
Suborbital Ballistic-Propulsion Engineer
Not Exactly A Rocket Scientist
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 14:28 ` Neil Bothwick
@ 2021-07-01 14:41 ` Dale
2021-07-01 15:04 ` Neil Bothwick
2021-07-01 15:13 ` [gentoo-user] " antlists
2021-07-01 15:13 ` Dr Rainer Woitok
1 sibling, 2 replies; 15+ messages in thread
From: Dale @ 2021-07-01 14:41 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Thu, 1 Jul 2021 13:16:29 +0200, Dr Rainer Woitok wrote:
>
>> Same here. And whenever I configure a new kernel my kernel managing
>> script makes sure both, the kernel I'm currenty running on and the one
>> just configured are in "@world". That way "emerge --depclean" will nev-
>> er remove a kernel package.
> You can also do that with sets. Add this to sets.conf
>
> [kernels]
> class = portage.sets.dbapi.OwnerSet
> world-candidate = False
> files = /usr/src
>
> add emerge -n @kernels once. Then depclean will never touch a kernel
> source package.
>
>>> ...
>>> Should I version the
>>> system.map file the same as kernels?
>> Not sure about that. Mine ARE versioned. That's probably what "grub-
>> mkconfig" is doing by default.
> grub-mkconfig only reads the files, it is the make install step of kernel
> installation that takes care of copying the files to /boot with the
> correct version numbers. ISTR Dale prefers to copy the kernel files
> manually, which is why his System.map is not versioned.
>
>
I do copy mine manually. It's how it was done when I first started
using Gentoo and I just stuck with it, it works. It's just one
additional file. Thing is, I may read up on the script way of doing
things. It may help make dracut and grub-mkconfig happy. Sometimes I
have to fiddle with names to get them both happy. I suspect the script
tools handle that with ease.
Now I got to go find that signature about the cat and free bagpipes. I
want to send that to a friend. She'll get a kick out of that. lol
Dale
:-) :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 14:41 ` Dale
@ 2021-07-01 15:04 ` Neil Bothwick
2021-07-01 15:14 ` [gentoo-user] " Grant Edwards
2021-07-01 15:13 ` [gentoo-user] " antlists
1 sibling, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2021-07-01 15:04 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
On Thu, 1 Jul 2021 09:41:27 -0500, Dale wrote:
> > grub-mkconfig only reads the files, it is the make install step of
> > kernel installation that takes care of copying the files to /boot
> > with the correct version numbers. ISTR Dale prefers to copy the
> > kernel files manually, which is why his System.map is not versioned.
> I do copy mine manually. It's how it was done when I first started
> using Gentoo and I just stuck with it, it works. It's just one
> additional file. Thing is, I may read up on the script way of doing
> things. It may help make dracut and grub-mkconfig happy. Sometimes I
> have to fiddle with names to get them both happy. I suspect the script
> tools handle that with ease.
make install names the files in a way that dracut and grub-mkconfig
recognise. Just run make install after make modules install. You've let
the makefile copy all the other files, you may as well let it handle the
final two :)
--
Neil Bothwick
By the time you can make ends meet, they move the ends.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 14:28 ` Neil Bothwick
2021-07-01 14:41 ` Dale
@ 2021-07-01 15:13 ` Dr Rainer Woitok
1 sibling, 0 replies; 15+ messages in thread
From: Dr Rainer Woitok @ 2021-07-01 15:13 UTC (permalink / raw
To: gentoo-user, Neil Bothwick
Neil,
On Thursday, 2021-07-01 15:28:51 +0100, you wrote:
> On Thu, 1 Jul 2021 13:16:29 +0200, Dr Rainer Woitok wrote:
>
> > Same here. And whenever I configure a new kernel my kernel managing
> > script makes sure both, the kernel I'm currenty running on and the one
> > just configured are in "@world". That way "emerge --depclean" will nev-
> > er remove a kernel package.
>
> You can also do that with sets. Add this to sets.conf
>
> [kernels]
> class = portage.sets.dbapi.OwnerSet
> world-candidate = False
> files = /usr/src
>
> add emerge -n @kernels once. Then depclean will never touch a kernel
> source package.
Nice trick, thank you :-). This would slightly simplify my kernel man-
aging script.
Sincerely,
Rainer
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 14:41 ` Dale
2021-07-01 15:04 ` Neil Bothwick
@ 2021-07-01 15:13 ` antlists
1 sibling, 0 replies; 15+ messages in thread
From: antlists @ 2021-07-01 15:13 UTC (permalink / raw
To: gentoo-user
On 01/07/2021 15:41, Dale wrote:
> I do copy mine manually. It's how it was done when I first started
> using Gentoo and I just stuck with it, it works. It's just one
> additional file.
I copied my kernels manually to start with. Then I discovered "make
install". (and "make modules_install"). Much simpler.
And you don't need to muck about with grub.cfg by hand either. I think
I'm going to switch to grub-mkconfig, because you can always output it
to a new file to sanity-check before you send it live (and back up the
old one, so you can always recover ...).
Cheers,
Wol
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-user] Re: system.map file in /boot. How to manage?
2021-07-01 15:04 ` Neil Bothwick
@ 2021-07-01 15:14 ` Grant Edwards
2021-07-01 15:47 ` Hayley
0 siblings, 1 reply; 15+ messages in thread
From: Grant Edwards @ 2021-07-01 15:14 UTC (permalink / raw
To: gentoo-user
On 2021-07-01, Neil Bothwick <neil@digimed.co.uk> wrote:
> make install names the files in a way that dracut and grub-mkconfig
> recognise. Just run make install after make modules install. You've let
> the makefile copy all the other files, you may as well let it handle the
> final two :)
IIRC, "make install" requiers /sbin/installkernel -- an executable
that's provided by one of installkernel-gentoo-3, debianutils, or
installkernel-systemd-boot. Back in the day, a base installation
didn't have /sbin/installkernel, and you needed to install it
manually. Has that changed?
--
Grant
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Re: system.map file in /boot. How to manage?
2021-07-01 15:14 ` [gentoo-user] " Grant Edwards
@ 2021-07-01 15:47 ` Hayley
0 siblings, 0 replies; 15+ messages in thread
From: Hayley @ 2021-07-01 15:47 UTC (permalink / raw
To: gentoo-user
On Thu, 2021-07-01 at 15:14 +0000, Grant Edwards wrote:
> On 2021-07-01, Neil Bothwick <neil@digimed.co.uk> wrote:
>
> > make install names the files in a way that dracut and grub-mkconfig
> > recognise. Just run make install after make modules install. You've
> > let
> > the makefile copy all the other files, you may as well let it handle
> > the
> > final two :)
>
> IIRC, "make install" requiers /sbin/installkernel -- an executable
> that's provided by one of installkernel-gentoo-3, debianutils, or
> installkernel-systemd-boot. Back in the day, a base installation
> didn't have /sbin/installkernel, and you needed to install it
> manually. Has that changed?
>
> --
> Grant
>
>
The handbook says that sys-kernel/installkernel-gentoo should be
installed by default. [1]
Just throw in my 2 cents, I use genkernel to manage compiling and
installing the kernel. With a little configuring you can get it to
compile, install and run grub-mkconfig for you. That way I can't forget
to run grub-mkconfig or something.
Hayley
[1]
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Installing_correct_installkernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-01 6:59 [gentoo-user] system.map file in /boot. How to manage? Dale
2021-07-01 7:22 ` William Kenworthy
2021-07-01 11:16 ` Dr Rainer Woitok
@ 2021-07-02 23:07 ` Daniel Frey
2021-07-02 23:54 ` Dale
2 siblings, 1 reply; 15+ messages in thread
From: Daniel Frey @ 2021-07-02 23:07 UTC (permalink / raw
To: gentoo-user
On 6/30/21 11:59 PM, Dale wrote:
> Howdy,
>
> The subject line pretty much describes this. How does one manage the
> system.map file in /boot? Is it needed? Should it be updated with each
> kernel? I tend to keep 2 to 3 kernels installed. I tend to keep 2 that
> I know are stable and one testing. After a while, I may remove the
> oldest one and only have two, just in case. Should I version the
> system.map file the same as kernels? Does just one with no version get
> the job done? Update the file with each kernel upgrade or install one
> and done?
>
> While at it, what does it even do? If it needs it, it doesn't matter
> but just curious.
>
> Thanks for any tips on this.
>
> Dale
>
> :-) :-)
>
I never copy it over unless I have some kernel panic (so not for well
over a decade.) So there's nothing for me to manage (I only copy the
kernel and kernel config to /boot.)
Dan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-02 23:07 ` Daniel Frey
@ 2021-07-02 23:54 ` Dale
2021-07-03 9:11 ` J. Roeleveld
0 siblings, 1 reply; 15+ messages in thread
From: Dale @ 2021-07-02 23:54 UTC (permalink / raw
To: gentoo-user
Daniel Frey wrote:
> On 6/30/21 11:59 PM, Dale wrote:
>> Howdy,
>>
>> The subject line pretty much describes this. How does one manage the
>> system.map file in /boot? Is it needed? Should it be updated with each
>> kernel? I tend to keep 2 to 3 kernels installed. I tend to keep 2 that
>> I know are stable and one testing. After a while, I may remove the
>> oldest one and only have two, just in case. Should I version the
>> system.map file the same as kernels? Does just one with no version get
>> the job done? Update the file with each kernel upgrade or install one
>> and done?
>>
>> While at it, what does it even do? If it needs it, it doesn't matter
>> but just curious.
>>
>> Thanks for any tips on this.
>>
>> Dale
>>
>> :-) :-)
>>
>
> I never copy it over unless I have some kernel panic (so not for well
> over a decade.) So there's nothing for me to manage (I only copy the
> kernel and kernel config to /boot.)
>
> Dan
>
>
>
So if it isn't there or something, it isn't going to break anything.
That's good to know too.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] system.map file in /boot. How to manage?
2021-07-02 23:54 ` Dale
@ 2021-07-03 9:11 ` J. Roeleveld
0 siblings, 0 replies; 15+ messages in thread
From: J. Roeleveld @ 2021-07-03 9:11 UTC (permalink / raw
To: gentoo-user
On Saturday, July 3, 2021 1:54:13 AM CEST Dale wrote:
> Daniel Frey wrote:
> > On 6/30/21 11:59 PM, Dale wrote:
> >> Howdy,
> >>
> >> The subject line pretty much describes this. How does one manage the
> >> system.map file in /boot? Is it needed? Should it be updated with each
> >> kernel? I tend to keep 2 to 3 kernels installed. I tend to keep 2 that
> >> I know are stable and one testing. After a while, I may remove the
> >> oldest one and only have two, just in case. Should I version the
> >> system.map file the same as kernels? Does just one with no version get
> >> the job done? Update the file with each kernel upgrade or install one
> >> and done?
> >>
> >> While at it, what does it even do? If it needs it, it doesn't matter
> >> but just curious.
> >>
> >> Thanks for any tips on this.
> >>
> >> Dale
> >>
> >> :-) :-)
> >
> > I never copy it over unless I have some kernel panic (so not for well
> > over a decade.) So there's nothing for me to manage (I only copy the
> > kernel and kernel config to /boot.)
> >
> > Dan
>
> So if it isn't there or something, it isn't going to break anything.
> That's good to know too.
I only copy the kernel image (and initrd if required)
I haven't done anything with the System.map or config (apart from keeping it
updated for compiling the kernel) in over a decade.
My boot-partition isn't even mounted unless I update the kernel, so a file
there wouldn't even be visible to the system.
--
Joost
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-07-03 9:12 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-01 6:59 [gentoo-user] system.map file in /boot. How to manage? Dale
2021-07-01 7:22 ` William Kenworthy
2021-07-01 11:16 ` Dr Rainer Woitok
2021-07-01 12:41 ` tastytea
2021-07-01 13:01 ` Dale
2021-07-01 14:28 ` Neil Bothwick
2021-07-01 14:41 ` Dale
2021-07-01 15:04 ` Neil Bothwick
2021-07-01 15:14 ` [gentoo-user] " Grant Edwards
2021-07-01 15:47 ` Hayley
2021-07-01 15:13 ` [gentoo-user] " antlists
2021-07-01 15:13 ` Dr Rainer Woitok
2021-07-02 23:07 ` Daniel Frey
2021-07-02 23:54 ` Dale
2021-07-03 9:11 ` J. Roeleveld
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox