* Stuck at scheme prompt when booting @ 2022-02-09 16:00 coralgoat--- via [not found] ` <MvUCoKH--7-2@tuta.io-MveXQCV----2> 0 siblings, 1 reply; 8+ messages in thread From: coralgoat--- via @ 2022-02-09 16:00 UTC (permalink / raw) To: help-guix I have run into a problem with booting a computer that is running the Guix operating system. After entering the passphrase when prompted with: > Enter passphrase for /dev/sda1: I end up at this prompt: > scheme@(guile-user)> and the system does not continue to boot. I have not made any changes to my system configuration to cause this issue. Below is the sequence that results in me getting the "scheme@(guile-user)>" prompt. In the output below it says "',q' to continue" but when I do that at this prompt I am greeted there is a lot of output with the last line of the output saying: > ---[ end Kernel panic - not syncing: Attempted to kill init! exit > code=0x00000000 ]--- Is there something I need to enter at this scheme prompt to continue with the booting this computer? If there is not a way to continue booting this computer from this scheme prompt how should I attempt data recovery from the encrypted hard drive? Any help with this would be appreciated. Thank you --- 1) I push the power button to power on the system. 2) It says: > Grub loading.. Welcome to GRUB! Attempting to decrypt master > key... Enter passphrase for hd0,msdos1 > (lone-string-hexadecimal-characters): 3) I enter the passphrase 4) It says: "Slot 0 opened" 5) The Grub menu is displayed 6) I do nothing and it continues after the grub timer finishes counting down. 7) These messages are displayed: > x86/cpu: VMX (outside TXT) disabled by BIOS ACPI Error: > AE_NOT_FOUND, While resolving a named reference package element - > 2001 (20201113/dspkginit-440) ACPI Error: AE_NOT_FOUND, While > resolving a named reference package element - 2001 > (20201113/dspkginit-440) GC Warning: pthread_getattr_np or > pthread_attr_getstack failed for main thread GC Warning: Couldn't > read /proc/stat Welcome, this is GNU's early boot Guile. Use > '--repl' for an initrd REPL. loading kernal modules... 8) Then it prompts me for a passphrase: > Enter passphrase for /dev/sda1: 9a) If I deliberately enter the wrong passphrase it says: > No key available with this passphrase. Enter passphrase for > /dev/sda1: 9b) If I enter the right passphrase it says: > /dev/mapper/cryptroot: recovering journal > /dev/mapper/cryptroot: clean, #/# files, #/# blocks > loading '/gnu/store/hash-system/boot'... > making '/gnu/store/hash-system' the current system. > . > setting up setuid programs in '/run/setuid-programs'... > populating /etc from /gnu/store/hash-etc... > ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure > copy-file: Operation not permitted > Entering a new prompt. Type ',bt' for a backtrace or ',q' to > continue. > GNU Guile 3.0.2 Copyright (C) 1995-2020 Free Software > Foundation, Inc. > Guile comes with ABSOLUTELY NO WARRANTY; for details type ',show w'. > This program is free software, and you are welcome to redistribute > it under certain conditions; type ',show c' for details. > Enter ',help' for help. > scheme@(guile-user)> ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <MvUCoKH--7-2@tuta.io-MveXQCV----2>]
* Re: Stuck at scheme prompt when booting [not found] ` <MvUCoKH--7-2@tuta.io-MveXQCV----2> @ 2022-02-12 19:15 ` coralgoat--- via 2022-02-12 22:08 ` Ricardo Wurmus 2022-02-12 23:11 ` SeerLite 0 siblings, 2 replies; 8+ messages in thread From: coralgoat--- via @ 2022-02-12 19:15 UTC (permalink / raw) To: coralgoat; +Cc: Help Guix I have some more information to add to my initial message. I have opened the computer to make sure the hard drive has a good connection to the motherboard and it does. I have also tried typing `,bt` at the "scheme@(guile-user)>" prompt the output is included below. Note there is a solid white square single character symbol in the output and I am representing it as "***" in the output below. The line in the output that catches my attention is: "1 (copy-file "/etc/static/resolv.conf" "/etc/resolv.conf")" This catches my attention because I took this computer to second location where I tried connecting to a WiFi network. I was getting domain name resolution errors and was not able to connect to the internet. I resolved the domain name resolution errors by doing 2 things: 1) editing /etc/resolv.conf changing it to a single line that set a specific nameserver 2) I ran this command `chattr +i /etc/resolv.conf` After doing these two things the internet connection was okay. When I was done in the second location I powered off the computer and moved to a third location and when it tried to turn on the computer in the third location I was stuck at this scheme prompt. I think that if I ran the command `chattr -i /etc/resolv.conf` it might fix the problem and allow the system to boot however I get an error when I try typing that at the scheme prompt. Any suggestions on how I should get a Linux console terminal so I can enter the `chattr -i /etc/resolv.conf` command? I could try booting an operating system in memory and then use a disk encryption program to decrypt the hard drive with my passphrase and then run `chattr -i /etc/resolv.conf`. What disk encryption program should I use to decrypt the hard disk? Thank you ,bt output: ``` In gnu/build/linux-boot.scm: 617:14 9 (_) In unknown file: 8 (primitive-load "gun/store/a-long-hash***") In ice-9/eval.scm: 619:8 7 (_ #f) In unknown file: 6 (primitive-load "gun/store/a-long-hash***") In srfi/srfi-1.scm: 634:9 5 (for-each #<procedure primitive-load (_)> _) In unknown file: 4 (primitive-load "gun/store/a-long-hash***") In srfi/srfi-1.scm: 634:9 3 (for-each #<procedure 7fd6fc3d1ec8 at gnu/build/activa***> ***) In gnu/build/activation.scm: 265:20 2 (_ _) In unknown file: 1 (copy-file "/etc/static/resolv.conf" "/etc/resolv.conf") In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) ``` Feb 9, 2022, 16:00 by help-guix@gnu.org: > I have run into a problem with booting a computer that is running the > Guix operating system. > > After entering the passphrase when prompted with: > >> Enter passphrase for /dev/sda1: >> > > I end up at this prompt: > >> scheme@(guile-user)> >> > > and the system does not continue to boot. > > I have not made any changes to my system configuration to cause this > issue. > > Below is the sequence that results in me getting the > "scheme@(guile-user)>" prompt. > > In the output below it says "',q' to continue" but when I do that at > this prompt I am greeted there is a lot of output with the last line > of the output saying: > >> ---[ end Kernel panic - not syncing: Attempted to kill init! exit >> > > code=0x00000000 ]--- > > Is there something I need to enter at this scheme prompt to continue > with the booting this computer? > > If there is not a way to continue booting this computer from this > scheme prompt how should I attempt data recovery from the encrypted > hard drive? > > Any help with this would be appreciated. > > Thank you > > --- > > 1) I push the power button to power on the system. > > 2) It says: > >> Grub loading.. Welcome to GRUB! Attempting to decrypt master >> key... Enter passphrase for hd0,msdos1 >> (lone-string-hexadecimal-characters): >> > > 3) I enter the passphrase > > 4) It says: "Slot 0 opened" > > 5) The Grub menu is displayed > > 6) I do nothing and it continues after the grub timer finishes > counting down. > > 7) These messages are displayed: > >> x86/cpu: VMX (outside TXT) disabled by BIOS ACPI Error: >> AE_NOT_FOUND, While resolving a named reference package element - >> 2001 (20201113/dspkginit-440) ACPI Error: AE_NOT_FOUND, While >> resolving a named reference package element - 2001 >> (20201113/dspkginit-440) GC Warning: pthread_getattr_np or >> pthread_attr_getstack failed for main thread GC Warning: Couldn't >> read /proc/stat Welcome, this is GNU's early boot Guile. Use >> '--repl' for an initrd REPL. loading kernal modules... >> > > 8) Then it prompts me for a passphrase: > >> Enter passphrase for /dev/sda1: >> > > 9a) If I deliberately enter the wrong passphrase it says: > >> No key available with this passphrase. Enter passphrase for >> /dev/sda1: >> > > 9b) If I enter the right passphrase it says: > >> /dev/mapper/cryptroot: recovering journal >> /dev/mapper/cryptroot: clean, #/# files, #/# blocks >> loading '/gnu/store/hash-system/boot'... >> making '/gnu/store/hash-system' the current system. >> . >> setting up setuid programs in '/run/setuid-programs'... >> populating /etc from /gnu/store/hash-etc... >> ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure >> copy-file: Operation not permitted >> Entering a new prompt. Type ',bt' for a backtrace or ',q' to >> continue. >> GNU Guile 3.0.2 Copyright (C) 1995-2020 Free Software >> Foundation, Inc. >> Guile comes with ABSOLUTELY NO WARRANTY; for details type ',show w'. >> This program is free software, and you are welcome to redistribute >> it under certain conditions; type ',show c' for details. >> Enter ',help' for help. >> scheme@(guile-user)> >> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-12 19:15 ` coralgoat--- via @ 2022-02-12 22:08 ` Ricardo Wurmus 2022-02-15 20:38 ` coralgoat--- via 2022-02-12 23:11 ` SeerLite 1 sibling, 1 reply; 8+ messages in thread From: Ricardo Wurmus @ 2022-02-12 22:08 UTC (permalink / raw) To: coralgoat; +Cc: help-guix coralgoat--- via <help-guix@gnu.org> writes: > I have some more information to add to my initial message. > > I have opened the computer to make sure the hard drive has a good > connection to the motherboard and it does. > > I have also tried typing `,bt` at the "scheme@(guile-user)>" prompt > the output is included below. Note there is a solid white square > single character symbol in the output and I am representing it as > "***" in the output below. > > The line in the output that catches my attention is: > "1 (copy-file "/etc/static/resolv.conf" "/etc/resolv.conf")" This file is generated every time Guix System boots. Most of the system is instantiated anew on every boot. This also includes creating user accounts. Having a file there that cannot be modified is indeed the problem here. > I think that if I ran the command `chattr -i /etc/resolv.conf` it > might fix the problem and allow the system to boot however I get an > error when I try typing that at the scheme prompt. > > Any suggestions on how I should get a Linux console terminal so I can > enter the `chattr -i /etc/resolv.conf` command? (system* "/gnu/store/…-bash/bin/bash") but for that to work you’d have to know the hash. Dependent on how far along the boot process has come along you may already have /run/current-system/profile/bin/bash, so try (system* "/run/current-system/profile/bin/bash") This gives you a proper shell. You may also have chattr in that location, so you could do this directly: (system* "/run/current-system/profile/bin/chattr" "-i" "/etc/resolv.conf") -- Ricardo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-12 22:08 ` Ricardo Wurmus @ 2022-02-15 20:38 ` coralgoat--- via 2022-02-15 20:51 ` Ricardo Wurmus 0 siblings, 1 reply; 8+ messages in thread From: coralgoat--- via @ 2022-02-15 20:38 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Help Guix Thank you for sharing those commands. I was able to start bash but at that point in the start up process chattr is not available. Feb 12, 2022, 22:08 by rekado@elephly.net: > > coralgoat--- via <help-guix@gnu.org> writes: > >> I have some more information to add to my initial message. >> >> I have opened the computer to make sure the hard drive has a good >> connection to the motherboard and it does. >> >> I have also tried typing `,bt` at the "scheme@(guile-user)>" prompt >> the output is included below. Note there is a solid white square >> single character symbol in the output and I am representing it as >> "***" in the output below. >> >> The line in the output that catches my attention is: >> "1 (copy-file "/etc/static/resolv.conf" "/etc/resolv.conf")" >> > > This file is generated every time Guix System boots. Most of the system > is instantiated anew on every boot. This also includes creating user > accounts. > > Having a file there that cannot be modified is indeed the problem here. > >> I think that if I ran the command `chattr -i /etc/resolv.conf` it >> might fix the problem and allow the system to boot however I get an >> error when I try typing that at the scheme prompt. >> >> Any suggestions on how I should get a Linux console terminal so I can >> enter the `chattr -i /etc/resolv.conf` command? >> > > (system* "/gnu/store/…-bash/bin/bash") > > but for that to work you’d have to know the hash. Dependent on how far > along the boot process has come along you may already have > /run/current-system/profile/bin/bash, so try > > (system* "/run/current-system/profile/bin/bash") > > This gives you a proper shell. > > You may also have chattr in that location, so you could do this > directly: > > (system* "/run/current-system/profile/bin/chattr" "-i" "/etc/resolv.conf") > > -- > Ricardo > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-15 20:38 ` coralgoat--- via @ 2022-02-15 20:51 ` Ricardo Wurmus 2022-02-15 21:53 ` coralgoat--- via 0 siblings, 1 reply; 8+ messages in thread From: Ricardo Wurmus @ 2022-02-15 20:51 UTC (permalink / raw) To: coralgoat; +Cc: Help Guix coralgoat@tuta.io writes: > Thank you for sharing those commands. > > I was able to start bash but at that point in the start up process > chattr is not available. Can you access /gnu/store already? Or unlock the disk with cryptsetup? -- Ricardo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-15 20:51 ` Ricardo Wurmus @ 2022-02-15 21:53 ` coralgoat--- via 0 siblings, 0 replies; 8+ messages in thread From: coralgoat--- via @ 2022-02-15 21:53 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: Help Guix I did not try accessing /gnu/store. I booted the Guix install image. Then used cryptsetup to decrypt the hard drive. After using chattr -i on resolv.conf I am now able to boot the system again. Feb 15, 2022, 20:51 by rekado@elephly.net: > > coralgoat@tuta.io writes: > >> Thank you for sharing those commands. >> >> I was able to start bash but at that point in the start up process >> chattr is not available. >> > > Can you access /gnu/store already? Or unlock the disk with cryptsetup? > > -- > Ricardo > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-12 19:15 ` coralgoat--- via 2022-02-12 22:08 ` Ricardo Wurmus @ 2022-02-12 23:11 ` SeerLite 2022-02-15 20:46 ` coralgoat--- via 1 sibling, 1 reply; 8+ messages in thread From: SeerLite @ 2022-02-12 23:11 UTC (permalink / raw) To: coralgoat; +Cc: Help Guix On 2/12/22 15:15, coralgoat--- via wrote: > I could try booting an operating system in memory and then use a disk > encryption program to decrypt the hard drive with my passphrase and > then run `chattr -i /etc/resolv.conf`. What disk encryption program > should I use to decrypt the hard disk? Guix uses dm-crypt so you should be able to use the cryptsetup tool available in most distributions by default: cryptsetup open /dev/sda2 guix The above command creates decrypted representation of the /dev/sda2 partition at /dev/mapper/guix. You can mount this file like any other partition. This should be enough to access the contents of the system in case the boot process completely breaks. However in this case Ricardo's advice may be enough to get it to work from within Guix itself. I explained the above for future reference or in case it doesn't work. > I resolved the domain name resolution errors by doing 2 > things: > 1) editing /etc/resolv.conf changing it to a single line that set a > specific nameserver > 2) I ran this command `chattr +i /etc/resolv.conf` If you want to avoid getting /etc/resolv.conf modified, instead of adding the immutable attribute to the file (AKA changing the "state" of the file) you should configure the responsible service so it doesn't modify it in the first place. This is especially important in a declarative system like Guix, where the operating-system and its services should function no matter the *state* of the files in it. Almost every system-level setting can be configured with Guix's configuration system. And using it prevents broken configurations like these from making the system completely unbootable, as you would be able to boot to a previous generation from the boot menu. I'm assuming you're using a configuration based on the official example, so the service that modifies this file should be NetworkManager coming from %desktop-services. To disable its modification to /etc/resolv.conf you can set the `dns` field to "none" in its `network-manager-configuration`. You can modify it by using `modify-services` on %desktop-services. See these manual pages for the usage of modify-services and also documentation of network-manager-configuration: * https://guix.gnu.org/manual/en/html_node/Service-Reference.html * https://guix.gnu.org/manual/en/html_node/Networking-Services.html SeerLite ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Stuck at scheme prompt when booting 2022-02-12 23:11 ` SeerLite @ 2022-02-15 20:46 ` coralgoat--- via 0 siblings, 0 replies; 8+ messages in thread From: coralgoat--- via @ 2022-02-15 20:46 UTC (permalink / raw) To: SeerLite; +Cc: Help Guix Thank you for letting me know Guix uses cryptsetup for drive encryption. I booted the Guix install ISO then I did this: decrypted the drive mounted the drive at /mnt/guix ran `chattr -i mnt/guix/etc/resolv.conf` rebooted the system Now I am able to boot successfully. Feb 12, 2022, 23:11 by seerlite@nixnet.email: > On 2/12/22 15:15, coralgoat--- via wrote: > >> I could try booting an operating system in memory and then use a disk >> encryption program to decrypt the hard drive with my passphrase and >> then run `chattr -i /etc/resolv.conf`. What disk encryption program >> should I use to decrypt the hard disk? >> > > Guix uses dm-crypt so you should be able to use the cryptsetup tool available in most distributions by default: > > cryptsetup open /dev/sda2 guix > > The above command creates decrypted representation of the /dev/sda2 partition at /dev/mapper/guix. You can mount this file like any other partition. This should be enough to access the contents of the system in case the boot process completely breaks. > > However in this case Ricardo's advice may be enough to get it to work from within Guix itself. I explained the above for future reference or in case it doesn't work. > >> I resolved the domain name resolution errors by doing 2 >> things: >> 1) editing /etc/resolv.conf changing it to a single line that set a >> specific nameserver >> 2) I ran this command `chattr +i /etc/resolv.conf` >> > > If you want to avoid getting /etc/resolv.conf modified, instead of adding the immutable attribute to the file (AKA changing the "state" of the file) you should configure the responsible service so it doesn't modify it in the first place. > This is especially important in a declarative system like Guix, where the operating-system and its services should function no matter the *state* of the files in it. Almost every system-level setting can be configured with Guix's configuration system. And using it prevents broken configurations like these from making the system completely unbootable, as you would be able to boot to a previous generation from the boot menu. > > I'm assuming you're using a configuration based on the official example, so the service that modifies this file should be NetworkManager coming from %desktop-services. To disable its modification to /etc/resolv.conf you can set the `dns` field to "none" in its `network-manager-configuration`. You can modify it by using `modify-services` on %desktop-services. > > See these manual pages for the usage of modify-services and also documentation of network-manager-configuration: > * https://guix.gnu.org/manual/en/html_node/Service-Reference.html > * https://guix.gnu.org/manual/en/html_node/Networking-Services.html > > > SeerLite > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-02-15 22:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-02-09 16:00 Stuck at scheme prompt when booting coralgoat--- via [not found] ` <MvUCoKH--7-2@tuta.io-MveXQCV----2> 2022-02-12 19:15 ` coralgoat--- via 2022-02-12 22:08 ` Ricardo Wurmus 2022-02-15 20:38 ` coralgoat--- via 2022-02-15 20:51 ` Ricardo Wurmus 2022-02-15 21:53 ` coralgoat--- via 2022-02-12 23:11 ` SeerLite 2022-02-15 20:46 ` coralgoat--- via
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).