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

Bug#868900: marked as done (iso-scan: should be able to copy the ISO into RAM before mount)



Your message dated Mon, 11 Dec 2017 07:04:50 +0000
with message-id <E1eOI8w-0008r6-Oj@fasolo.debian.org>
and subject line Bug#868900: fixed in iso-scan 1.61
has caused the Debian Bug report #868900,
regarding iso-scan: should be able to copy the ISO into RAM before mount
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
868900: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868900
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: iso-scan
Version: 1.57
Severity: wishlist
Tags: patch

When you use an ISO image stored on a disk, it makes it impossible to
re-use that disk in the installation process (e.g. for automatic
partitioning).

In order to avoid this limitation, I would like iso-scan to be able
to copy the ISO image into RAM and to mount it from there. The attached
patch implements precisely when the debconf question "iso-scan/copy_iso_to_ram"
returns true.

It would be nice to see this merged (the patch applies cleanly on top
of the one in #868859, but you can also merge it separately if you drop
the changelog entry).

Let me know if there's anything to improve before it's ready to be merged
(notably on the debconf template, etc.).

Cheers,

-- System Information:
Debian Release: buster/sid
  APT prefers oldoldstable
  APT policy: (500, 'oldoldstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
>From f036be16012d1004053fa977258c842b1d9eed47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>
Date: Wed, 19 Jul 2017 16:20:38 +0200
Subject: [PATCH] Offer possibility to copy ISO to RAM before mount

The iso-scan/copy_iso_to_ram debconf question controls this new
feature. It defaults to false for backwards compatibility and also
because it can only be safely enabled when the amount of RAM is
sufficient to host a full copy of the image.
---
 debian/changelog          |  3 +++
 debian/iso-scan.postinst  | 19 ++++++++++++++++++-
 debian/iso-scan.templates | 14 ++++++++++++++
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6abd1db..18c47c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ iso-scan (1.58) UNRELEASED; urgency=medium
 
   * Detect LVM logical volumes so that they can be used to find the ISO image
     that we are looking for.
+  * Copy the ISO image into RAM before mounting it when debconf question
+    iso-scan/copy_iso_to_ram is true. This makes it possible to use the disk
+    that provided the ISO image for (automatic) partitioning.
 
  -- Raphaël Hertzog <hertzog@debian.org>  Tue, 18 Jul 2017 16:58:13 +0200
 
diff --git a/debian/iso-scan.postinst b/debian/iso-scan.postinst
index e34f329..1109ba5 100755
--- a/debian/iso-scan.postinst
+++ b/debian/iso-scan.postinst
@@ -203,9 +203,26 @@ use_this_iso () {
 	local iso_device=$2
 	local RET
 
+	db_input low iso-scan/copy_iso_to_ram || true
+	db_go
+	db_get iso-scan/copy_iso_to_ram
+
 	mount -t auto -o ro $iso_device /hd-media 2>/dev/null
 	cd /hd-media
-	mount -t iso9660 -o loop,ro,exec $iso_to_try /cdrom 2>/dev/null
+
+	if [ "$RET" = false ]; then
+		# Direct mount
+		log "Mounting /hd-media/$iso_to_try on /cdrom"
+		mount -t iso9660 -o loop,ro,exec $iso_to_try /cdrom 2>/dev/null
+	else
+		# We copy the ISO to RAM before mounting it
+		log "Copying /hd-media/$iso_to_try to /installer.iso"
+		cp $iso_to_try /installer.iso
+		log "Mounting /installer.iso on /cdrom"
+		mount -t iso9660 -o loop,ro,exec /installer.iso /cdrom 2>/dev/null
+		cd /
+		umount /hd-media
+	fi
 
 	analyze_cd
 
diff --git a/debian/iso-scan.templates b/debian/iso-scan.templates
index e3a23d1..76ba00a 100644
--- a/debian/iso-scan.templates
+++ b/debian/iso-scan.templates
@@ -126,3 +126,17 @@ _Description: Is ISO file ${FILENAME} the correct image for installation?
  .
  If multiple ISO files exist on the same installer drive,
  you may select which one you want to use.
+
+Template: iso-scan/copy_iso_to_ram
+Type: boolean
+Default: false
+# :sl3:
+_Description: Copy the ISO image into RAM before mounting it?
+ If you don't copy the ISO image into RAM, then the disk hosting
+ the ISO image cannot be partitioned as the installer will be
+ actively using it.
+ .
+ However copying the ISO into RAM might not be possible if the ISO image
+ is larger than the amount of RAM available. If the amount of RAM
+ remaining after copy is too low, it might cause other unexpected failures
+ later in the installation process.
-- 
2.13.3


--- End Message ---
--- Begin Message ---
Source: iso-scan
Source-Version: 1.61

We believe that the bug you reported is fixed in the latest version of
iso-scan, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 868900@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated iso-scan package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 11 Dec 2017 07:41:56 +0100
Source: iso-scan
Binary: iso-scan load-iso
Architecture: source
Version: 1.61
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description:
 iso-scan   - Scan hard drives for an installer ISO image (udeb)
 load-iso   - Load installer components from an installer ISO (udeb)
Closes: 868859 868900
Changes:
 iso-scan (1.61) unstable; urgency=medium
 .
   [ Raphaël Hertzog ]
   * Detect LVM logical volumes so that they can be used to find the ISO image
     that we are looking for. Closes: #868859
   * Copy the ISO image into RAM before mounting it when debconf question
     iso-scan/copy_iso_to_ram is true. This makes it possible to use the disk
     that provided the ISO image for (automatic) partitioning. Closes: #868900
 .
   [ Updated translations ]
   * Bulgarian (bg.po) by Damyan Ivanov
   * Czech (cs.po) by Miroslav Kure
   * German (de.po) by Holger Wansing
   * Estonian (et.po) by Kristjan Räts
   * French (fr.po) by Christian Perrier
   * Hungarian (hu.po) by Dr. Nagy Elemér Károly
   * Lithuanian (lt.po) by Rimas Kudelis
   * Portuguese (Brazil) (pt_BR.po) by Adriano Rafael Gomes
   * Portuguese (pt.po) by Miguel Figueiredo
   * Swedish (sv.po) by Anders Jonsson
Checksums-Sha1:
 27ab25a850b8877575c5ed13407ab765ac26c8e0 1670 iso-scan_1.61.dsc
 555f3e6aebb221341d3a61a4e7b782a82c79c611 105728 iso-scan_1.61.tar.xz
Checksums-Sha256:
 3724f932be280152a0f0a8ac698af4e6d5aafa1bbaf2a0252758925e5bb4c4e4 1670 iso-scan_1.61.dsc
 6ee664608907e07475cc5c0c162499d350951c1da5b2312843555bca1a2f3e3c 105728 iso-scan_1.61.tar.xz
Files:
 65eab398be1b81d3359b05021cdc3597 1670 debian-installer optional iso-scan_1.61.dsc
 679b5aef3d7f5848a5606a2c1c2373fe 105728 debian-installer optional iso-scan_1.61.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1cL5v8oSi7oip3IYhy9wLE1uJagFAlouKokACgkQhy9wLE1u
JaiOpw//Up8/6/yi6eJ6vExxcwbJol+xmYAnTJeNrXQ4uE7sni4jkxYYDXWDx98B
6WHrdMJMp/jrqH5jzuK5O2PzUencrL/TV2SImeQBCqBjJamDtqsYl3WMJw5Fpwid
ginhv5Qvl9QWHTKeZ60Y2jrf54RnoVdIamnsUjh6jd7uVu+5OcajsGiowo8K8V8L
NX78hSmNE7mpluh2X3JaE+Jv8JXWnfn3AKyNAY0XFM92VWLptGyLyecNc9Tzd39H
rg/Okq2W8ikQInhkDLZorxFrxEnaSkhQnVtY/V/1VQCpIjdnbHdSNnq7kR/h4dsV
Nxe4K5pI6A+rLbhi/bMW/eHEcIQwHUgHunoJTB4nvin6+q1G5LsrH4I4YAyd7icr
rWUbqjM5UIQ5u69y6yAoYX+5/msEFPuFNddydrnsYrFTa21h4YJes+nTME1qOf4h
TMjIgjC/myEj47uBxLpUpXgL3GswoBpNHtDkJEHaVP0oJOyk43X3Ibt9oWouPVNE
zeRjpc2aAUqGSerRthFwf+4jETO2wjNqRVy0btXsF9jP7lhT6RJ3u+LXBBHMvbp4
1SOuztJ3NVMFzQLWM12ge/a17swTdAVRvymYiab57WHYs7qLqpBIh1j/f0NDUU4A
I25U9apwXezCwllpwjEm+1AR1tINH2dQmit264M6QxTxmuXQL7k=
=ISmm
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: