You are not logged in.
Hello,
Today I challenged myself to install "new" kernel for Arch Linux that is running in my VirtualBox.
Because (probably I'm stupid) my video drivers don't want to load, I'm doing everything from the command line(MORE CHALLENGING!)
So.. here how it goes.
Current kernel: 4.0.2-1-ARCH
pacman -s wget <-- to download the Kernel
wget https://kernel.....4.0.4...tar.xz
tar -xJf -linux-4.0.4 <-- skipping the verbose
make mrproper <-- Because suggested
make menuconfig
(no changes)-> <Save> -> enter(.config)->enter-> <Exit>
make -j2
make modules
make modules_install
make install <-- will fail (because cannot find Lilo) so....
cp arch/x86/boot/bzImage /boot/vmlinuz-4.0.4
mkinitcpio -k 4.0.4 -c /etc/mkinitcpio.conf -g /boot/initramfs-4.0.4.img
cp System.map /boot/System.map-4.0.4http://i.imgur.com/IvyfrqF.png----
grub-mkconfig -o /boot/grub/grub.cfg
http://i.imgur.com/WwmvNye.png----
grub:
http://i.imgur.com/UTIiaYR.pnghttp://i.imgur.com/kx3b05A.pngAdded the "echo 'Loaded?'" to check if it passes the initrd, and it does. Then it gets stuck
Inside grub advanced subcategory:
http://i.imgur.com/FzzXZ8Z.pngThe stuckerino:
http://i.imgur.com/dOqdtHi.png------
More info:
http://i.imgur.com/GHqb0Py.pnghttp://i.imgur.com/nhxwttp.pnghttp://i.imgur.com/vwHzq6s.pngPS: images as code because img tag gave me a hard time.....
PS2:I followed youtube videos without success
PS3:I read Grub manual/wiki
PS4:I searched on forums/ <-- used google search engine with failure
Last edited by KuchiKuu (2015-05-27 18:40:41)
Offline
Why are you doing this?
The current Arch kernel is version 4.0.4-2
https://www.archlinux.org/packages/?q=linux
So just use:
# pacman -Syu(read the news page first!)
Jin, Jîyan, Azadî
Offline
I want to install the kernel the "hard way" and my installation of Arch had 4.0.2 so it's worth doing to 4.0.4 as a "training"
Offline
Bump because I'm not giving up on this.
Plz review my problem and write suggestions.
I BELIEVE IN YOU ARCH GUYS!!!
Offline
First, don't bump. We regard it as being a bit rude. To bring focus to a thread, provide more information or tell us what you have learned prior to the last post.
Next, I get the impression you have not built a kernel before. make mrproper removes all configurations from the build. You then did a make menuconfig, but made no changes. In essence, you built a kernel with no modules selected beyond those that the kernel builds by default. I am not really sure what the mkinitcpio will do. It likely makes it so the default kernel won't boot.
It is possible to install multiple kernels side-by-side. You can also have multiple initrds to support those kernels.
I suggest you install the default kernel and get your system to boot.
Then, build a custom kernel. That kernel should have a different name than that of the stock kernel. The name is set in the kernel configuration.
You might want to consider building in all the modules you need to boot your kernel, that way you don't even need an initrd.
Install the custom kernel alongside the stock kernel. Configure your boot loader to allow you to select the kernel you want at boot time.
An excellent reference on how to build your own kernel is the Gentoo handbook.
Edit, oh, BTW, you can get the configuration of the running kernel as a baseline. It exists at /proc/congfig.gz (zcat /proc/config.gz)
Last edited by ewaller (2015-05-29 17:13:45)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I compiled kernel 4.0 a while ago by downloading the source from kernel.org and following this guide:
https://wiki.archlinux.org/index.php/Ke … raditional
Jin, Jîyan, Azadî
Offline
I needed to reinstall arch, and while I was installing it today, the new kernel 4.0.2-ARCH installed, so I downloaded the 4.1-rc6.
I did make mrproper
then, just like ewaller suggested the current config, I copied it ( zcat /proc/config.gz > .config ) <-- while being in the linux-4.1-rc6 directory after extracting it with tar)
and then.... I did make and something surprised me.
It prompted me many maaany times to select some "features" like
Support non-standard NVDIMMs and ADR protected memoty (x86_PMEM_LEGACY [N/y/?] (NEW)
Next header Compression Support (6LOWPAN_NHC) [M/n/?] (NEW)I just held Enter untill everything started compiling.
Then I copied the bzImage from arch/x86 folder, i made mkinitcpio, even System.map as suggested in the traditional compilation (link from Head_on_a_Stick)
updated grub with grub-mkconfig -o /boot/grub/grub.cfg
->Reboot
->Kernel panic
http://i.imgur.com/DXQY8Uq.pngMy main question is why it prompted me with the "features" and not just compiled kernel using my .config file (can be that 4.1 has new options which was missing in my main kernel?)
My side question is why kernel panic.
---------------
Not digging the topic, just updating on my journey.
----------------------
EDIT UPDATE:
removed the extracted folder, removed previous files from /boot (the new ones)
tar -xvjf linux-4.1-rc6.tar.xz
cd linux-4.1-rc6
make mrproper
make localmoduleconfig
->> Again prompts for the features, held enter.
make -j2
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-410test
mkinitcpio -k 4.1.0-rc6-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-410test.img
cp System.map /boot/System.map-410test
ln -sf /boot/System.map-410test /boot/System.map-->Restart
Same KERNEL PANIC
I want to cry :<
----------------
EDIT v2:
I downloaded kernel 4.0.4 (so it's like a downgrade because current is 4.0.4.2) and it compiled
AND IT BOOTED YAY
But still the current version while installing ARCH is 4.0.4.2 and I installed 4.0.4 so it feels like it works because they are "nearly" the same kernels.
Thus, I want to compile and then run the 4.1.0-rc6 but it dooooesn't wannnnt to :< Kernel Panic
PROBLEM SOLVED IN 50%
Last edited by KuchiKuu (2015-06-05 15:22:46)
Offline
Did you compile the modules?
# make modules_installJin, Jîyan, Azadî
Offline
yes.
...
make -j2
make modules_install
...as seen from the previous post. What worries me is that big prompt with the "features" maybe I'm not allowed to just press and hold enter untill it starts compiling
Offline
yes.
... make -j2 make modules_install ...as seen from the previous post. What worries me is that big prompt with the "features" maybe I'm not allowed to just press and hold enter untill it starts compiling
Ooops, sorry...
If you just press enter, the default option is selected.
Perhaps you should use `make nconfig` and make use of the "info" screen for all the extra options to help you decide whether it should be enabled or not.
There's also `make defconfig` but when I tried that with my Linux From Scratch system it disabled CONFIG_EFI_STUB ![]()
Jin, Jîyan, Azadî
Offline
Can't I just somehow enable EVERYTHING and then wait 2 days for it to compile and then check if it boots?
Last edited by KuchiKuu (2015-06-07 13:28:45)
Offline
I don't think the problem is your kernel. What did you do about your initrd? Did you create a new one for your new kernel?
A bit of an explanation. The kernel does not need an initrd to boot. One can build a kernel with every module built in that is required to boot and run on a specific system. The problem is, how does one build a kernel that supports all manner of hardware without becoming gargantuan? Most of the drivers would never be used -- PCI-e drivers on systems without PCI-e, ISA and LPC drivers on systems that don't have those. USB 3.0 drivers / audio / sata / SCSI, UARTS, etc....
The answer is you use modules that can be dynamically loaded from disk when they are needed. A kernel looks for its modules in /usr/lib/modules in a directory that has the same name as the kernel. The Arch configuration that you used defines which modules are built and stored in that directory. IF YOU DO NOT CHANGE THE NAME OF THE KERNEL you will overwrite those modules with yours. When you built the new kernel, since it is a different version, there is probably a new directory that was created when you did make modules_install. If Arch ever uses that version number, pacman will fail due to the files existing in the file system. But that is another matter.
But, what happens at boot time? You can build in the modules that your system needs, you can boot without an initrd. Or, if you want to use a kernel that does not have all the drivers for your hardware built in, then the kernel needs access to a "disk" that contains the needed modules. This is accomplished using an initrd. When you run mkinitcpio, it builds an initrd for the Arch stock kernel. It will not have the drivers that your kernel needs. It sounds like this is what is happening to you -- your kernel cannot find it's modules in that initrd.
To make this work, you need to either build a kernel that has the required drivers built in and not use an initrd, or you need to build an initrd, with a different name, that contains the modules for your kernel. That initrd needs to be moved to your boot partition, and your bootloader configuration needs to have an entry for your kernel that invokes the initrd that contains the appropriate modules.
Please carefully read man mkinitcpio
Last edited by ewaller (2015-06-07 16:09:16)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Can't I just somehow enable EVERYTHING and then wait 2 days for it to compile and then check if it boots?
This is a bad idea. Actually, I think the answer is no. But yes, all those questions were because of new options in the kernel.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline