I am a Linux beginner but I really enjoyed it so far. So far. Since yesterday, my Linux (pop OS) only wants to boot into emergency mode. I have a suspicion, even though my Linux and Windows are located on different physical disks, somehow Windows does it’s toxic ex lover things and somehow broke my Linux I assume. It’s there a terminal command to somehow reorganise my boot files?
Do you have any drives/ partitions set up to load at boot other than the main linux partition?
A common issue can be if linux is trying to mount a partition specified in fstab (the config file that lists all the hard drives to be loaded) and it can’t mount it, it will go into emergency mode. It does this as it assumes the drives are critically important and to prevent any damage to your system. You can mark non essential partitions as “nofail” in the fstab file so that linux continues to boot even if those partitions are unavailable.
If you’d added a USB drive or another hard drive to auto mount at start up and its not available to linux then that might be the issue. Reinsert those drives and linux should boot. Alternatively you can login using emergency mode and edit the fstab file yourself if you know what youre doing. The offending drive can be removed/commented outthe fstab file or the nofail option added.
If your linux install is set to mount your windows C: partition (for file access in linux for example) then its important to know the drive can be locked out by windows. Windows “fast startup” is a very common cause - it basically means windows doesnt shut down fully, it does a fake shutdown (hibernates), and doing this locks down the drive, preventing any access to the C: drive including in linux. If this scenario applies to you, boot into wndows, disable fast startup in the control panel and then try to reboot into linux.
It this works it is still worth using the “nofail” option in fstab for any non essential drives. I personally dont auto mount my windows drive at all anymore; I have it visible in my file manager but manually mount it (just clikcing on it does it) when I need it.
Agreed, it’s usually
fstab
. I wrote a blog post once to remind myself how to fix it, which may be helpful here: Procedure to Correct /etc/fstab File for Resolving Ubuntu Emergency Mode.
@Rubanski If it’s booting into emergency mode, there are usually one of three issues, kernel is corrupt, a file system can not be mounted read/write, and this can be because of file system corruption or in the case of mdraid, because a raid device failed to self-assemble, or initramfs is broken. The easy way to fix most of these is to use an automated utility called boot repair, you download the ISO then burn to a thumb drive, then when you run into this kind of problem boot off the thumb drive. I’d start by trying to determine which of these it is, if you get into emergency mode then you at least have a shell prompt, try typing dmesg to see if there are any errors relating to the kernel, then check if all of the partitions are mounted and if they are all mounted read/write. If one or more is mounted read only this usually means that the automatic fsck found errors it can not fix and needs a manual run, in which case try fsck -f -y /dev/sdxx or /dev/nvmexnxpx, which ever the case may be (hard drive verses SSD). If this was the issue after the fsck successfully repairs the file system you should be able to boot successfully. If not, and nothing kernel related shows up in dmesg, then probably your initramfs has gotten hurt. In this case since you are new to Linux, boot repair is the easiest way to fix it. You can also fix manually but that is more complex, however if you need instructions on how to do this let me know and I will elaborate. Even doing so manually though requires another bootable Linux media, does not have to be boot repair, a popos install USB will also do.
It probably gives some useful info. What does it say? Also, what changed between now and the last time it worked?
Bummer. Pop os is as bulletproof as any non immutable operating system i can imagine. I have booted into pop many times without experiencing this once and same goes for others i know.
Most likely, it really is windows messing with your stuff or the ssd is on its way out. Only time I did experience similar things was when the ssd was becoming unreliable.
I did recently hear of hybernation being a problem when dual booting when someone booted into windows in between while linux was hybernating.
I’d suggest booting a boot stick with a live stick and try from there. Since pop os is made by a company selling hardware, they have a pretty strong motivation to make their distro work. Check their website too https://support.system76.com/articles/bootloader/
Let me know if you need more help.
Windows can’t read your linux partitions, it doesn’t support them, so it’s almost impossible for it to damage your installation. It used to be that it could mess with the bootloader, but since UEFI got implemented, that’ become less likely.
What does it do when you boot into normal mode? Does it get to the login screen or not? Do you see error messages?If you get to login but no further, it could be a problem with your user, like a bad shell setting, since rescue mode logs you in as root usually (I’m not very familiar with debian/ubuntu based distros), otherwise it could be you installed/updated/removed the wrong package(s), unfortunately as far as I’m aware
apt
doesn’t have history rollback capabilities, so undoing that is going to be difficult.This is an unpopular opinion, but when you’re still inexperienced with linux, the quickest way to fix your system is just reinstalling. Back up your whole home dir beforehand and you’ll just have to drop it back in place to get all your data and settings back. If you have more than one user you may want to be careful with the UID, you may have to
chown -R
the whole directory.Need some more info. In anycase you will want some live environment to boot into, systemrescuecd is great for this.