unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 27705@debbugs.gnu.org
Subject: [bug#27705] [PATCH v2 2/4] build: Allow mounting of entire disks.
Date: Thu, 20 Jul 2017 21:12:21 +0200	[thread overview]
Message-ID: <20170720191223.17189-3-dannym@scratchpost.org> (raw)
In-Reply-To: <20170720191223.17189-1-dannym@scratchpost.org>

* gnu/build/file-systems.scm (disk-partitions): Also return entire drives.
---
 gnu/build/file-systems.scm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index b6930497d..462ed9b7f 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -377,11 +377,14 @@ not valid header was found."
     (string-ref str (- (string-length str) 1)))
 
   (define (partition? name major minor)
-    ;; Select device names that end in a digit, like libblkid's 'probe_all'
-    ;; function does.  Checking for "/sys/dev/block/MAJOR:MINOR/partition"
-    ;; doesn't work for partitions coming from mapped devices.
-    (and (char-set-contains? char-set:digit (last-character name))
-         (> major 2)))                      ;ignore RAM disks and floppy disks
+    ;; grub-mkrescue does some funny things for EFI support which
+    ;; makes it a lot more difficult than one would expect to support
+    ;; booting an ISO-9660 image from an USB flash drive.
+    ;; For example there's a buggy (too small) hidden partition in it
+    ;; which Linux rightfully refuses to mount.
+    ;; In any case, partition tables are supposed to be optional so
+    ;; here we allow checking entire disks for file systems, too.
+    (> major 2))                      ;ignore RAM disks and floppy disks
 
   (call-with-input-file "/proc/partitions"
     (lambda (port)

  parent reply	other threads:[~2017-07-20 19:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15 13:35 [bug#27705] [PATCH 0/4] Make both EFI and non-EFI systems boot our disk images Danny Milosavljevic
2017-07-15 13:37 ` [bug#27705] [PATCH 1/4] gnu: grub-efi: Add mtools input Danny Milosavljevic
2017-07-15 13:37 ` [bug#27705] [PATCH 2/4] build: Allow mounting of entire disks Danny Milosavljevic
2017-07-15 13:37   ` [bug#27705] [PATCH 3/4] gnu: grub-efi: Add grub Danny Milosavljevic
2017-07-17 18:00     ` Danny Milosavljevic
2017-07-17 21:26     ` Marius Bakke
2017-07-19 20:48       ` Danny Milosavljevic
2017-07-15 13:37   ` [bug#27705] [PATCH 4/4] install: Use grub-efi Danny Milosavljevic
2017-07-17 21:42     ` Danny Milosavljevic
2017-07-20 19:12 ` [bug#27705] [PATCH v2 0/4] Make both EFI and non-EFI systems boot our ISO9660 disk images Danny Milosavljevic
2017-07-20 19:12   ` [bug#27705] [PATCH v2 1/4] gnu: grub-efi: Add mtools input Danny Milosavljevic
2017-07-20 19:12   ` Danny Milosavljevic [this message]
2017-07-20 19:12   ` [bug#27705] [PATCH v2 3/4] gnu: Add grub-hybrid Danny Milosavljevic
2017-07-20 19:12   ` [bug#27705] [PATCH v2 4/4] vm: Use grub-hybrid's grub-mkrescue Danny Milosavljevic
2017-07-20 19:44 ` [bug#27705] [PATCH v3 0/4] Make both EFI and non-EFI systems boot our ISO9660 disk images Danny Milosavljevic
2017-07-20 19:44   ` [bug#27705] [PATCH v3 1/4] gnu: grub-efi: Add mtools input Danny Milosavljevic
2017-07-20 19:44   ` [bug#27705] [PATCH v3 2/4] build: Allow mounting of entire disks Danny Milosavljevic
2017-07-20 19:44   ` [bug#27705] [PATCH v3 3/4] gnu: Add grub-hybrid Danny Milosavljevic
2017-07-20 19:44   ` [bug#27705] [PATCH v3 4/4] vm: Use grub-hybrid's grub-mkrescue Danny Milosavljevic
2017-07-20 23:06 ` [bug#27705] [PATCH v4 0/4] Make both EFI and non-EFI systems boot our ISO9660 disk images Danny Milosavljevic
2017-07-20 23:06   ` [bug#27705] [PATCH v4 1/4] gnu: grub-efi: Add mtools input Danny Milosavljevic
2017-07-29 17:59     ` Danny Milosavljevic
2017-07-20 23:06   ` [bug#27705] [PATCH v4 2/4] build: Allow mounting of entire disks Danny Milosavljevic
2017-08-05 17:34     ` Danny Milosavljevic
2017-08-05 21:25       ` Ludovic Courtès
2017-07-20 23:06   ` [bug#27705] [PATCH v4 3/4] gnu: Add grub-hybrid Danny Milosavljevic
2017-08-03 14:36     ` Danny Milosavljevic
2017-07-20 23:06   ` [bug#27705] [PATCH v4 4/4] vm: Use grub-hybrid's grub-mkrescue Danny Milosavljevic
2017-08-03 16:12     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170720191223.17189-3-dannym@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=27705@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).