OS crash after partitioning USB

I am expecting the worst, but hoping for a miracle here.

Basically while rebooting my system, the computer goes into emergency mode. I’ve tried to use all the advanced options, but none work.

I’m sure this has something to do with the fact I as partitioning a USB before hand. I was attempting to create a bootable iso for my son’s Windows computer. After repartitioning I was using woe to create the bootable USB, but it gave a failure warning saying the device was already mounted, yet it was unmounted. I verified by unmounting with gparted.

After trying various fixes unsuccessfully, I decided to reboot the computer and try again and that’s when the system crashed.

For what it’s worth, I’ve used gparted many times and I’m sure I was only working on the USB.

Any help or insights is greatly appreciated.

Another possible hint,

When attempting to reboot, sometimes it hangs with a message:

A start job is running for dev-sdb1.device.

If I reinsert the USB, then it no longer hangs, but still fails to start up.

That tells me it has something to do with the USB.

Does it hang while shutting down, or is the hang while starting up again?

I’m asking, because that makes a difference in where to look.

Also, when you use a USB, do you properly unmount it before unplugging?

The hang occurs on start up.

Normally I always “safely remove” any USB I’m using before I take it out. In this case I left it in the computer when I shut down, because I wondered if it wasn’t properly unmounting. The reason I rebooted was to hopefully unmount it for sure.

After I ended up in emergency mode, then I did remove the USB to see if that would help. Of course at that time there was no option to use the “safe removal” feature.

Your description suggests to me you need to repair your bootloader by booting 15.0 installation media, without the USB stick attached, choosing to boot installed system. Once booted, you need to use YaST to reconfigure the bootloader. YaST should be able to fix it simply by your opening it and making any kind of change to any setting. Typically the safest and easiest change to make is to increment or decrement the timeout value by one second, and then exit with save.


Can you please clarify what you mean when you say boot from installation media?

Because at the moment I cannot boot from any of the options that are installed. It goes straight to emergency mode.

I have removed the USB stick and still the same problem. It just searches for it for 1 min and 30 sec, then gives me the emergency mode screen.

Can you explain better?

By installation media he means the .iso you can download for installation, to be transferred to an USB-stick or DVD… But I don’t see where you can find the YaST in this option, never tried. But the internet is full of descriptions how to fix Grub2 using a rescue system from installation media… :wink:

Ok. Very helpful.

I was imagining using a USB to boot, but got confused when he said to remove the USB.

I will do some searching using the keywords you mention.


It is also possible that something is misconfigured.

Please provide the output from:

cat /etc/fstab
grep resume /etc/default/grub

You might need to be root for the second of those.

Also, if the file “/etc/crypttab” exists, then provide the output of

cat /etc/crypttab

And that one probably does require root. I only need to see the first two columns, if there is something private there. But, more likely, the file does not even exist.

Thanks. The first code worked and produced this output (the only way I know to share this data is with this link to the screenshot):


The second code gave the error: "can’t find command ‘grep’.

The last file you mention does not exist and so no output there.

Also, if it helps, I was able to access the journal and take this screenshot:


Any ideas?

grep is a standard Linux command and should be available. Question is why is it not on your install???

He is reporting from a grub minimal command line. So it might be normal that grep is not available there.

Yep missed that grub is it’s own evironment

I am seeing:

/dev/sdb1     /media/woeusb_target_1546657207_32190   vfat   defaults

(I may have mistyped something there)

I’m guess that’s your USB drive. Your “/etc/fstab” requires that at boot. If you are able to boot to rescue media, and edit that file, I suggest that you comment out that line (insert the ‘#’ character at the beginning).

The second code gave the error: "can’t find command ‘grep’.

That’s because you are stuck at grub, and are not fully into your system.

Your journal image is not all that useful. However, it suggests that you got far enough that you might be able to boot to a command line.

Try booting again. When you see the grub menu, hit the ‘e’ key. Then scroll down until you find a line that begins with “linux” (or maybe “linuxefi”). Hit the END key to get to the end of the line. Insert " 3" (without the quote). That’s to put a “3” at the end of the boot line. Then try CTRL-X, and see if it boots you to a command line. Best to have that USB device plugged in when trying that.

If you succeed, then login as root and edit “/etc/fstab”. You probably have “nano” there as a simple editor. And just insert that “#” character at the beginning of the line for “/dev/sdb1”.

Report back on how far you got.

Unsuccessful. I was able to boot then edit and add the 3 as you suggested, but when I booted from there it took me back to the same emergency mode screen. Unable to actually boot in a way to login or use a simple editor.

Is there a way to add the “#” from the grub command line? Other ideas?

I don’t know if it is possible to edit via the grub minimal shell, but I doubt it.

The other way is to boot your install media. One of the boot menu choices there, should to boot the rescue system. Once in the rescue system, you can login as root (no password needed), mount the file system and edit “/etc/fstab” (which would probably be “/mnt/etc/fstab”).

You mean to boot using a rescue USB or DVD?

Because I don’t see an option for rescue from the screen I’m accessing now.

Ok. I went ahead and made a bootable USB and found the boot from rescue system option. I’m logged in as root.

Please clarify the code I should be using. It is: “/mnt/etc/fstab”?

Then comment out the line with #?

Update. So I used the code “vim /etc/fstab” and it got me to this screen:


I don’t see the dev/sdb1 option to comment out with a #.



Please clarify the code I should be using. It is: “/mnt/etc/fstab”?

You must first mount your root partition. That would be something like:

mount /dev/sda3 /mnt

Except it might not be “/dev/sda3”. The output from:

parted /dev/sda print

might help you identify the partition to mount. It will be the one using “btrfs”.

With that mounted, edit “/mnt/etc/fstab”. But the rescue system might have only limited editors. I normally use “vi”, but that might be hard if you are not familiar with “vi”

Maybe try.

vi /mnt/etc/fstab

Scroll down to the line that begins with “/dev/sdb1”.
Hit the “i” key (for insert mode).
Hit the “#” key to insert the “#” character.
Hit the ESC key to get out of insert mode.
And then try “:wq” (without the quotes). The “:” should move the cursor to the bottom left for entering a command. And then the “wq” says “write and quit”, so it should save your changes and exit.

After that,

shutdown -r now

should attempt to reboot.

I have to get some sleep now. I’ll check in the morning to see if you have posted anything.