You are not logged in.

#1 2020-05-19 14:50:41

chupachup
Member
Registered: 2020-05-19
Posts: 6

[Solved] Stuck in RootFS, unable to boot after installing a new HDD.

Solution:
This is what worked for me: I unplugged my new HDD and rebooted into Arch Linux. Then I changed /boot/loader/entries/arch.conf to use the UUID rather than /dev/sdaX.

Original post:

Good day,

I have a very serious problem with being unable to boot normally into my Arch linux partition after adding a new HDD to my PC. I can boot into Windows just fine.

This is what I get when I try to start:

Starting version 245.5-2-arch
ERROR: device '/dev/sda5' not found. Skipping fsck.
mount: /new_root: no file system type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off

This is of course very frustrating.

Here is what I've tried so far after crawling through forums and wiki's.

1. I can chroot into my installation using

mount /dev/sdb5 /new_root
mount /dev/sdc4 /new_root/home
chroot /new_root

2. I changed my fstab file to use UUID

vi /etc/fstab

When this didn't work I tried changing them to say /dev/sdb5 and /dev/sdc4 as they mount correctly using chroot. However, on every restart it still says /dev/sda5 cannot be found. In other words it's ignoring my fstab configuration.

What do I do now?
Thank you in advance.

Last edited by chupachup (2020-05-19 15:47:41)

Offline

#2 2020-05-19 14:53:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

fstab doesn't have anything to do with this, it's in your bootloader config.

Offline

#3 2020-05-19 14:58:49

chupachup
Member
Registered: 2020-05-19
Posts: 6

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

Scimmia wrote:

fstab doesn't have anything to do with this, it's in your bootloader config.

Thanks for your reply.

/usr/share/systemd/bootctl/loader.conf just says

default arch

It's not something I've touched. What can I do to fix my problem?

Offline

#4 2020-05-19 15:00:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

You set it up originally, assuming this is actually Arch and not something else. You should know what the config is.

Offline

#5 2020-05-19 15:07:20

chupachup
Member
Registered: 2020-05-19
Posts: 6

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

Scimmia wrote:

You set it up originally, assuming this is actually Arch and not something else. You should know what the config is.

This is Arch linux. I've went through the installation a few years ago. It's possible that I've set it up myself at the time, but I do not know what the config is, or where to find said configuration. I'm in the newbie corner because I need help with recovering my previously working installation and not losing hundreds of gigabytes of data. I'm not interested in being misleading to people who are trying to help me with this.

Offline

#6 2020-05-19 15:13:53

loqs
Member
Registered: 2014-03-06
Posts: 17,309

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

You can refresh your memory of system-boot on the wiki Systemd-boot#Adding_loaders.  See the link from that section to Persistent_block_device_naming.

Offline

#7 2020-05-19 15:22:19

chupachup
Member
Registered: 2020-05-19
Posts: 6

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

loqs wrote:

You can refresh your memory of system-boot on the wiki Systemd-boot#Adding_loaders.  See the link from that section to Persistent_block_device_naming.

Thank you, although I've read the systemd-boot wiki page. I just can't figure out at all what to do.

I think I need to mount /boot to find the configuration, correct? It's empty in my chroot environment, and then I realized that it is marked as seperate partition in my fstab. However, when trying to load the correct partition using this command:

mount /dev/sdb2 /new_root/boot

It says

mount: /new_root/boot: unknown filesystem type 'vfat'

It's correct that it's vfat, but fstab seems to have no problem with that. How do I correctly mount this partition now then?

Offline

#8 2020-05-19 15:26:06

loqs
Member
Registered: 2014-03-06
Posts: 17,309

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

The kernel can not load support for vfat.  If you use the fallback initrd can you then mount the ESP?
Use rescue media to chroot in.  Check if the kernel package and image match

pacman -Q linux
file /boot/vmlinuz-linux

If they do not reinstall the kernel package.  Also from the chroot you can fix the systemd-boot config.

Last edited by loqs (2020-05-19 15:32:00)

Offline

#9 2020-05-19 15:27:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

You aren't going to be able to mount the ESP inside the initramfs, the module simply isn't available by default.

Offline

#10 2020-05-19 15:34:50

chupachup
Member
Registered: 2020-05-19
Posts: 6

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

Scimmia wrote:

You aren't going to be able to mount the ESP inside the initramfs, the module simply isn't available by default.

Then in that case, I think the solution is to unplug the HDD, then change the file /boot/loader/entries/arch.conf line where it says

options root=/dev/sda5 nvidia-drm.modeset=1 rw quiet

to use the UUID instead.

One more question before I permanently ruin my boot loader entry, is this the correct way to write it?

options root="UUID=ee5ab4e5-(etcetera, working from another pc here)" nvidia-drm.modeset=1 rw quiet

or do I leave out the quotes, or do I use PARTUUID?

Offline

#11 2020-05-19 15:36:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,540

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

you don't use the quotes. Using UUID (filesystem) or PARTUUID (partition) is up to you.

Offline

#12 2020-05-19 15:44:26

chupachup
Member
Registered: 2020-05-19
Posts: 6

Re: [Solved] Stuck in RootFS, unable to boot after installing a new HDD.

Scimmia wrote:

you don't use the quotes. Using UUID (filesystem) or PARTUUID (partition) is up to you.

Thank you very much for nudging me in the right direction. This solution worked. It's very frustrating and time consuming for me to deal with these issues, and I rather prefer getting straight to the answer - but I guess there's some value in relearning that what I had forgotten.

Offline

Board footer

Powered by FluxBB