summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index b8b0274f1f..b6a777353f 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -383,7 +383,13 @@ such as /etc files."
(system* grub "--no-floppy"
"--boot-directory" "/fs/boot"
"/dev/sda"))
- (zero? (system* umount "/fs"))
+ (begin
+ (when (file-exists? "/fs/dev/pts")
+ ;; Unmount devpts so /fs itself can be
+ ;; unmounted (failing to do that leads to
+ ;; EBUSY.)
+ (system* umount "/fs/dev/pts"))
+ (zero? (system* umount "/fs")))
(reboot))))))))
#:system system
#:inputs `(("parted" ,parted)