You are not logged in.
OK, so I installed Windows 11 alongside Arch Linux as it's really my only choice for playing games. I backed up my root partition as an image file using dd, wiped the entire disk, installed Windows, flashed the root partition back and reinstalled the bootloader. Now I can't boot Arch Linux, because it complains about fsck failing on /dev/nvme0n1p2 (which is the Microsoft reserved partition, and is not supposed to have a recognisable filesystem) and I get dropped into an emergency shell on boot.
:: running hook [udev]
:: Triggering uevents...
:: running hook [plymouth]
:: performing fsck on '/dev/nvme0n1p2'
fsck.ext2: Bad magic number in super-block while trying to open /dev/nvme0n1p2
/dev/nvme0n1p2:
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
ERROR: fsck failed on '/dev/nvme0n1p2'
:: mounting '/dev/nvme0n1p2' on real root
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty: job control turned off
[rootfs ]# I double checked /etc/fstab and the root partition is set to /dev/nvme0n1p4. No mention of the MSR partition anywhere. Also, it's flagged as "msftres" so it should be ignored right? I tried setting partitions by block, by label and by UUID. I even tried regenerating the initramfs. Nothing worked. Does anyone know what might be wrong with my system?
Last edited by dankcuddlybear (2021-10-25 11:46:30)
Offline
The root option is passed by the boot loader to the kernel. The fstab is used later after it is loaded off the root filesystem.
What boot loader is being used? What options is it passing to the kernel?
Offline
The root option is passed by the boot loader to the kernel. The fstab is used later after it is loaded off the root filesystem.
What boot loader is being used? What options is it passing to the kernel?
Aha, I hadn't thought of that. I'm using systemd-boot, and the kernel parameters in my boot entry was pointing to /dev/nvme0n1p2 (where the root partition used to be). My system is working perfectly now. Thanks!
Offline
You can avoid issues like this by using identifiers that don't change.
Offline