You are not logged in.

#1 2013-01-24 01:51:38

Spooky_36
Member
Registered: 2011-04-06
Posts: 8

Custom kernel does not boot.

Hi all, I recently changed to a laptop HP Pavilion G4, I installed Arch Linux and it works perfect, but I want to compile my own kernel to optimize the system a bit more.
I compiled a kernel in Gentoo sometimes, but I have no arch problems, I used the traditional method of compilation and all good, but I have a simple problem starting.

The kernel runs in "initramfs loading" and nothing happens, do not get errors or anything like that.
This is an image of what I have in /boot and /usr/lib/modules:
http://ompldr.org/vaDY0ZA/image.png
In case you wondered if you think the initramfs with mkinitcpio:

mkinitcpio -k 3.2.9-custom -g /boot/initramfs-compiled.img

And kernel config:

General setup  ---> 
    [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

The grub I think I have it configured correctly, these are the lines of the default kernel and the kernel compiled.

menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-5de5f584-af2b-47ff-84d6-c7adf842892f' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  5de5f584-af2b-47ff-84d6-c7adf842892f
        else
          search --no-floppy --fs-uuid --set=root 5de5f584-af2b-47ff-84d6-c7adf842892f
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /boot/vmlinuz-linux root=UUID=5de5f584-af2b-47ff-84d6-c7adf842892f ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux.img
}
 
menuentry 'Arch GNU/Linux, with Linux compiled' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-compiled-true-5de5f584-af2b-47ff-84d6-c7adf842892f' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  5de5f584-af2b-47ff-84d6-c7adf842892f
        else
          search --no-floppy --fs-uuid --set=root 5de5f584-af2b-47ff-84d6-c7adf842892f
        fi
        echo    'Loading Linux compiled ...'
        linux   /boot/vmlinuz-compiled root=UUID=5de5f584-af2b-47ff-84d6-c7adf842892f ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-compiled.img
}

I appreciate any help smile

Offline

#2 2013-01-24 04:22:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Custom kernel does not boot.

Unfortunately Spooky, this is some pretty sparse info to go off here.  Unfortunately, I don't think that you can actaully provide any more info that you already have there (besides possibly providing the whole config, which is probably not necessary) as in this stage, logging has not even started yet.

I have to ask though, is there some reason that you feel as though configuring your own kernel will bring benefits?  Because, in my head, it seems that using the provided kernel will only end up taking a touch more disk space with the extra unused modules.  I actually don't really think that it will make your machine any faster if you are just cutting out the fat. 

I can see the need for custom compilation if there are specific patches desired, but I don't think that it is entirely necessary in this case (at least with the info provided above).  Feel the love of your new binary distro home and go with it!

Oh an BTW, if you are interested, graysky maintains a great CK patched repo.  It works beautifully, and typically stays pretty close to the official repo's kernel.  Check out repo-ck on the wiki for more info.

Last edited by WonderWoofy (2013-01-24 04:23:37)

Offline

#3 2013-01-25 00:58:52

Spooky_36
Member
Registered: 2011-04-06
Posts: 8

Re: Custom kernel does not boot.

I'm not installing any custom patch, the idea of recompiling the kernel is to achieve a much faster boot, eliminating modules that do not really need and will use in this laptop ever.
I find it interesting the repo-ck, had never read about.

Offline

#4 2013-01-25 01:40:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Custom kernel does not boot.

But you are not going to achieve a faster boot by eliminating modules that are not going to be used/loaded anyway.  I can see a faster boot being achieved if you were compiling in order to eliminate the need for an initramfs, but it seems taht you are still using one anyway (besides, there are advantages to having and initramfs).  The modules you don't use will simply take up disk space, udev probes your hardware and only applies what you need.

Also if you think about the time you will save with your boot relative to the time it takes to configure and compile the kernel, it is not really worth it.  Say you only take compilation into account and it takes five minutes.  Then say that results in an amazing 2 second decrease in boot time.  It would take 150 boots to make that compilation worth the time.  Then with Arch's rolling release model, you will likely have a kernel update long before you ever get there.

I think a better idea might be to simply optimize what goes in your initramfs.  Falconindy made this blog post (reluctantly it seems) about just that.  I tried it before I started using device-mapper functions (which then require a bunch more stuff), and it actually made a noticeable difference.  The beauty of this is that the configuration will stay consistent between kernel versions, and will automatically be built after every kernel update.

Edit: Also, you really should check out the CK kernel, as graysky has made it so damn easy its ridiculous.  And it is pretty functionally amazing.

Last edited by WonderWoofy (2013-01-25 01:42:01)

Offline

Board footer

Powered by FluxBB