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

Bug#811425: jessie-pu: package initramfs-tools/0.120+deb8u1



Hi Julien,

On Sun, Jan 24, 2016 at 05:01:20PM +0100, Julien Cristau wrote:
> On Thu, Jan 21, 2016 at 16:46:11 +0100, Salvatore Bonaccorso wrote:
> 
> > Hi Ben, hi SRM,
> > 
> > On Mon, Jan 18, 2016 at 07:55:27PM +0000, Ben Hutchings wrote:
> > > Package: release.debian.org
> > > Severity: normal
> > > Tags: jessie patch
> > > User: release.debian.org@packages.debian.org
> > > Usertags: pu
> > > 
> > > There are a number of important bugs in jessie's version of
> > > initramfs-tools that are now fixed in unstable, and that have
> > > quite simple and low-risk fixes.  See the debdiff below.
> > 
> > Would it be possible to as well include the fix for #782641 here? The
> > issue was introduced due to the fix for #750360. We are affected by
> > this on a diskless setup with Jessie clients when mounting /usr in the
> > initramfs.
> > 
> > Instead of using test, just check the return value from
> > nfs_mount_root_impl instead.
> > 
> Please show the actual patch that would be applied.

Attached is the needed patch.

Ben, do you want me to prepare an update debdiff with that patch as
well applied, or can you do that for the stable release managers to
review?

The underlying problem: if the rootfs and /usr are different
filesystems, it requires /usr/bin/test to test if the rootfs can be
mounted successfully and will not succeed. This unfortunately was
introduced while fixing #750360:

https://anonscm.debian.org/cgit/kernel/initramfs-tools.git/commit/?id=7bc24f829f301dd978325716a19890b182c88f2a

The patch (allready applied back to the version in unstable) just used
the return value of nfs_mount_root_impl to check if the rootfs mount
is successfull.

Regards,
Salvatore
>From f78c9a9c960c6c30aaa07cd3c3ae9ff04a0bd8d5 Mon Sep 17 00:00:00 2001
From: Salvatore Bonaccorso <carnil@debian.org>
Date: Fri, 6 Nov 2015 14:12:44 +0100
Subject: [PATCH] scripts/nfs: Check return value from nfs_mount_root_impl

Check if mount of rootfs was successful. This avoids doing a file test
within the mount.

Closes: #782641
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 scripts/nfs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/nfs b/scripts/nfs
index 1c29850..359bd46 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -90,12 +90,14 @@ nfs_mount_root()
 
 	# loop until nfsmount succeeds
 	nfs_mount_root_impl
+	ret=$?
 	nfs_retry_count=0
 	while [ ${nfs_retry_count} -lt ${delay} ] \
-		&& ! chroot "${rootmnt}" test -x "${init}" ; do
+		&& [ $ret -ne 0 ] ; do
 		[ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount"
 		/bin/sleep 1
 		nfs_mount_root_impl
+		ret=$?
 		nfs_retry_count=$(( ${nfs_retry_count} + 1 ))
 		[ "$quiet" != "y" ] && log_end_msg
 	done
-- 
2.7.0


Reply to: