[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] prevent duplicated entries due to symlinks

From: Andreas
Subject: Re: [PATCH] prevent duplicated entries due to symlinks
Date: Mon, 04 May 2009 18:45:50 +0200
User-agent: Thunderbird (X11/20090325)

Pavel Roskin schrieb:
On Fri, 2009-05-01 at 22:51 +0200, Andreas Born wrote:
If there's both a symlink and a kernel at which the symlink is pointing in the list of detected kernels of 10_linux, two entries are created for actually the same kernel. This patch checks for this condition and only uses the symlink (usually the wanted behaviour), in case the target of the symlink doesn't exist, it uses neither.

Furthermore there may be kernel images named e.g. /boot/vmlinuz, so to detect those the patch doesn't require a hyphen in the kernel name. In this case the sed used to determine the kernel version, won't return as expected an empty string. Therefore I replaced it by another one with the wanted behaviour. If the kernel version can be empty we don't want to have a "GNU/Linux, linux " menuentry. Accordingly this patch adds a check for empty kernel version, so that only "GNU/Linux" will be displayed.

The result will be that we would have an entry without version instead
of an entry with a version.  That's hardly an improvement.  Can you give
an example where it would be useful?
You have a symlink named /boot/vmlinuz which points at the current kernel version. Now you could of course find out which kernel version it's pointing at but that version could change anytime. /boot/vmlinu[zx] and /vmlinu[zx] (there should only exist one of them) are the only cases I can think of which have no version in their name. So you always know that the version-free entry always boots the kernel pointed at by /boot/vmlinuz, which is always the current kernel if your distro maintains the symlink. I see no regression there.
This is for example my Zenwalk boot entry:
'menuentry "Zenwalk GNU/Linux" {
   set root=(hd0,3)
   search --fs-uuid --set 408e3e53-d766-4592-bb12-31233bd415c0
linux16 /boot/vmlinuz root=/dev/sda3 ro splash=silent resume=/dev/sda7 vga=794
   initrd16    /boot/initrd.splash
That's the symlink: /boot/vmlinuz -> vmlinuz-

Finally there's quite a bunch of other names for initrds. This patch adds support for initrd.gz and initrd.splash. Both initrd.img and initrd.gz become or were yet supported with two different version positions and without version at all. For initrd.splash this isn't needed because it's not kernel version dependent.

Please specify where those names are used.  Can you give the
distribution name and version where such names are used?
Zenwalk, Slackware for example. I think more Slackware derivates are using it too.
What is initrd.splash?  Why does it need to be handled like initrd and
why is it always version independent?  Again, where is it used?

initrd.splash is used by Zenwalk (others too) it contains only the data of one or multiple bootsplashes as returned by the "splash" command. It's used by bootsplash and doesn't contain any files, modules, etc. The version independence is quite self-explaining now, I think. Unless bootsplash support was removed it works for any kernel version. And even if bootsplash support is removed it does no harm to load it.

Is it understandable now?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]