r/NixOS • • 1d ago

Help Installation

Post image

/FIXED/
So, because of the hype and customization, I wanted to try NixOS but I keep getting sent to the Emergency Shell, and this is what I see at 'journalctl -xb'.

I tried fixing this for almost 6 hours now, even with the help of AI, I couldnt get the Installer ISO to run.
Can you guys help about it?

4 Upvotes

18 comments sorted by

3

u/No_External_4869 1d ago edited 1d ago

Can you reboot and press e when GRUB lists NixOS boot entires? Check if kernel command line does have "init" parameter. Have you tried reflashing? Maybe it's corrupt? 

1

u/Kolechia_ 1d ago

Yes. I do indeed see a "init" parameter as:
init=/nix/store/x54d805c3hg6lv5mnv58b3d696134x8y-nixos-system-nixos-26.11beta285.3068c73a96a6/init

I don't know what you mean with "reflashibf" but I'm using Ventoy to download, maybe that is the problem i'm thinking.

3

u/No_External_4869 1d ago

I meant reflashing. Sometimes it gets corrupted. Can you try not using ventoy and using say dd or KDE iso tool? 

1

u/Kolechia_ 1d ago

I'll try transferring all my ventoy files to a seperate pc and then flash the iso to the usb with rufus. I'll let you know if it works.

1

u/Kolechia_ 1d ago

so i just flashed to a usb using rufus, booted, and i first didnt get emergency shell, I saw the plymouth going on for like a minute and half, maybe 2 minutes, but then it randomly dropped back to tty saying "You're in emergency shell."

1

u/Rich_Warthog8823 1d ago

No idea if it'll help, but for me, I used Rufus to flash the graphical installer on to a thumb drive and it worked for me.  If you're doing the barebones installation, I forget how that goes but there's a tutorial in the wiki.

1

u/Kolechia_ 1d ago

i think rufus was a bad idea, cause when I used Balena Etcher NixOS actually opened.
Still thanks for the "flash the usb" idea.

1

u/Familiar_Region2409 1d ago

So you get inside the installation medium ?

1

u/Kolechia_ 1d ago

yeah. I finally got in.

1

u/Familiar_Region2409 1d ago

So everything works fine right ?

1

u/Kolechia_ 1d ago

yup. I got nixos installed. Now I gotta find out how I'll use this thing 🫩😫
anyways, as a former gentoo user I dont think this'll be as painful as that.

1

u/Familiar_Region2409 1d ago

Ooo nice, you were a gentoo user, that's soo sick(I always wanted to try that distro but nixos have my heart ). Don't worry just try to learn the flakes mechanism.

1

u/Kolechia_ 1d ago

yeah, I still use in my main pc with a custom Berry + Lemonbar config, and I also use LFS in a USB.

I'm very excited at using NixOS for the first time. I believe it'll be a seriously big step on my life.

1

u/SDG_Den 1d ago

if you did the flash from another linux distro, did you perhaps forget to run `sync` afterwards?

the kernel doesn't disable caching for external media by default, so unless you safe-eject or run `sync` first, a flashing tool can write its data, think its done, but the data has actually been written to the RAM cache and is not fully on the disk yet. this can cause all sorts of wacky issues.

i've had the same kinds of problems copying ISO files to my ventoy, replaced the SSD in it, upgraded ventoy, re-copied, nothing worked. until i started running `sync` after every copy or just... waiting 30 minutes to ensure the RAM cache was fully flushed.

on my new system, i disabled caching on external media alltogether.

it might be that the flush happened properly when you used balena etcher, or that balena etcher runs `sync` itself to ensure flush happens.

1

u/No_Ticket8446 7h ago

Do you have a config for it?

1

u/SDG_Den 7h ago

simply add `sync` to your udisks config.

[defaults]
defaults=sync

in /etc/udisks2/mount_options.conf for other distributions

for nixOS, the equivalent would be:

services.udisks2 = {
  enable = true;
  settings."mount_options.conf".defaults = {
    defaults = "sync" 
  };
};

1

u/No_Ticket8446 7h ago

Thanks 🙏

1

u/No_Range_2323 1d ago

Ventoy works for me. Rufus was maybe a bad idea. https://nixos.org/manual/nixos/stable/#sec-booting-from-usb