[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
179/197: installer: Mount all partitions instead of just the root.
From: |
Danny Milosavljevic |
Subject: |
179/197: installer: Mount all partitions instead of just the root. |
Date: |
Mon, 3 Jul 2017 20:37:21 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 41f4eb5d09cab7fc7756a1c74165b44fc8294f48
Author: John Darrington <address@hidden>
Date: Mon Feb 13 11:39:36 2017 +0100
installer: Mount all partitions instead of just the root.
* gnu/system/installer/install.scm (install-page-key-handler): Iterate
through all declared mount points and mount all of them before commencing
the install.
---
gnu/system/installer/install.scm | 92 +++++++++++++++++++++++-----------------
1 file changed, 52 insertions(+), 40 deletions(-)
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 0d966ea..898f3aa 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -24,6 +24,7 @@
#:use-module (gnu system installer filesystems)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
+ #:use-module (srfi srfi-1)
#:use-module (gurses buttons)
#:use-module (ncurses curses)
#:use-module (guix store)
@@ -102,47 +103,58 @@
((buttons-key-matches-symbol? nav ch 'continue)
(let ((target "/target")
- (window-port (make-window-port config-window))
- (root-device (find-mount-device "/" mount-points)))
-
+ (window-port (make-window-port config-window)))
(catch #t
- (lambda ()
- (and
- (mkdir-p target)
-
- (mount root-device target
- (symbol->string
- (file-system-spec-type (assoc-ref mount-points
root-device)))
- #:update-mtab? #f)
-
- (zero? (pipe-cmd window-port "herd"
- "herd" "start" "cow-store" target))
-
- (mkdir-p (string-append target "/etc"))
- (or (copy-file config-file
- (string-append target "/etc/config.scm"))
- #t)
-
- (file-exists? (string-append target "/etc/config.scm"))
-
- (display (gettext "Installing the system ...") window-port)
- (force-output window-port)
-
- (zero? (pipe-cmd window-port "guix" "guix" "system" "init"
"--fallback"
- (string-append target "/etc/config.scm")
- target))
-
- (display (gettext
- "Installation is complete. You should remove the
device containing the installer image and reboot now.")
- window-port)))
- (lambda (key . args)
- #f)
- (lambda (key subr message args . rest)
- (display-error (stack-ref (make-stack #t) 3)
- window-port subr message args rest)))
-
- (close-port window-port))))
- #f))
+ (lambda ()
+ (and
+
+ (fold
+ (lambda (x prev)
+ (and prev
+ (let* ((device (car x))
+ (fss (cdr x))
+ (mp (file-system-spec-mount-point fss))
+ (mpt (string-append target mp)))
+ (mkdir-p mpt)
+ (mount device mpt
+ (symbol->string
+ (file-system-spec-type fss))
+ #:update-mtab? #f))))
+ #t
+ (sort
+ mount-points
+ (lambda (x y)
+ (< (string-length (file-system-spec-mount-point (cdr x)))
+ (string-length (file-system-spec-mount-point (cdr
y)))))))
+
+ (zero? (pipe-cmd window-port "herd"
+ "herd" "start" "cow-store" target))
+
+ (mkdir-p (string-append target "/etc"))
+ (or (copy-file config-file
+ (string-append target "/etc/config.scm"))
+ #t)
+
+ (file-exists? (string-append target "/etc/config.scm"))
+
+ (display (gettext "Installing the system ...") window-port)
+ (force-output window-port)
+
+ (zero? (pipe-cmd window-port "guix" "guix" "system" "init"
"--fallback"
+ (string-append target "/etc/config.scm")
+ target))
+
+ (display (gettext
+ "Installation is complete. You should remove the
device containing the installer image and reboot now.")
+ window-port)))
+ (lambda (key . args)
+ #f)
+ (lambda (key subr message args . rest)
+ (display-error (stack-ref (make-stack #t) 3)
+ window-port subr message args rest)))
+
+ (close-port window-port))))
+ #f))
(define (install-page-refresh page)
(when (not (page-initialised? page))
- 97/197: installer: Whitespace changes only, (continued)
- 97/197: installer: Whitespace changes only, Danny Milosavljevic, 2017/07/03
- 139/197: installer: Allow file system specifications to be removed., Danny Milosavljevic, 2017/07/03
- 136/197: installer: No passphrase is needed for clear networks., Danny Milosavljevic, 2017/07/03
- 138/197: installer: Clear the mount point field for swap file systems., Danny Milosavljevic, 2017/07/03
- 135/197: installer: Use a "hard" method of rebooting. Do not rely on shepherd., Danny Milosavljevic, 2017/07/03
- 148/197: installer: Support WEP encrypted wireless., Danny Milosavljevic, 2017/07/03
- 176/197: installer: Fix incorrect symbol in generated config file., Danny Milosavljevic, 2017/07/03
- 177/197: installer: Remove non-existant supplementary group., Danny Milosavljevic, 2017/07/03
- 182/197: installer: Kill old dhclient instance before starting new one., Danny Milosavljevic, 2017/07/03
- 189/197: installer: Fix buglet where keys were sometimes ignored in users page., Danny Milosavljevic, 2017/07/03
- 179/197: installer: Mount all partitions instead of just the root.,
Danny Milosavljevic <=
- 190/197: gurses: forms: Minor refactor., Danny Milosavljevic, 2017/07/03
- 194/197: guix system: Remove outdated (gnu system grub) import., Danny Milosavljevic, 2017/07/03
- 197/197: installer: Use "G_" instead of "_"., Danny Milosavljevic, 2017/07/03
- 188/197: installer: Go back to main menu after "cancel", Danny Milosavljevic, 2017/07/03
- 184/197: installer: Create dedicated module to maintainer the page stack., Danny Milosavljevic, 2017/07/03
- 126/197: installer: mount-points page: Enlarge the forms window., Danny Milosavljevic, 2017/07/03
- 96/197: installer: Changed N_ to M_ since N_ is used for another purpose in guix/ui.scm, Danny Milosavljevic, 2017/07/03
- 142/197: gurses: xchar->char: New procedure., Danny Milosavljevic, 2017/07/03
- 85/197: installer: Use "lspci -mm" instead of "lspci -m"., Danny Milosavljevic, 2017/07/03
- 88/197: installer: Use a cleaner method of detecting wireless capability for ethernet interfaces., Danny Milosavljevic, 2017/07/03