LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   cant compile/install the kernel in the LiveCD i686 install (https://www.linuxquestions.org/questions/gentoo-87/cant-compile-install-the-kernel-in-the-livecd-i686-install-732735/)

tonye 06-13-2009 02:10 PM

cant compile/install the kernel in the LiveCD i686 install
 
I can not install a new kernel, even if i do all the instructions in the handbook, i still come out with the same livecd kernel. i ran make && make_mod... and genkernel. it just keep booting in the livecd kernel. I cant use the minimal installer because I use a atheros card and it wont pick that up.

d2_racing 06-13-2009 09:26 PM

Hi, you should try the latest SystemRescueCD LiveCD, it's Gentoo based and it has a pretty recent kernel.

NeddySeagoon 06-14-2009 08:35 AM

tonye,

Did you remember to mount /boot if you have a real boot partition ?

Did you update /boot/grub/grub.conf to point to the new kernel (and initrd) file(s) in /boot ?
You should copy the existing

Code:

title ...
root ....
kernel ...
initrd ...

lines to the end of grub.conf and change the title, so you know which kernel will be booted and the kernel and initrd file names to point to the new kernel.
Now you have a choice at boot time, just in case your new kernel fails to boot

tonye 06-14-2009 11:07 AM

Quote:

Originally Posted by NeddySeagoon (Post 3573437)
tonye,

Did you remember to mount /boot if you have a real boot partition ?

Did you update /boot/grub/grub.conf to point to the new kernel (and initrd) file(s) in /boot ?
You should copy the existing

Code:

title ...
root ....
kernel ...
initrd ...

lines to the end of grub.conf and change the title, so you know which kernel will be booted and the kernel and initrd file names to point to the new kernel.
Now you have a choice at boot time, just in case your new kernel fails to boot

i ran all that through chroot with a livecd. I mounted /boot even in chroot. I did "mount -o bind /dev /mnt/sda3/dev", then "chroot /mnt/sda3" then i mounted /boot. was i supposed to run all that regularly after i emerged all i needed?

tonye 06-14-2009 11:08 AM

Quote:

Originally Posted by d2_racing (Post 3573107)
Hi, you should try the latest SystemRescueCD LiveCD, it's Gentoo based and it has a pretty recent kernel.

would this install a kernel?

d2_racing 06-14-2009 11:30 PM

It will make your wireless connection working when you will boot with this LiveCD at least.

And for you question, not it will not install a kernel.

jomen 06-15-2009 03:37 AM

Just to be sure:

build the kernel

be sure the symlink points to the correct kernel-source
Code:

ls -al /usr/src/linux
cd to there
- make menuconfig
- make
- check that /boot is mounted if you put it on its own partition - like the guide suggests
- make modules_install
- make install
- check /boot/grub/menu.lst (or /boot/grub/grub.conf, which is the same) that the kernels name mentioned there is the one you just installed
Code:

ls -al /boot
will show you what you have available.
- edit it by adding the newly installed kernel

Thats it.
There is no initrd involved.
Keep the lines which boot the old and working kernel - just add the new kernel like so for instance:
Code:

title=Gentoo-2.6.29-gentoo-r5
kernel /vmlinuz root=/dev/hda3 vga=792

This method does not need or use genkernel!
If you use genkernel this is a little different - and an additional initrd is involved - so there is one more line in grub's config refering to it.
Since I don't use genkernel I can't give advise when things are seemingly nor working as they should.
My advise is: don't use it - it only makes the whole (easy) process less obvious (IMO)

mkborg 06-15-2009 07:50 AM

kernel build/install
 
I would highly recommend the "genkernel" for the first few kernel builds/installs.

# install kernel sources:
emerge --update sys-kernel/gentoo-sources

# install "eselect" utility:
emerge --update app-admin/eselect

# install "genkernel" utility:
emerge --update sys-kernel/genkernel

# check available kernel versions (star '*' symbol denotes selected kernel):
eselect kernel list
Quote:

Available kernel symlink targets:
[1] linux-2.6.29-gentoo-r5 *
# if necessary change selected kernel:
eselect kernel set 1

# If you have separate "boot" partition then make sure it is already specified in "/etc/fstab" (genkernel uses it for automagical mounting)
grep boot /etc/fstab
Quote:

LABEL=boot /boot auto noauto,noatime 1 2
# configure, build and install kernel and initial ramdisk with modules:
genkernel --menuconfig --symlink all

# check that new kernel is in place:
ls -l /boot/
Quote:

Code:

lrwxrwxrwx 1 root root      40 2009-06-01 13:46 initramfs -> initramfs-genkernel-x86-2.6.29-gentoo-r5
-rw-r--r-- 1 root root 1435222 2009-04-28 15:54 initramfs-genkernel-x86-2.6.28-gentoo-r5
-rw-r--r-- 1 root root 1516700 2009-06-01 08:45 initramfs-genkernel-x86-2.6.29-gentoo-r5
lrwxrwxrwx 1 root root      40 2009-06-01 13:46 initramfs.old -> initramfs-genkernel-x86-2.6.28-gentoo-r5
lrwxrwxrwx 1 root root      37 2009-06-01 13:46 kernel -> kernel-genkernel-x86-2.6.29-gentoo-r5
-rw-r--r-- 1 root root 1805296 2009-04-28 15:54 kernel-genkernel-x86-2.6.28-gentoo-r5
-rw-r--r-- 1 root root 1850768 2009-06-01 08:41 kernel-genkernel-x86-2.6.29-gentoo-r5
lrwxrwxrwx 1 root root      37 2009-06-01 13:46 kernel.old -> kernel-genkernel-x86-2.6.28-gentoo-r5


# update your boot config (/boot/grub/grub.conf) to refer to new kernel (due to symlinks this is one time task):
Quote:

Code:

default 0
timeout 30

title Gentoo Linux (NEW)
  root (hd1,0)
  kernel] /boot/kernel real_root=/dev/sdb6 init=linuxrc
  initrd] /boot/initramfs

title Gentoo Linux (OLD)
  root (hd1,0)
  kernel /boot/kernel.old real_root=/dev/sdb6 init=linuxrc
  initrd /boot/initramfs.old


# old kernel (kernel.old) can help in future if new kernel doesn't want to boot

tonye 09-15-2009 05:30 PM

figured all that out. found out, I dont have the time for gentoo right now, I think I will do it later. as for now, maybe Debian

linus72 09-15-2009 05:33 PM

Oh yeah
Debian?
Which distro?
Debian hd install
Debian-Live
GRML
Hag-Linux
Sidux
Myrinix
LOL...


All times are GMT -5. The time now is 10:37 PM.