Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot make install kernel (SOLVED)
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
essexer
n00b
n00b


Joined: 17 Jul 2006
Posts: 43
Location: UK

PostPosted: Mon Jul 20, 2009 8:19 pm    Post subject: cannot make install kernel (SOLVED) Reply with quote

When I compile the gentoo-sources, after
Code:
make && make modules_install
I failed to run
Code:
make install

It gives the error
Quote:
sh /usr/src/linux-2.6.29-gentoo-r5/arch/x86/boot/install.sh 2.6.29-gentoo-r5 arch/x86/boot/bzImage System.map "/boot"
Cannot find LILO

But I'm using grub. Could you tell me what's happening please?

Simon


Last edited by essexer on Fri Jul 24, 2009 4:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
vincent-
Retired Dev
Retired Dev


Joined: 13 Jan 2007
Posts: 415
Location: Valencia (Spain)

PostPosted: Mon Jul 20, 2009 9:35 pm    Post subject: Reply with quote

Try cleaning first with

Code:
make mrproper


and then
Code:
make menuconfig

Code:
make && make modules_install
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Jul 20, 2009 9:48 pm    Post subject: Reply with quote

there shouldn't be any need to run a 'make install'

if you follow the handbook, it tells you how to do everything by hand, step by step

Code:

make && make modules_install


then make sure /boot is mounted (you should have mounted it before you chrooted)

Code:

cp /usr/src/linux/arch/x86/boot/bzImage /boot/kernel-new


then edit /boot/grub/grub.conf to have

Code:

title Gentoo
root (hd0,0)
kernel /boot/kernel-new root=/dev/sda3


Replace 'sda3' with whatever is appropriate for your root partition
as well in some cases it wont be hd0,0, but something else

No need to do `make install` - the above is the correct procedure for building and deploying a new kernel in most gentoo installations

Once you've done that
Code:

emerge grub
grub-install --no-floppy /dev/sda


(replacing sda with whatever is appropriate)

If you're lost, consult the handbook, as all of the above is documented there :)
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Jul 20, 2009 9:54 pm    Post subject: Reply with quote

also should point out, you need to have populated /etc/mtab (as per the handbook) before doing grub-install

Mine is below, however it will look considerably different from yours, as I'm using LVM && dmcrypt, with only small partitions for root and boot


Code:

/dev/sda2 / reiserfs rw,noatime 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
/dev/mapper/crypt-usr /usr reiserfs rw,noatime 0 0
/dev/mapper/crypt-home /home xfs rw,noatime,logbufs=8 0 0
/dev/mapper/crypt-opt /opt xfs rw,noatime,logbufs=8 0 0
/dev/mapper/crypt-var /var reiserfs rw,noatime 0 0
/dev/mapper/crypt-tmp /tmp reiserfs rw,noatime 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
nfsd /proc/fs/nfsd nfsd rw,noexec,nosuid,nodev 0 0
/dev/sda1 /boot ext2 rw,noatime 0 0



For most, your /etc/mtab should look something like

Code:

/dev/sda3 / reiserfs rw,noatime 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0
usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
/dev/sda1 /boot ext2 rw,noatime 0 0


if you use my examples, adjust sda1/sda3 as is appropriate for your installation
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Tue Jul 21, 2009 12:28 am    Post subject: Re: cannot make install kernel Reply with quote

essexer wrote:
Code:
make install

It gives the error
Quote:
sh /usr/src/linux-2.6.29-gentoo-r5/arch/x86/boot/install.sh 2.6.29-gentoo-r5 arch/x86/boot/bzImage System.map "/boot"
Cannot find LILO

But I'm using grub ...

Have you updated sys-apps/debianutils recently ?

