Computer won't boot up - need to run fsck from initramfs

Started by willpell, June 22, 2020, 04:39:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

willpell

I am a pretty novice computer user; not quite at the stereotypical "grandma" level where you have to explain what a browser is and how to operate a mouse, but not much above that.  I bought a secondhand laptop with Ubuntu installed on it and have been using it for a year with no issues, despite having no idea how to give a single command at the Linux command prompt; I always just turned it on and it started itself up just fine and went straight to my desktop.  The other day I accidentally screwed something up and now, after I turn the computer on, it stops at a screen with a bunch of code on it; the only phrases that make any sense to me are "Linux needs to run a manual fsck" and the command prompt, which is labeled (initramfs) and has a blinking cursor after it.  I have tried to type several commands, such as "fsck" or "manual fsck" or "run fsck", but none of these have done anything.  I have no idea how to fix this, and figuring out how to program in Linux is obviously too complicated for my tiny caveman brain to handle.  Can someone please just tell me what I can do to undo whatever problem I accidentally caused, run the necessary fsck to fix the file system, and get the computer to go back to turning itself on without any problem?  The store I bought the thing from has already refused to do any troubleshooting whatsoever, and my attempts at finding online help have been unproductive, since I easily get confused by the immense range of technical jargon that I can't handle even looking at.  I just need a step-by-step that i can use to make my computer magically fix itself, the same way it has always magically run itself without any input from me, until it gets to my desktop and I can use it the same way I would use a Windows computer (except I can't install most programs on it, but that's fine because I don't need anything, I pretty much just browse the web and save picture files and such).

nil

At the (initramfs) prompt, try this:

fsck -fy /dev/sda1
Do not communicate by sharing memory; instead, share memory by communicating.

--Effective Go

willpell

EDIT:  IT WORKED!  My other computer is back.  THANK YOU, nil!  You're my hero!

It seems to be working.  I'm not sure whether it's done, it's hanging at a command prompt.  It says the file system was modified and a bunch of "inodes counts" were fixed.  The last line says "529252/19537920 files (1.3% non-contiguous), 17583944/78142464 blocks.  And then it hangs at initramfs again.  Hopefully the problem is fixed, but now how do I get it to boot to the desktop?  Normally it does htis automatically and doesn't wait for me to input anything..

nil

That's great :)
To reboot from the (initramfs) prompt, try:

reboot
Do not communicate by sharing memory; instead, share memory by communicating.

--Effective Go