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

Bug#744865: Add check and warning for unetbootin



Control: tag -1 +patch

On Wed, Jan 21, 2015 at 03:46:20PM +0000, Steve McIntyre wrote:
>So, some progress on this front. I've filed a bug against unetbootin
>itself to ask for warnings "Don't use this for Debian CD images"
>(#775689) and there has been some discussion there.
>
>I've now tried the current stable and unstable versions of unetbootin
>myself with the latest Jessie d-i RC1 amd64 netinst CD and could not
>get it to work at all usefully. *sigh* I've no idea how people ever
>manage to get unetbootin to work for them - documentation is
>non-existent.
>
>What I *do* have now is some information about the contents of the
>resulting USB stick, so I can add a checks in d-i for various files
>and trigger a warning something like 

Here's my patch. Not sure I can test it 100%, as I've yet to get
unetbootin to reliably *get* to this stage for me! But I've made a
local image with filenames that match these and it triggered
correctly.

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
"You can't barbecue lettuce!" -- Ellie Crane
diff --git a/debian/cdrom-detect.postinst b/debian/cdrom-detect.postinst
index 3446a06..6bf2454 100755
--- a/debian/cdrom-detect.postinst
+++ b/debian/cdrom-detect.postinst
@@ -223,6 +223,22 @@ while true; do
 	fi
 done
 
+# Check for unetbootin files
+UNETBOOTIN_FILES="ubnfilel.txt ubninit ubnkern ubnpathl.txt"
+UNETBOOTIN_DETECTED=0
+for file in ${UNETBOOTIN_FILES}; do
+	if [ -f /cdrom/$file ] ; then
+		UNETBOOTIN_DETECTED=1
+		break
+	fi
+done
+
+# If we found any, warn the user
+if [ $UNETBOOTIN_DETECTED = 1 ]; then
+	db_input critical cdrom-detect/unetbootin_detected || [ $? -eq 30 ]
+	db_go
+fi
+
 # Get all the pool directories into the dentry cache, to cut down on seek
 # times.
 poolcount="$(set -- /cdrom/pool/*/*; echo $#)"
diff --git a/debian/cdrom-detect.templates b/debian/cdrom-detect.templates
index 3db18bc..96253af 100644
--- a/debian/cdrom-detect.templates
+++ b/debian/cdrom-detect.templates
@@ -94,6 +94,19 @@ _Description: CD-ROM detected
  The CD-ROM autodetection was successful. A CD-ROM drive has been found and it
  currently contains the CD ${cdname}. The installation will now continue.
 
+Template: cdrom-detect/unetbootin_detected
+Type: note
+# :sl2:
+_Description: UNetbootin media detected
+ It appears that your installation disk was generated using
+ UNetbootin. UNetbootin is regularly linked with difficult or
+ unreproducible problem reports from Debian Installer users; if you
+ have problems using this installation disk, please try your
+ installation again without using UNetbootin before reporting issues.
+ .
+ The installation guide contains more information on how to create a
+ USB installation disk directly without UNetbootin.
+
 Template: cdrom-detect/wrong-cd
 Type: error
 # :sl2:
diff --git a/debian/changelog b/debian/changelog
index 22c2e1d..a4b037a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+cdrom-detect (1.49) UNRELEASED; urgency=medium
+
+  [ Steve McIntyre ]
+  * Add checks for UNetbootin media at cdrom mount time. If we detect it,
+    warn the user about potential problems. Closes: #744865
+
+ -- Steve McIntyre <93sam@debian.org>  Fri, 23 Jan 2015 01:03:28 +0100
+
 cdrom-detect (1.48) unstable; urgency=low
 
   [ Updated translations ]

Reply to: