From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1M11In-000108-67 for mharc-grub-devel@gnu.org; Mon, 04 May 2009 12:46:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M11Il-0000yB-G4 for grub-devel@gnu.org; Mon, 04 May 2009 12:45:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M11Ig-0000qx-Jd for grub-devel@gnu.org; Mon, 04 May 2009 12:45:59 -0400 Received: from [199.232.76.173] (port=45254 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M11Ig-0000qh-E6 for grub-devel@gnu.org; Mon, 04 May 2009 12:45:54 -0400 Received: from mail-fx0-f169.google.com ([209.85.220.169]:40899) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M11If-0007oZ-RC for grub-devel@gnu.org; Mon, 04 May 2009 12:45:54 -0400 Received: by fxm17 with SMTP id 17so4202403fxm.42 for ; Mon, 04 May 2009 09:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=/9mDL8BPza6Ttluj/+RlkHKHX4vrbDpsue97pHde3T0=; b=u/rfJfO+b4VK9SMwhZjLOFVw+U0EZokCEkrJUPyTfDHnxkLnfakJkhXpHc0AnZoYqd E/0Iu3p8pJcILxoVQ5cQLdzO/4beEu4+JUS6Dm0T54lUfrj7D0MSzPTpAn47dBxWKZ+x T0kpYsW6iDrJwxxezM6xmGAFQ5RRTU6SBW4ns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Z9SlV/CiP10RmZOGBy4LRkZPaZk1nTA60Nx5KhSa4S7U6krkZ8Pm/gOhaR3Jdcu6/T 7aWWpeELpFcVC/SQ6eVRZWrgUYVIyXDL6Wflsoqj2TT9QwcBHZ1/mlXgcOJVvNPQ4far NgkQbeyMdlaqeN6ms8FL4UGnProYQWZMFsfdE= Received: by 10.223.126.1 with SMTP id a1mr2350227fas.52.1241455551967; Mon, 04 May 2009 09:45:51 -0700 (PDT) Received: from ?192.168.178.30? (p5B0CF74E.dip.t-dialin.net [91.12.247.78]) by mx.google.com with ESMTPS id 8sm5875337fxm.11.2009.05.04.09.45.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 May 2009 09:45:51 -0700 (PDT) Message-ID: <49FF1BBE.4090001@googlemail.com> Date: Mon, 04 May 2009 18:45:50 +0200 From: Andreas User-Agent: Thunderbird 2.0.0.21 (X11/20090325) MIME-Version: 1.0 To: The development of GRUB 2 References: <49FB60BE.7090806@googlemail.com> <1241411539.26483.42.camel@mj> In-Reply-To: <1241411539.26483.42.camel@mj> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] prevent duplicated entries due to symlinks X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 16:45:59 -0000 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-2.6.29.2 > >> 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? Andreas