Gentoo Archives: gentoo-user

From: Holly Bostick <motub@××××××.nl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Do I need the vmlinuz symbolic link with Grub?
Date: Wed, 31 Aug 2005 03:01:32
Message-Id: 43151C72.3020308@planet.nl
In Reply to: [gentoo-user] Do I need the vmlinuz symbolic link with Grub? by Daevid Vincent
1 Daevid Vincent schreef:
2 > Somehow net-wireless/madwifi-driver has broken on me (0.1_pre20050420-r1),
3 > so I thought I'd recompile it. No luck. So I thought, maybe my kernel source
4 > was different than my actual kernel (2.6.10-gentoo-r6), so I ran:
5 > "make bzImage modules modules_install"
6
7 OK, don't quite get this:
8
9 to see what kernel you're running do
10
11 uname -r
12
13 uname -r
14 2.6.12-gentoo-r9
15
16 to see what kernel is linked to /usr/src/linux (which is the symlink
17 external modules will follow to determine what source to build against), do
18
19 la /usr/src/linux
20
21 la /usr/src/linux
22 lrwxrwxrwx 1 root root 23 aug 31 00:25 /usr/src/linux ->
23 linux-2.6.12-gentoo-r10
24
25 As you see, the kernel I am currently running is different from the
26 source that I downloaded earlier this evening and will compile tomorrow.
27 In less than 24 hours, both outputs will say the same thing.
28
29 I just don't get why people tend 'speculate' on stuff instead of just
30 checking. :) .
31
32 Also not quite sure why you're doing all those steps; it's like you're
33 running a 2.4 kernel or something.
34
35 For ages under 2.6, all that's needed is
36
37 make
38 make modules_install
39 make install or manual copy of the kernel to /boot
40
41 >
42 > Copied and renamed the bzImage file over to /boot and all that jazz.
43 >
44 > But I don't think I'm getting the right kernel as the date for my kernel is
45 > today, but my vmlinuz is older.
46 >
47 > How is that symlink created? And how is the vmlinuz-2.6.10-gentoo-r6
48 > created?
49
50 They are both created if you use 'make install' as the third step of
51 kernel compilation; the bzImage created by the 'make' command is copied
52 to /boot, renamed vmlinuz-whatever and symlinked to vmlinuz. Any
53 currently existing kernel's symlink is removed, and a new link is
54 created to vmlinuz.old. The same occurs for System.map and .config
55
56 The idea is that it simplifies GRUB configuration (you only have to say
57 the current kernel is vmlinuz and the previous one is vmlinuz.old. Any
58 yet older kernels can be added using the full name of
59 vmlinuz-kernel.version).
60
61 What happens if I rm that symlink or the file? Is my system
62 > unbootable?
63
64 Possibly, if you delete the kernel, and its the one you're using.
65 Nothing ever happens if you delete a symlink (it doesn't affect the
66 file), but of course any bootloader entries that refer to the symlink or
67 the deleted file will be invalid.
68
69 For reference, here's my grub.conf, and the contents of /boot:
70
71 1 apr 27 18:52 boot -> .
72 23 aug 28 19:18 config -> config-2.6.12-gentoo-r9
73 60418 mrt 24 01:31 config-2.6.11.4-20a-default
74 36162 jul 7 02:09 config-2.6.11-gentoo-r11
75 36338 mei 5 00:52 config-2.6.11-gentoo-r6
76 35926 jun 13 23:49 config-2.6.11-gentoo-r8
77 32555 jul 24 02:08 config-2.6.12-gentoo-r6
78 32009 aug 28 19:18 config-2.6.12-gentoo-r9
79 32533 aug 28 18:19 config-2.6.12-gentoo-r9.old
80 27 aug 28 19:18 config.old -> config-2.6.12-gentoo-r9.old
81 1024 aug 23 19:57 grub
82 27 apr 27 14:23 initrd -> initrd-2.6.11.4-20a-default
83 1365529 apr 27 14:23 initrd-2.6.11.4-20a-default
84 0 apr 29 00:47 .keep
85 12288 apr 27 14:13 lost+found
86 138240 apr 27 14:23 message
87 68372 mrt 24 01:32 symvers-2.6.11.4-20a-i386-default.gz
88 27 aug 28 19:18 System.map -> System.map-2.6.12-gentoo-r9
89 708925 mrt 24 01:26 System.map-2.6.11.4-20a-default
90 1015185 jul 7 02:09 System.map-2.6.11-gentoo-r11
91 1022418 mei 5 00:52 System.map-2.6.11-gentoo-r6
92 978467 jun 13 23:49 System.map-2.6.11-gentoo-r8
93 1023832 jul 24 02:08 System.map-2.6.12-gentoo-r6
94 972725 aug 28 19:18 System.map-2.6.12-gentoo-r9
95 972876 aug 28 18:19 System.map-2.6.12-gentoo-r9.old
96 31 aug 28 19:18 System.map.old -> System.map-2.6.12-gentoo-r9.old
97 1024 apr 29 15:52 .Trash-root
98 24 aug 28 19:18 vmlinuz -> vmlinuz-2.6.12-gentoo-r9
99 1424645 mrt 24 01:26 vmlinuz-2.6.11.4-20a-default
100 2231337 jul 7 02:09 vmlinuz-2.6.11-gentoo-r11
101 2279794 mei 5 00:52 vmlinuz-2.6.11-gentoo-r6
102 2132248 jun 13 23:49 vmlinuz-2.6.11-gentoo-r8
103 2122433 jul 24 02:08 vmlinuz-2.6.12-gentoo-r6
104 3540799 aug 28 19:18 vmlinuz-2.6.12-gentoo-r9
105 3540532 aug 28 18:19 vmlinuz-2.6.12-gentoo-r9.old
106
107
108 I should probably get rid of the old 2.6.11 kernels, since I don't need
109 them for emergency backup anymore.
110
111 Anyway, when I compile 2.6.12-gentoo-r10 later today, 2.6.12-gentoo-r9
112 will be linked to vmlinuz.old (again), 2.6.12-gentoo-r10 will be linked
113 directly to vmlinuz, and any other kernels I want to put in the menu can
114 be linked directly by name:
115
116
117 splashimage=(hd0,1)/grub/grub-livecd2.xpm.gz
118 title Gentoo_current (2.6.12-gentoo-r9)
119 root (hd0,1)
120 kernel /vmlinuz ro quiet root=/dev/hda5
121 video=vesafb:ywrap,mtrr,1280x1024-32@60
122 splash=silent,fadein,theme:livecd-2005.1 CONSOLE=/dev/tty1
123 # initrd (hd0,1)/fbsplash-emergence-2612-6
124
125 title Gentoo_prev (2.6.11-gentoo-r6)
126 root (hd0,1)
127 kernel /vmlinuz-2.6.11-gentoo-r6 ro root=/dev/hda5
128 video=vesafb:ywrap,pmipal,mtrr,1280x1024-32@60
129 splash=verbose,theme:emergence quiet CONSOLE=/dev/tty1
130 initrd /fbsplash-emergence-2611-11
131
132 title SUSE LINUX 9.3
133 root (hd0,1)
134 kernel /vmlinuz-2.6.11.4-20a-default real_root=/dev/hda6
135 vga=0x317 selinux=0 splash=silent resume=/dev/hda6 showopts
136 initrd /initrd-2.6.11.4-20a-default
137
138
139 The only reason that 2.6.11-r6 is not called with vmlinuz.old is because
140 I've been recompiling my kernel a lot the past couple of days, and there
141 wasn't much point in cleaning up my symlinks every time (though I will
142 do it before I compile 2.6.12-r10), so I just linked the entry directly
143 to the kernel rather than a symlink. The entry is obsolete anyway, so
144 I'll probably just delete it in the /boot cleanup.
145
146 HTH,
147 Holly
148 --
149 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Do I need the vmlinuz symbolic link with Grub? Nick Rout <nick@×××××××.nz>