Gentoo Archives: gentoo-user

From: Harm Geerts <harmgeerts@××××.nl>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Gentoo failed to start
Date: Sat, 02 Sep 2006 02:31:27
Message-Id: 200609020425.58708.harmgeerts@home.nl
In Reply to: Re: [gentoo-user] Gentoo failed to start by Richard Fish
1 On Saturday 02 September 2006 03:52, Richard Fish wrote:
2 > On 9/1/06, Stephen Liu <satimis@×××××.com> wrote:
3 > > I think I have to run another round again wiping out the complete HD.
4 >
5 > Yeah, I think so...
6 >
7 > > Another thing, what did you mean "...Use whatever name you feel is
8 > > appropriate for your kernel choice and remember it as you will need it
9 > > later on when you configure your bootloader. Remember to replace
10 > > kernel-2.6.17-gentoo-r5 with the name and version of your kernel."
11 >
12 > When you compile the kernel, it is going to build a file called
13 > bzImage, that you have to copy to /boot. But it is very rare to copy
14 > it to /boot/bzImage...most linux users will rename the file to
15 > something else. Some people (and helper scripts like genkernel)
16 > prefer to use the full version of the kernel, so if you build a kernel
17 > from gentoo-sources-2.6.17-r5, you might:
18 >
19 > cp arch/x86_64/boot/bzImage /boot/linux-2.6.17-gentoo-r5
20 > ... or ...
21 > cp arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.17-gentoo-r5
22 > ... or ...
23 > cp arch/x86_64/boot/bzImage /boot/mykernel-17r5
24 >
25 > It is usually a good idea to keep a backup kernel in /boot that you
26 > can use in case a kernel upgrade goes wrong. So I usually keep 2
27 > kernels, /boot/vmlinuz-2.6 and /boot/vmlinuz-safe. Once I know that
28 > vmlinuz-2.6 boots and works reliably, I will copy it to -safe.
29
30 This can also be done with installkernel from sys-apps/debianutils
31
32 >From it's manpage:
33 installkernel installs a new kernel image onto the system from the Linux
34 source tree. It is called by the Linux kernel makefiles when "make install"
35 is invoked there.
36
37 The new kernel is installed into {directory}/vmlinuz-{version}, a link is made
38 from {directory}/vmlinuz to the new kernel, and the previously installed
39 kernel is available as {directory}/vmlinuz.old.
40
41 > The second part about remembering the name for your boot loader refers
42 > to your menu.lst/grub.conf entries. You must specify the actual name
43 > that you copied your kernel image to, or (as you already saw), you
44 > will get a "file not found" when you try to boot.
45 >
46 > So if you copy bzImage to /boot/vmlinuz-2.6, you must use an entry like:
47 >
48 > title Whatever
49 > kernel hd(0,0)/vmlinuz-2.6 ...
50 >
51 > The title doesn't really matter, but the "kernel" line needs to
52 > reference your actual kernel file.
53
54 For grub.conf you can use the symlinks installkernel creates (vmlinuz and
55 vmlinuz.old). Now you'll never have to change your grub config again, just
56 make sure /boot is mounted ;)
57
58 --
59 gentoo-user@g.o mailing list