Kernel sources for current kernel?
-
- Posts: 9
- Joined: Sun Mar 24, 2019 6:36 pm
Kernel sources for current kernel?
Hi,
I want to use my own .config. Where do I get the kernel source from for 4.19.5? I need the headers for it too for installing Virtualbox. Would like to install the lasted VB 6.0. Will 4.19.5 work?
I want to use my own .config. Where do I get the kernel source from for 4.19.5? I need the headers for it too for installing Virtualbox. Would like to install the lasted VB 6.0. Will 4.19.5 work?
Re: Kernel sources for current kernel?
VirtualBox 6.0.4 is already in the testing repository. I suggest you use that rather than installing your own that you got from somewhere else.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
-
- Posts: 9
- Joined: Sun Mar 24, 2019 6:36 pm
Re: Kernel sources for current kernel?
Thank you! Do you know where I can get the kernel source from?
Re: Kernel sources for current kernel?
Probably from the source repositories, I would imagine. They would need to be enabled in MX Repo Manager. I haven't done so, so I don't know if kernel sources are there or not.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.
Re: Kernel sources for current kernel?
Vbox 6.X will build on the 4.19 kernel, even up to the 5.0 kernel.mxlinuzuzer wrote: ↑Sun Mar 24, 2019 7:14 pm Hi,
I want to use my own .config. Where do I get the kernel source from for 4.19.5? I need the headers for it too for installing Virtualbox. Would like to install the lasted VB 6.0. Will 4.19.5 work?
If you're going to build your own kernel, you also have to build and install your own headers. MX already has the MX kernel headers installed.
You can get the kernel source by running
Code: Select all
sudo apt-get install linux-source-4.19
which will install it into /usr/src. I would recommend moving it out of /usr/src to your home folder if you want to work on it.Description: Linux kernel source for version 4.19 with Debian patches
This package provides source code for the Linux kernel version 4.19. This
source closely tracks official Linux kernel releases. Debian's
modifications to that source consist of security fixes, bug fixes, and
features that have already been (or are believed to be) accepted by the
upstream maintainers.
There are also methods of getting it with "sudo apt-get source", or just get the orig.tar.xz tarball from our repo, which is the original unaltered source direct from upstream. http://mxrepo.com/mx/repo/pool/main/l/linux/
I do have questions about what procedure you plan to use to build the kernel, though, and what you want to change in the config. You probably should also look into using a newer 4.19 kernel source from our test repo, or even linux-source-4.20 from there, for security and bugfix reasons.
We backport upstream Debian kernels for MX using the Debian packaging system, which do take quite a while to build on older machines and need over 40 GB of free space on the hard drive. Liquorix kernels, even though they enable more drivers than Debian, are much faster to build and take maybe 7 GB of free space.
-
- Posts: 9
- Joined: Sun Mar 24, 2019 6:36 pm
Re: Kernel sources for current kernel?
Thank you! I have compiled 5.0.4 without root, and is running it now, but there's no kernel headers for it.
Re: Kernel sources for current kernel?
What commands did you use to manually build it? Often you have to add something like "enable-headers" to get a separate header package. We really can't troubleshoot the procedure without any details.
-
- Posts: 9
- Joined: Sun Mar 24, 2019 6:36 pm
Re: Kernel sources for current kernel?
Thanks for helping me.
wget the source from kernel,org. Verified it and extracted it.
Copied the .config backup to ~/Downloads/linux-5.0.4/
as the .config was made from an earlier kernel version.
Output from that is
When installing VB 6.0
Removed 5.0.4, and installed the headers for 4.20.12, and success. Now I only need the sources for that kernel, so I can use my own .config. :)
wget the source from kernel,org. Verified it and extracted it.
Copied the .config backup to ~/Downloads/linux-5.0.4/
Code: Select all
sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev
Code: Select all
make oldconfig
Code: Select all
make -j4
Code: Select all
sudo make modules_install
Code: Select all
sudo make install
Code: Select all
sh ./arch/x86/boot/install.sh 5.0.4 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.0.4 /boot/vmlinuz-5.0.4
run-parts: executing /etc/kernel/postinst.d/dkms 5.0.4 /boot/vmlinuz-5.0.4
Error! Bad return status for module build on kernel: 5.0.4 (x86_64)
Consult /var/lib/dkms/virtualbox-guest/5.2.24/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.0.4 /boot/vmlinuz-5.0.4
update-initramfs: Generating /boot/initrd.img-5.0.4
run-parts: executing /etc/kernel/postinst.d/pm-utils 5.0.4 /boot/vmlinuz-5.0.4
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.0.4 /boot/vmlinuz-5.0.4
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.0.4 /boot/vmlinuz-5.0.4
Generating grub configuration file ...
using custom appearance settings
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-5.0.4
Found initrd image: /boot/initrd.img-5.0.4
Found linux image: /boot/vmlinuz-5.0.4.old
Found initrd image: /boot/initrd.img-5.0.4
Found linux image: /boot/vmlinuz-4.20.12-antix.1-amd64-smp
Found initrd image: /boot/initrd.img-4.20.12-antix.1-amd64-smp
Found memtest86+ image: /memtest86+.bin
done
Code: Select all
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
Last edited by mxlinuzuzer on Sun Mar 24, 2019 11:02 pm, edited 1 time in total.
Re: Kernel sources for current kernel?
I use this to create debs:
Code: Select all
make -j4 deb-pkg
-
- Posts: 9
- Joined: Sun Mar 24, 2019 6:36 pm
Re: Kernel sources for current kernel?
Thank you :)Adrian wrote: ↑Sun Mar 24, 2019 10:41 pm I use this to create debs:Code: Select all
make -j4 deb-pkg
Code: Select all
sudo make install
Messed around so much now that I will have to reinstall tomorrow. :)