Skip to main content
Topic: [SOLVED]Stuck on Loading initial ramdisk after Emergency chroot Linux re-install (Read 1868 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED]Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Hello, I come to you in an absolute state of panic. I know very little about all this stuff, and really need your help.

I updated my main rig, running a dual Windows 10/runit Artix boot, about a few hours ago now. There was some error about it downloading too slow, so the first run of pacman -Syu did not complete. This happens on my laptop when I'm using university wi-fi, so I thought nothing of it. I re-did it, it completed, and I restarted.

I was greeted by the GRUB screen, as usual, when trying to launch Artix told me it could not locate "vmlinuz-linux" or something along those lines. I panicked, got into the Artix installation environment off my thumbdrive, chrooted in following the advice of Archwiki, installed linux and linux-lts (I didn't understand these were different kernels altogether). I rebuilt everything under /etc/mkinitcpio.d via mkinitcpio -P and rebuilt the GRUB settings with grub-mkconfig -o /boot/grub/grub.cfg. Good news -- it now doesn't throw me that error anymore. Bad news, it is now stuck on "Loading initial ramdisk...". I can get in on the linux-lts version, but this one has a bunch of stuff broken, most notably my wifi and dual monitor displays, and I presume that's because it's a different kernel and therefore the drivers don't work.

I am stumped. I had also tried installing linux-headers and reinstalling base-devel, but to no avail. I really can't overstate how little of an idea I have regarding this sort of thing. As of now, I can still access the files via the Artix installation environment on the USB drive, so we're not total code red yet. Push comes to shove, I could just move these onto my secondary storage drive and move them into Windows, but I have a lot of things that would take a lot of time to replace on there. I am still panicking right now. Any help would be incredibly appreciated.

 

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #1
Update: after tooling around a bit more, I tried the method notated here, and my Artix Linux is back to booting as normal!

However, a new problem has arisen. The driver(?) issue I described with the -lts kernel is present on my normal kernel (although the displays are functioning normally now). Most pressingly, I cannot connect to the internet. Connman shows me "Error /net/connman/technology/wifi: Not supported" when I try to scan for wi-fi, and attempts to use Network Manager similarly show me absolutely nothing. Archwiki says that Connman pops this error when wpa_supplicant isn't installed, but I do have wpa_supplicant installed (although I am unsure how to check if it is running). The only thing I can think of is that I used the "cp /etc/resolv.conf etc/resolv.conf" command as detailed in the Archwiki chroot article.

Any help on this issue would be greatly appreciated.

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #2
but I do have wpa_supplicant installed (although I am unsure how to check if it is running).
You also need to install the package wpa_supplicant-<your_init> and enable and start the corresponding service. How to do that depends on your init. You should be familiar with how to manage services in your init. If you aren't, read the wiki.

Also read:
https://wiki.archlinux.org/title/Network_configuration
https://wiki.archlinux.org/title/Network_configuration/Wireless

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #3
Right, I had wpa_supplicant-runit installed, and it was not in the Runit services, for reasons beyond my comprehension. I linked it, but now it's giving me timeouts if I try to activate the service.

With
Code: [Select]
sudo sv status wpa_supplicant
It tells me:
Code: [Select]
down: wpa_supplicant: 1s, normally up, want up

Trying to restart the wpa_supplicant service gets me this:
Code: [Select]
timeout: down: wpa_supplicant: 1s, normally up, want up

I'm gonna give it a restart but I'm not hopeful it'll fix my problem.

Edit: Typo, no dice on the restart either.


Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #5
@dogggs

You've mentioned ConnMan earlier.  connnand and NetworkManager services cannot run both at the same time.  One prevents another from running normally.

If not already done so, check that connmand service is not running.  To allow NetworkManager service to be loaded and run on startup without a conflict, connmand service must be disabled from being loaded:
Code: [Select]
sudo touch /etc/runit/sv/connmand/down
Then restart X session (or reboot).

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #6
I tried making a config file as described on the wiki (sudo wpa_passphrase MyNetwork "mypassword" > /etc/wpa_supplicant/example.conf) but it showed an error
Code: [Select]
bash: /etc/wpa_supplicant/example.conf: Permission denied

Used a code I found online which "worked":
Code: [Select]
sudo sh -c 'wpa_passphrase MyNetwork "mypassword" > /etc/wpa_supplicant.conf'
But this code only makes a file named as such. It's completely empty.

No output whatsoever for your command all throughout this, by the way.

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #7
To be able to write to /etc, normally you need to be root.

You can run just the command
Code: [Select]
wpa_passphrase MyNetwork "mypassword"
and check the output. For example, if the passphrase is too short, you will get an error message about it.

Anyway, you can create the file manually, there is an example in the wiki article.

Edit: It is explicitly mentioned in the wiki article that:
Quote
Note: Because of the process substitution, you cannot run this command with sudo and must use a root shell, see Help:Reading#Regular user or root for more explanations. Just pre-pending sudo will lead to the following error:
Successfully initialized wpa_supplicant
Failed to open config file '/dev/fd/63', error: No such file or directory
Failed to read or parse configuration '/dev/fd/63'
In general, everything is explained in that article, just read it.

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #8
I have no idea what I'm doing wrong. This might be terrible reading comprehension on my part. I did the command from the wiki in a root shell and the files made are still 0 B empty ones. Even the file in /usr/share/doc/wpa_supplicant is totally empty. In the root shell, the output of wpa_passphrase MyNetwork "mypassword" is still completely empty.

I copied the entire example.conf file from the Archwiki article into wpa_supplicant.conf. Nothing either. Your command and wpa_passphrase MyNetwork "password" still show nothing.

I'm just confused as to how this all got deleted or unlinked. My internet worked fine for the longest time.

@just
Turns out I forgot to download the networkmanager-runit package, so it wasn't running. For curiousity's sake, I downloaded that through chroot and activated it. Shows my ethernet driver but still nothing on the wi-fi front. As @strajder is being nice enough to help me on the wpa_supplicant front, I've deactivated it and went to back to connman for the time being.

Edit: Thanks so much to both of you for trying to help. I'm going to bed, any more ideas are all greatly appreciated.

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #9
I have no idea what I'm doing wrong. This might be terrible reading comprehension on my part. I did the command from the wiki in a root shell and the files made are still 0 B empty ones. Even the file in /usr/share/doc/wpa_supplicant is totally empty. In the root shell, the output of wpa_passphrase MyNetwork "mypassword" is still completely empty.
Sorry, but this is hard to believe if you installed the official package without having a full hard disk or something like that. If this is so, then your installation of wpa_supplicant is corrupted. Just reinstall it from /var/cache/pacman/pkg, or, if all else fails, just reinstall your entire system from the installation media.

Re: Stuck on Loading initial ramdisk after Emergency chroot Linux re-install

Reply #10
Well, it seemed like a total system corruption occured somehow. I tried to fix the issue to no avail. All sorts of error messages just trying to reinstall packages from the pacman cache. Ultimately, I just went with @strajder 's recommendation and did a full reinstall. Could recover all my important files, so it wasn't a huge deal. Thank you for your help. I'll mark this solved when I get back on my PC.