diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-11-03 10:42:50 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-11-15 12:16:42 +0100 |
| commit | 4f7ffb97a4c2f2ee7aa1c54c23a97e7c0447c08c (patch) | |
| tree | fb8fa6146ac6465c991863041f0a1af141340482 /gnu/installer | |
| parent | de61a0aa4a362795274750d5603909c294d5e036 (diff) | |
installer: Warn about hardware support after the welcome page.
This is a followup to 682639c107908426fe6bf0a1b8404b98b7820290, which
added the uvesafb upfront, before welcome page had been displayed.
* gnu/installer/newt/welcome.scm (check-hardware-support): New
procedure.
(run-welcome-page): Use it.
Diffstat (limited to 'gnu/installer')
| -rw-r--r-- | gnu/installer/newt/welcome.scm | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/gnu/installer/newt/welcome.scm b/gnu/installer/newt/welcome.scm index 326996b0051..1c7372b3be7 100644 --- a/gnu/installer/newt/welcome.scm +++ b/gnu/installer/newt/welcome.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2020, 2022 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2022 Florian Pelz <pelzflorian@pelzflorian.de> | 4 | ;;; Copyright © 2022 Florian Pelz <pelzflorian@pelzflorian.de> |
| 5 | ;;; | 5 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| @@ -121,55 +121,58 @@ we want this page to occupy all the screen space available." | |||
| 121 | (lambda () | 121 | (lambda () |
| 122 | (destroy-form-and-pop form)))))) | 122 | (destroy-form-and-pop form)))))) |
| 123 | 123 | ||
| 124 | (define (run-welcome-page logo) | 124 | (define (check-hardware-support) |
| 125 | "Run a welcome page with the given textual LOGO displayed at the center of | 125 | "Warn about unsupported devices." |
| 126 | the page. Ask the user to choose between manual installation, graphical | 126 | (when (member "uvesafb" (modules-loaded)) |
| 127 | installation and reboot." | 127 | (run-error-page (G_ "\ |
| 128 | (begin | ||
| 129 | (when (member "uvesafb" (modules-loaded)) | ||
| 130 | (run-error-page (G_ "\ | ||
| 131 | This may be a false alarm, but possibly your graphics hardware does not | 128 | This may be a false alarm, but possibly your graphics hardware does not |
| 132 | work well with only free software. Expect trouble. If after installation, | 129 | work well with only free software. Expect trouble. If after installation, |
| 133 | the system does not boot, perhaps you will need to add nomodeset to the | 130 | the system does not boot, perhaps you will need to add nomodeset to the |
| 134 | kernel arguments and need to configure the uvesafb kernel module.") | 131 | kernel arguments and need to configure the uvesafb kernel module.") |
| 135 | (G_ "Pre-install warning"))) | 132 | (G_ "Pre-install warning")))) |
| 136 | (when (file-exists? %core-dump) | 133 | |
| 137 | (match | 134 | (define (run-welcome-page logo) |
| 138 | (choice-window | 135 | "Run a welcome page with the given textual LOGO displayed at the center of |
| 139 | (G_ "Previous installation failed") | 136 | the page. Ask the user to choose between manual installation, graphical |
| 140 | (G_ "Continue") | 137 | installation and reboot." |
| 141 | (G_ "Report the failure") | 138 | (when (file-exists? %core-dump) |
| 142 | (G_ "It seems that the previous installation exited unexpectedly \ | 139 | (match (choice-window |
| 140 | (G_ "Previous installation failed") | ||
| 141 | (G_ "Continue") | ||
| 142 | (G_ "Report the failure") | ||
| 143 | (G_ "It seems that the previous installation exited unexpectedly \ | ||
| 143 | and generated a core dump. Do you want to continue or to report the failure \ | 144 | and generated a core dump. Do you want to continue or to report the failure \ |
| 144 | first?")) | 145 | first?")) |
| 145 | (1 #t) | 146 | (1 #t) |
| 146 | (2 (raise | 147 | (2 (raise |
| 147 | (condition | 148 | (condition |
| 148 | (&user-abort-error)))))) | 149 | (&user-abort-error)))))) |
| 149 | (run-menu-page | 150 | |
| 150 | (G_ "GNU Guix install") | 151 | (run-menu-page |
| 151 | (G_ "Welcome to GNU Guix system installer! | 152 | (G_ "GNU Guix install") |
| 153 | (G_ "Welcome to GNU Guix system installer! | ||
| 152 | 154 | ||
| 153 | You will be guided through a graphical installation program. | 155 | You will be guided through a graphical installation program. |
| 154 | 156 | ||
| 155 | If you are familiar with GNU/Linux and you want tight control over \ | 157 | If you are familiar with GNU/Linux and you want tight control over \ |
| 156 | the installation process, you can instead choose manual installation. \ | 158 | the installation process, you can instead choose manual installation. \ |
| 157 | Documentation is accessible at any time by pressing Ctrl-Alt-F2.") | 159 | Documentation is accessible at any time by pressing Ctrl-Alt-F2.") |
| 158 | logo | 160 | logo |
| 159 | #:listbox-items | 161 | #:listbox-items |
| 160 | `((,(G_ "Graphical install using a terminal based interface") | 162 | `((,(G_ "Graphical install using a terminal based interface") |
| 161 | . | 163 | . |
| 162 | ,(const #t)) | 164 | ,check-hardware-support) |
| 163 | (,(G_ "Install using the shell based process") | 165 | (,(G_ "Install using the shell based process") |
| 164 | . | 166 | . |
| 165 | ,(lambda () | 167 | ,(lambda () |
| 166 | ;; Switch to TTY3, where a root shell is available for shell based | 168 | (check-hardware-support) |
| 167 | ;; install. The other root TTY's would have been ok too. | 169 | ;; Switch to TTY3, where a root shell is available for shell based |
| 168 | (system* "chvt" "3") | 170 | ;; install. The other root TTY's would have been ok too. |
| 169 | (run-welcome-page logo))) | 171 | (system* "chvt" "3") |
| 170 | (,(G_ "Reboot") | 172 | (run-welcome-page logo))) |
| 171 | . | 173 | (,(G_ "Reboot") |
| 172 | ,(lambda () | 174 | . |
| 173 | (newt-finish) | 175 | ,(lambda () |
| 174 | (reboot)))) | 176 | (newt-finish) |
| 175 | #:listbox-item->text car))) | 177 | (reboot)))) |
| 178 | #:listbox-item->text car)) | ||
