this post was submitted on 23 Nov 2023
6 points (68.8% liked)

Linux

48083 readers
774 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
6
submitted 11 months ago* (last edited 11 months ago) by Hiro8811@lemmy.world to c/linux@lemmy.ml
 

Fixed by using grub.

Error when trying to boot into new install. ERROR: device ' ' not found. Skipping fsck. :: mounting ' ' on real root mount : /new_root: no valid filesystem type specified. ERROR: Failed to mount ' ' on real root And I'm getting dropped in emergency shell. I used official wiki, used refind as bootloader. Second time I tried installing and got same error.
Edit1: fstab
`#/dev/nvme0n1p2
UUID=4dae009f-c08f-4636-b1b5-85a4713a6f40 / ext4 rw,relatime 0 1

#/dev/nvme0n1p1
UUID=0019-78B6 /boot vfat rw,relatime, fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2 `
p2 is root partition
p1 is efi partition.

Edit2: running timedatectl in chroot returns System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

all 28 comments
sorted by: hot top controversial new old
[–] Nibodhika@lemmy.world 6 points 11 months ago (2 children)

Refind does not generate the proper Configs when ran from the live image. From the wiki

Warning: When refind-install is run in chroot (e.g. in live system when installing Arch Linux) /boot/refind_linux.conf is populated with kernel options from the live system not the one on which it is installed. Edit /boot/refind_linux.conf and make sure the kernel parameters in it are correct for your system, otherwise you could get a kernel panic on your next boot. See #refind_linux.conf for an example file.

This is how my /boot/refind_linux.conf looks like:

"Boot with standard options"  "rw root=/dev/nvme1n1p2"
"Boot to single-user mode"    "rw root=/dev/nvme1n1p2 single"
"Boot with minimal options"   "ro root=/dev/nvme1n1p2"
[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)

Using nano it just created new file

[–] Nibodhika@lemmy.world 2 points 11 months ago* (last edited 11 months ago) (1 children)

Have you mounted /boot? Usually it's in a different partition so you'll need to mount it.

Edit: yup, your boot is in a different partition according to your fstab

[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)

From where should I mount it? Emergency shell? Chroot?

[–] Nibodhika@lemmy.world 4 points 11 months ago* (last edited 11 months ago) (1 children)

Every time I made this mistake I booted again the live iso, mounted the boot drive and edit it.

Edit: you can also just edit the entry on refind directly to boot once on a correct config, and then fix it inside your actual system. The error is that the root filesystem will have an uuid that relates to the live iso image, not to your actual system.

[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)

I think I managed to mount it but what should I edit?

[–] Nibodhika@lemmy.world 3 points 11 months ago* (last edited 11 months ago) (1 children)

Ok, if I understood correctly your fstab what you should do is:

  1. Boot the live iso
  2. Run mount /dev/nvme0n1p1 /mnt
  3. run nano /mnt/refind_linux.conf
  4. Alter the file so it says this:
"Boot with standard options"  "rw root=/dev/nvme0n1p2"
"Boot to single-user mode"    "rw root=/dev/nvme0n1p2 single"
"Boot with minimal options"   "ro root=/dev/nvme0n1p2"
  1. Save and close
  2. Unmount the drive umount /mnt
  3. Reboot

That should work

Edit: noticed my disk was 1 while yours is 0, didn't remembered I had two ssds on that machine hahahah

Edit2: check that the file exists in /mnt, it should if you ran refind-install the first time.

[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)

I get the same error. Should I install grub?

[–] Nibodhika@lemmy.world 1 points 11 months ago

Did you confirm that the file existed before editing? And that you were mounting the correct boot and not root partition?

I don't know what else it can be if that doesn't solve it.

[–] yianiris@kafeneio.social -1 points 11 months ago (1 children)

systemd doesn't like booting with ro, too dumb to check then mount filesystems.

@Nibodhika @Hiro8811

[–] Nibodhika@lemmy.world 1 points 11 months ago

His fstab says rw, and the example I sent for refind config also has rw on the first option. You can definitely boot systemd on ro, I've done that in the past when I had some issue (can't remember what exactly). The error he's having happens because when you generate the refind config inside the arch live image it adds the UUID of the root of the live iso to the boot parameters, so when it tries to boot from there it can't find the drive with that UUID, ergo the message with an empty string where it should have the drive. The solution is to simply change that to the name of the drive where you have your root. I do that almost every time I install arch because I always forget about this quirk from refind.

[–] foo@withachanceof.com 5 points 11 months ago* (last edited 11 months ago) (1 children)

You'll need to post more info about your bootloader/fstab config. The error ERROR: device ' ' not found implies there's something set to an empty string.

[–] Hiro8811@lemmy.world 2 points 11 months ago (2 children)

I'm relatively new to arch so what do I need to look for?

[–] foo@withachanceof.com 4 points 11 months ago

I use Grub for my bootloader so I'm probably not the best person to ask for rEFind problems, but a good place to start for everything Arch related is the wiki. The page for rEFInd has a configuration section that outlines where the config files are and how to read them. Check that everything there matches what you expect it to be: https://wiki.archlinux.org/title/REFInd#Configuration.

If you've verified that your bootloader config is correct and it's installed on the drive you're booting from correctly another config to check is /etc/fstab to ensure you have a root device set in there too. The wiki is your friend here too: https://wiki.archlinux.org/title/Fstab

[–] luthis@lemmy.nz 2 points 11 months ago (1 children)

Like foo said, sounds like a bad fstab. Post your fstab here.

Also, pro-tip: Keep a bootable live distro like linux mint on a usb drive for situations like this, so you can easily mount the drive, chroot, and do whatever maintenance you need if you get to an unbootable state.

[–] Hiro8811@lemmy.world 1 points 11 months ago

Updated post

[–] luthis@lemmy.nz 1 points 11 months ago

Also come on guys, let's prove that the Arch community isn't all full of assholes, let's help this dickhead sort their stupid ass issue.

(/s)

[–] hperrin@lemmy.world 1 points 11 months ago

Check your /etc/fstab file to make sure your root partition is correctly specified, then rerun your bootloader install.

[–] luthis@lemmy.nz 0 points 11 months ago (3 children)

Both lines are commented out, # means that it is ignored

[–] Hiro8811@lemmy.world 2 points 11 months ago

Still same error

[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)

TheUUID is not comented out. Only nvme0n1p is

[–] luthis@lemmy.nz 2 points 11 months ago (1 children)

Should there be a space between 'relatime, flask=' ? Is that in fstab? It should all be one string, like in mine mine rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro

[–] Hiro8811@lemmy.world 2 points 11 months ago

It's one line with no spaces but I'm writing on a phone and Jarboa autocorrect is ass.

[–] yianiris@kafeneio.social -1 points 11 months ago (1 children)

@Hiro8811

1 Did you boot the live medium with bios or efi?

2 Do you have libnvme and nvme-cli installed? If no, try them, if yes look up things on the manuals. It may be that your bootloader can't read/mount from the nvme

3 Ever since systemd-boot appeared things have been not working so well, now, have they?

[–] Hiro8811@lemmy.world 1 points 11 months ago (1 children)
[–] yianiris@kafeneio.social 0 points 11 months ago (1 children)

It makes a difference, especially when trying to setup via chroot, it is possible but much harder to setup efi from a bios booted system.
@Hiro8811

[–] Hiro8811@lemmy.world 1 points 11 months ago

Solved it by installing grub. I then installed refind