It is possible that /sbin/installkernel (used by the kernel's "make install") no longer supports old versions of grub.

I currently use grub2, and "make install" continues to be my preferred way to install a new kernel.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Tue Jul 21, 2009 12:53 am    Post subject: Re: cannot make install kernel Reply with quote

cyrillic wrote:

I currently use grub2, and "make install" continues to be my preferred way to install a new kernel.


Is there any advantage to this, or is it a matter of familiarity?
Back to top
View user's profile Send private message
RedSquirrel
Guru
Guru


Joined: 22 Apr 2008
Posts: 336

PostPosted: Tue Jul 21, 2009 2:01 am    Post subject: Re: cannot make install kernel Reply with quote

cach0rr0 wrote:
cyrillic wrote:

I currently use grub2, and "make install" continues to be my preferred way to install a new kernel.


Is there any advantage to this, or is it a matter of familiarity?

Try it yourself sometime and see. Running 'make install' automatically manages symlinks under /boot: vmlinuz and vmlinuz.old (among other things). If you setup grub.conf to use these symlinks, you never have to touch grub.conf again.

Here are my grub stanzas, for example:

Code:
title Gentoo Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda3 vga=0x317 video=vesafb:mtrr:3,ywrap,vtotal:32


title Gentoo Linux (backup kernel)
root (hd0,0)
kernel /boot/vmlinuz.old root=/dev/sda3 vga=0x317 video=vesafb:mtrr:3,ywrap,vtotal:32
Back to top
View user's profile Send private message
doctork
Guru
Guru


Joined: 25 Apr 2004
Posts: 370
Location: Cleveland, OH

PostPosted: Tue Jul 21, 2009 1:10 pm    Post subject: Re: cannot make install kernel Reply with quote

essexer wrote:
When I compile the gentoo-sources, after
Code:
make && make modules_install
I failed to run
Code:
make install

It gives the error
Quote:
sh /usr/src/linux-2.6.29-gentoo-r5/arch/x86/boot/install.sh 2.6.29-gentoo-r5 arch/x86/boot/bzImage System.map "/boot"
Cannot find LILO

But I'm using grub. Could you tell me what's happening please?

Simon


If you look at the install.sh script in the above quote, you'll see that Simon doesn't have /sbin/installkernel installed. It's part of "debian-utils." Despite the "Cannot ...." message, the kernel and System.map files should have been installed in /boot, since the script just does cp/cat if it can't find "installkernel.".
--
doc
Back to top
View user's profile Send private message
hoacker
Guru
Guru


Joined: 04 Aug 2007
Posts: 505
Location: Bürstadt, Germany

PostPosted: Tue Jul 21, 2009 2:02 pm    Post subject: Re: cannot make install kernel Reply with quote

essexer wrote:
Quote:
sh /usr/src/linux-2.6.29-gentoo-r5/arch/x86/boot/install.sh 2.6.29-gentoo-r5 arch/x86/boot/bzImage System.map "/boot"
Cannot find LILO



I don't use this make install stuff, but just one thought: /boot is mounted properly when you make install?
Back to top
View user's profile Send private message
essexer
n00b
n00b


Joined: 17 Jul 2006
Posts: 43
Location: UK

PostPosted: Thu Jul 23, 2009 9:33 am    Post subject: Reply with quote

The make install is convenient as far as I know. And I have been using it for quite a long time. It generates automatically the symbolic links in /boot.
I installed debainutils, it removed the error complaining "cannot find lilo", but the symbolic links are still not generated. I tried to install grub2, but failed when emerge.
The boot is mounted.
Back to top
View user's profile Send private message
doctork
Guru
Guru


Joined: 25 Apr 2004
Posts: 370
Location: Cleveland, OH

PostPosted: Thu Jul 23, 2009 1:15 pm    Post subject: Reply with quote

essexer wrote:
The make install is convenient as far as I know. And I have been using it for quite a long time. It generates automatically the symbolic links in /boot.
I installed debainutils, it removed the error complaining "cannot find lilo", but the symbolic links are still not generated. I tried to install grub2, but failed when emerge.
The boot is mounted.


It turns out the /sbin/installkernel is a bit too smart for its own good. It won't create the symbolic links unless one already exists. Here's the comment:
Code:
    # The presence of "$dir/$1" is unusual in modern intallations, and
    # the results are mostly unused.  So only recreate them if they
    # already existed.

You should be able to fool it by manually creating a set of links to the currently running kernel before running "make install." You'd need something like this to be present in /boot:
Code:
vmlinuz -> vmlinuz-2.6.30-gentoo-r3
config -> config-2.6.30-gentoo-r3
System.map -> System.map-2.6.30-gentoo-r3

Pretty damn ugly that you need to go through that, but I too find "make install" to be very convenient. I'm guessing that earlier versions of debian-utils didn't have that stupid (IMHO) check on the existence of those links.
--
doc
Back to top
View user's profile Send private message
essexer
n00b
n00b


Joined: 17 Jul 2006
Posts: 43
Location: UK

PostPosted: Fri Jul 24, 2009 4:07 pm    Post subject: Reply with quote

Yes, after create the initial symbolic links, the make install works fully (copy the kernel to /boot, and create appropriate symbolic links). Thank you all for the help.
Back to top
View user's profile Send private message
cyrius
n00b
n00b


Joined: 27 Jan 2007
Posts: 70
Location: France

PostPosted: Wed Oct 21, 2020 7:55 am    Post subject: Reply with quote

The problem is coming from the use flag "installkernel" unset on debianutils.

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-apps/debianutils-4.11.1::gentoo USE="installkernel* -static" 0 KiB
[ebuild N ] sys-kernel/installkernel-gentoo-2::gentoo

when set, all will be ok.
Back to top
View user's profile Send private message
Chain
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2006
Posts: 113
Location: Vienna

PostPosted: Wed Nov 17, 2021 10:17 pm    Post subject: Reply with quote

cyrius wrote:
The problem is coming from the use flag "installkernel" unset on debianutils.

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-apps/debianutils-4.11.1::gentoo USE="installkernel* -static" 0 KiB
[ebuild N ] sys-kernel/installkernel-gentoo-2::gentoo

when set, all will be ok.


Thank you! I unset it ages ago and wondered why the hell the kernel isn't installed properly. Well, mistery solved!
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