You are not logged in.

#1 2015-02-19 19:52:14

altiris
Member
Registered: 2014-12-23
Posts: 50

[SOLVED] Trouble creating a ramdisk for my custom kernel

Alright so I am compiling my own kernel and have been following the wiki here, https://wiki.archlinux.org/index.php/Ke … l_RAM_disk and I am stuck at that part, making a ramdisk for the kernel. The step before that, which was to copy bzimage to /boot and rename it the kernel name worked successfully. I am confused by the command the wiki gives me,

mkinitcpio -k FullKernelName -c /etc/mkinitcpio.conf -g /boot/initramfs-YourKernelName.img

what do I replace FullKernelName with? I tried running

mkinitcpio -k FullKernelName -c /etc/mkinitcpio.conf -g /boot/initramfs-vmlinuz-3.18.0-ARCH2

just for the hell of it and I get

==> ERROR: '/lib/modules/FullKernelName' is not a valid kernel module directory

which is correct, as I dont have a file named FullKernelName however in my lib/modules directory I don't have any file for the kernel or anything. Did I do something wrong when compiling?

Last edited by altiris (2015-02-20 23:02:27)

Offline

#2 2015-02-19 21:14:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

Look into your current /lib/modules/ for hints.

Offline

#3 2015-02-19 22:16:08

altiris
Member
Registered: 2014-12-23
Posts: 50

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

karol wrote:

Look into your current /lib/modules/ for hints.

Uh actually, I think I forgot to write that I dont even have a modules folder in /lib how is that possible....I ran all of the commands

Offline

#4 2015-02-19 22:29:35

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

What was the output of

make modules_install

"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace

Offline

#5 2015-02-19 22:37:39

snakeroot
Member
Registered: 2012-10-06
Posts: 177

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

what do I replace FullKernelName with?

Run the following command in the directory in which you built your kernel:

$make kernelrelease

The result should be your FullKernelName.

Regards,

Offline

#6 2015-02-19 23:15:43

altiris
Member
Registered: 2014-12-23
Posts: 50

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

Heh I am funny. I thought by /lib/modules it was referring to that in my kernelbuild directory but it was referring to root. I will just do everything from scratch and re-try.

EDIT: Got it now its working big_smile I think a little note should be added that mkinitcpio is referring to the root /lib/modules although maybe I just wasn't noticing that it had / and not lib/modules

Last edited by altiris (2015-02-19 23:19:57)

Offline

#7 2015-02-20 12:23:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Trouble creating a ramdisk for my custom kernel

Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

Board footer

Powered by FluxBB