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

Bug#570486: Configuration /var with noexec option breaks base system installation



Benoit GUERIN <benoit.guerin@gmail.com> writes:

> During partitions configuration, I choosed to create a dedicated
> partition for /var and to configure it with options noatime and
> noexec.
>
> Afterward, the installation process failed on the step "base system
> installation" saying the it could not install base system.
>
> This was because /target/var was mounted noexec, so scripts cannot be executed
>
> I bypassed the problem by opening a console and executing the command
> "mount -o remount,exec /target/var" then exiting the console, and
> relaunching the base system installation
>
> My advice is to force, during install, mount of /var as exec, just
> like every partition is forced as rw, even if we select "ro" from the
> options of a partition

I've added a patch for review on this bug report.

Colin, could you take a look on it and ack it for me to push it?

Cheers,
>From 5f66f8464880f9af0921a017eac0116d1ea832be Mon Sep 17 00:00:00 2001
From: Otavio Salvador <otavio@ossystems.com.br>
Date: Thu, 15 Apr 2010 13:36:56 -0300
Subject: [PATCH] Do not mount partitions with 'noexec' during installation otherwise base installation fails (closes: #570486).

---
 packages/partman/partman-target/debian/changelog   |    5 +++++
 .../partman-target/finish.d/mount_partitions       |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/packages/partman/partman-target/debian/changelog b/packages/partman/partman-target/debian/changelog
index 2392661..27dfaa9 100644
--- a/packages/partman/partman-target/debian/changelog
+++ b/packages/partman/partman-target/debian/changelog
@@ -1,8 +1,13 @@
 partman-target (67) UNRELEASED; urgency=low
 
+  [ Colin Watson ]
   * Ensure that /dev isn't assigned a separate mount point (closes:
     #445211).
 
+  [ Otavio Salvador ]
+  * Do not mount partitions with 'noexec' during installation otherwise
+    base installation fails (closes: #570486).
+
  -- Colin Watson <cjwatson@debian.org>  Fri, 19 Mar 2010 15:22:31 +0000
 
 partman-target (66) unstable; urgency=low
diff --git a/packages/partman/partman-target/finish.d/mount_partitions b/packages/partman/partman-target/finish.d/mount_partitions
index 9c8499e..64384c8 100755
--- a/packages/partman/partman-target/finish.d/mount_partitions
+++ b/packages/partman/partman-target/finish.d/mount_partitions
@@ -15,6 +15,12 @@ fstab=$(
 		newoptions=
 		while [ "$options" ]; do
 			case $options in
+			    (noexec,*)
+				options="${options#noexec,}"
+				;;
+			    (noexec)
+				options=
+				;;
 			    (ro,*)
 				options="${options#ro,}"
 				;;
-- 
1.7.0.3.291.g5e4f6

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: CDFC6E4F
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."

Reply to: