You are not logged in.

#1 2015-05-27 18:36:56

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Probably another "Loading ramdisk" related problem

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.4
http://i.imgur.com/IvyfrqF.png

----
grub-mkconfig -o /boot/grub/grub.cfg

http://i.imgur.com/WwmvNye.png

----
grub:

http://i.imgur.com/UTIiaYR.png
http://i.imgur.com/kx3b05A.png

Added 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.png

The stuckerino:

http://i.imgur.com/dOqdtHi.png

------
More info:

http://i.imgur.com/GHqb0Py.png
http://i.imgur.com/nhxwttp.png
http://i.imgur.com/vwHzq6s.png

PS: 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

#2 2015-05-27 19:47:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Probably another "Loading ramdisk" related problem

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

#3 2015-05-27 20:07:29

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Re: Probably another "Loading ramdisk" related problem

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

#4 2015-05-29 15:16:31

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Re: Probably another "Loading ramdisk" related problem

Bump because I'm not giving up on this.

Plz review my problem and write suggestions.

I BELIEVE IN YOU ARCH GUYS!!!

Offline

#5 2015-05-29 17:08:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,546

Re: Probably another "Loading ramdisk" related problem

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

#6 2015-05-29 19:47:05

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Probably another "Loading ramdisk" related problem

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

#7 2015-06-05 12:48:22

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Re: Probably another "Loading ramdisk" related problem

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.png

My 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

#8 2015-06-05 18:48:19

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Probably another "Loading ramdisk" related problem

Did you compile the modules?

# make modules_install

https://wiki.archlinux.org/index.php/Ke … ll_modules


Jin, Jîyan, Azadî

Offline

#9 2015-06-05 19:20:49

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Re: Probably another "Loading ramdisk" related problem

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

#10 2015-06-05 19:26:28

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,999
Website

Re: Probably another "Loading ramdisk" related problem

KuchiKuu wrote:

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 hmm


Jin, Jîyan, Azadî

Offline

#11 2015-06-07 13:28:17

KuchiKuu
Member
Registered: 2015-05-27
Posts: 16

Re: Probably another "Loading ramdisk" related problem

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

#12 2015-06-07 16:07:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,546

Re: Probably another "Loading ramdisk" related problem

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

#13 2015-06-07 16:10:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,546

Re: Probably another "Loading ramdisk" related problem

KuchiKuu wrote:

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

Board footer

Powered by FluxBB