Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Using CD kernel instead of compiling kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Tue Apr 24, 2007 4:10 pm    Post subject: [SOLVED] Using CD kernel instead of compiling kernel Reply with quote

hi guys. I am trying to use the precomplied kernel from the minimal live cd. If so do i still need to emerge gentoo-sources?

Last edited by mazingaz on Fri Apr 27, 2007 4:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Tue Apr 24, 2007 4:52 pm    Post subject: Reply with quote

If you use the livecd kernel, you don't need any kernel sources to have a bootable system. But some packages may depend on the kernel sources. So, it's likely your system will want to install kernel sources at some point.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Tue Apr 24, 2007 5:24 pm    Post subject: Reply with quote

ic... then is there a way to have cd kernel source copied on to the boot?
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Tue Apr 24, 2007 5:40 pm    Post subject: Reply with quote

let me re-phrase that.
how can i copy cd kernel source into /usr/src/linux
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Tue Apr 24, 2007 6:32 pm    Post subject: Reply with quote

The big question is: why would you want to?
I have gotten a system to work using the kernel from the livecd before but I don't remember the exact steps. In the least you'll need to copy "gentoo.igz" and "gentoo" plus everything in /lib/modules to the right directories on the hard drive. I don't recommend this procedure.

A much nicer thing to do is to copy the kernel configuration from /proc - the file is named "config.gz" (it's compressed - you need to gunzip it) - you can use it to build your own kernel with the same options as the livecd one. If you don't like menuconfig - just use genkernel with the config file.

The syntax is:

Code:

genkernel --kernel-config=/path_to_your_config_file all
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Tue Apr 24, 2007 6:36 pm    Post subject: Reply with quote

In addition, what's in /usr/src/linux is the kernel source code. That's not what's being used to boot the system. The files in /boot are compiled binaries and that's what you need in order for Linux to boot. I don't believe the kernel source is included on the live CD.
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Tue Apr 24, 2007 7:06 pm    Post subject: Reply with quote

Hi All,
I think this might give problems emergeing some progs.
I know for sure there are some ebuilds that check the kernel
source files.
Try making the "linux" symlink in /usr/src to point to an older linux file or to something else
and nvidia for sure will refuse to install!
G.
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Tue Apr 24, 2007 7:42 pm    Post subject: Reply with quote

Gerard van Vuuren wrote:
Hi All,
I think this might give problems emergeing some progs.
I know for sure there are some ebuilds that check the kernel
source files.
Try making the "linux" symlink in /usr/src to point to an older linux file or to something else
and nvidia for sure will refuse to install!
G.


You're right. Anything that needs to compile a kernel module will die. That's one of the reasons I don't recommend that option.
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Tue Apr 24, 2007 8:16 pm    Post subject: Reply with quote

Ph0eniX wrote:
The big question is: why would you want to?
I have gotten a system to work using the kernel from the livecd before but I don't remember the exact steps. In the least you'll need to copy "gentoo.igz" and "gentoo" plus everything in /lib/modules to the right directories on the hard drive. I don't recommend this procedure.

A much nicer thing to do is to copy the kernel configuration from /proc - the file is named "config.gz" (it's compressed - you need to gunzip it) - you can use it to build your own kernel with the same options as the livecd one. If you don't like menuconfig - just use genkernel with the config file.

The syntax is:

Code:

genkernel --kernel-config=/path_to_your_config_file all


Isn't this same as method described in the handbook?

(Only do this if you are going to configure a 2.6 kernel)
# zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6

whenever I try to use genkernel I encounter a such difficult time executing framebuffer option in the grub.conf. However if i use cd kernel it works wonderfully.

vga=0x318 video=vesafb:mtrr:3,ywrap

I was never able to solve this.

This is the hardware i have

p3 750
256 ram
rage128
40 gig ide
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Tue Apr 24, 2007 8:39 pm    Post subject: Reply with quote

Try the ATI framebuffer instead of VESA:

Kernel config option:
Code:

CONFIG_FB_ATY128=y


grub.conf:
Code:

video=aty128fb:1600x1200-32@60


Just substitute the resolution, color depth and the refresh rate with the right values.
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Tue Apr 24, 2007 8:43 pm    Post subject: Reply with quote

Also, you can find grub.conf on the livecd in /mnt/cdrom/isolinux - the file is named isolinux.cfg. Just see what video options it uses.
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Tue Apr 24, 2007 9:34 pm    Post subject: Reply with quote

Dang..
After installing grub and writing the script shown in the handbook grub splash image fail to execute
as soon as it boots it will become blank and goes into the loading kernel with large console fonts.
I will uninstall grub and reinstall grub.
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Wed Apr 25, 2007 2:34 pm    Post subject: Reply with quote

mazingaz wrote:
Dang..
After installing grub and writing the script shown in the handbook grub splash image fail to execute
as soon as it boots it will become blank and goes into the loading kernel with large console fonts.
I will uninstall grub and reinstall grub.


Is that the ATI Rage Pro 128 card you're using? That's what one of my system has and it's running the ATI FB correctly (it worked fine with VESAFB in the past too). My current FB configuration is 1600x1200-32@60 and it's working fine.
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Wed Apr 25, 2007 7:46 pm    Post subject: Reply with quote

I was never able to use framebuffer with genkernel. I tired it with aty128fb vesafb-tng and none of them worked.
Here is one thing i am not too sure of. If i recompile the genkernel does it also create initramfs at boot?
what is the exact boot script have to be for the genkernel frambuffer option using vesafb?

currently I have it as following

root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.20-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /boot/initramfs-genkernel-x86-2.6.20-gentoo-r6 vga=0x318 video=vesafb:mtrr:3,ywrap (also tried with the livecd grub.conf vga=791 splash=silent)
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Thu Apr 26, 2007 4:23 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Kernel & Hardware.
Not about getting gentoo installed, so moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1227
Location: Massachusetts USA

PostPosted: Thu Apr 26, 2007 5:49 pm    Post subject: Reply with quote

mazingaz wrote:
currently I have it as following

root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.20-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /boot/initramfs-genkernel-x86-2.6.20-gentoo-r6 vga=0x318 video=vesafb:mtrr:3,ywrap (also tried with the livecd grub.conf vga=791 splash=silent)
should be
Code:
kernel /boot/kernel-genkernel-x86-2.6.20-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev vga=0x318 video=vesafb:mtrr:3,ywrap
initrd /boot/initramfs-genkernel-x86-2.6.20-gentoo-r6
"vga=0x318 video=vesafb:mtrr:3,ywrap" are kernel parameters not initrd.
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Fri Apr 27, 2007 2:41 pm    Post subject: Reply with quote

jburns wrote:
mazingaz wrote:
currently I have it as following

root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.20-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /boot/initramfs-genkernel-x86-2.6.20-gentoo-r6 vga=0x318 video=vesafb:mtrr:3,ywrap (also tried with the livecd grub.conf vga=791 splash=silent)
should be
Code:
kernel /boot/kernel-genkernel-x86-2.6.20-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev vga=0x318 video=vesafb:mtrr:3,ywrap
initrd /boot/initramfs-genkernel-x86-2.6.20-gentoo-r6
"vga=0x318 video=vesafb:mtrr:3,ywrap" are kernel parameters not initrd.


Good catch. That wouldn't work!
Back to top
View user's profile Send private message
mazingaz
n00b
n00b


Joined: 24 Jan 2006
Posts: 43

PostPosted: Fri Apr 27, 2007 4:19 pm    Post subject: Reply with quote

Thanks guys~ it worked...~~ you guys are a best
Back to top
View user's profile Send private message
Ph0eniX
Guru
Guru


Joined: 24 Sep 2004
Posts: 502
Location: New York, U.S.

PostPosted: Fri Apr 27, 2007 6:11 pm    Post subject: Reply with quote

mazingaz wrote:
Thanks guys~ it worked...~~ you guys are a best


Now try using the ATI frame buffer :twisted:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum