X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id E5824DC019E for ; Thu, 27 Jun 2013 07:32:22 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 6E47D20F0A for ; Thu, 27 Jun 2013 03:32:22 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 27 Jun 2013 03:32:22 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :in-reply-to:references; s=smtpout; bh=ww9pNX3SUtOI88v0Xf7WME2ph mQ=; b=DhmVj5zy+H9/YFsM4oVyfNXEHVVXKsZErDa5RfcDNmFJhyXygPBz/1xgg 8T6gEj/UJORMIXLR3jLtPbGehCcmxvI1VKDAsGQ4OQIJ2BLbwtNckV/WuhFto3BO XsDSdFkVxKQ+jNFmk0on85keC2KJyTPRQpAMeBMUjlaNO3puVs= X-Sasl-enc: oSSS0BqUzKf6LugQIuuvhpPztYTat2JgCXO88qEZsgsC 1372318342 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 4812F680481 for ; Thu, 27 Jun 2013 03:32:22 -0400 (EDT) From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 1/8] main/syslinux: fix/refactor initramfs Date: Thu, 27 Jun 2013 03:32:14 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: If xen.gz is present, there are multiple kernels, and later ones lack an initramfs, they'll currently be (wrongly) configured to use a initramfs anyway. Fixed. We also refactor the check for /boot/initramfs-$tag, and configure this using a separate INITRD line, instead of adding it to the APPEND line. In passing, this also closes a second might-use-a-stale-initramfs bug. --- main/syslinux/update-extlinux | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index a4d4fa7..2b980a9 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -91,6 +91,8 @@ if [ -f "/boot/xen.gz" ]; then if [ -f "/boot/initramfs-$tag" ]; then everbose "Found initramfs: /boot/initramfs-$tag" initramfs="initramfs-$tag" + else + initramfs= fi label=xen-$(grep -w -l $tag /usr/share/kernel/*/kernel.release \ | cut -d/ -f5) @@ -113,11 +115,6 @@ fi for kernel in $(find /boot -name "vmlinuz-*" -type f); do tag=$(basename $kernel | cut -b9-) everbose "Found kernel: $kernel" - - if [ -f "/boot/initramfs-$tag" ]; then - everbose "Found initramfs: /boot/initramfs-$tag" - initramfs="initrd=initramfs-$tag" - fi label=$(grep -w -l $tag /usr/share/kernel/*/kernel.release | cut -d/ -f5) if [ -z "$label" ]; then label=$lst @@ -128,7 +125,11 @@ for kernel in $(find /boot -name "vmlinuz-*" -type f); do fi echo " MENU LABEL Linux $tag" >> $conf.new echo " KERNEL $(basename $kernel)" >> $conf.new - echo " APPEND $initramfs root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts" >> $conf.new + if [ -f "/boot/initramfs-$tag" ]; then + everbose "Found initramfs: /boot/initramfs-$tag" + echo " INITRD initramfs-$tag" >> $conf.new + fi + echo " APPEND root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts" >> $conf.new echo "" >> $conf.new lst=$(($lst + 1)) done -- 1.8.3.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---