How do I boot into single-user mode so I can run fsck?

tgagne
Posts: 11
Joined: Wed Mar 24, 2010 7:04 pm

How do I boot into single-user mode so I can run fsck?

Postby tgagne » Tue Sep 14, 2010 6:18 pm

How do I boot into single-user mode so I can run fsck? My Amahi server is showing strange problems. Unexpected python crashes, freezing system, I'd like to check both the filesystem and RAM.

Speaking of which, what's the safe way to run a RAM test?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: How do I boot into single-user mode so I can run fsck?

Postby moredruid » Tue Sep 14, 2010 10:54 pm

during the Grub screen (in which you can select which OS to boot) you can edit the lines.
On the 2nd line of your preferred kernel you can put the word "single" after the rhgb quiet part to boot into single mode.

a memtest can be run from most linux live CDs: I know Ubuntu has it built in their menu.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

tgagne
Posts: 11
Joined: Wed Mar 24, 2010 7:04 pm

Re: How do I boot into single-user mode so I can run fsck?

Postby tgagne » Wed Sep 15, 2010 4:07 am

I'll have to watch mine reboot again. I don't remember it showing me a menu. It goes directly to "Loading Linux Operating System" without stopping to give me a choice.

This question goes along with an earlier one about my Amahi box freezing. I left a vmstat running, and when it appeared "hung" this AM vmstat was showing 100 under "wa", which I think is waiting for IO?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: How do I boot into single-user mode so I can run fsck?

Postby bigfoot65 » Wed Sep 15, 2010 5:03 am

You might try hitting the escape key or space bar and see if that gives you a menu.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: How do I boot into single-user mode so I can run fsck?

Postby moredruid » Wed Sep 15, 2010 5:44 am

edit /boot/grub/menu.lst

find the line with "rhgb quiet" and append the word "single" to that line.

reboot -> it should go into single user mode (runlevel 1)

do what you must do

edit /boot/grub/menu.lst: remove the word "single" and reboot to get the default value back (either runlevel 3 or 5).
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

whetu
Posts: 30
Joined: Tue Jul 13, 2010 3:32 am

Re: How do I boot into single-user mode so I can run fsck?

Postby whetu » Fri Oct 01, 2010 3:12 am

I don't know if this will work on Amahi but I've had it work on Centos VM's... it sounds like you can boot to a workable point, simply issue init 1

Otherwise you're stuck with grub trickery etc e.g.

http://docs.fedoraproject.org/en-US/Fed ... ingle.html

Ram test: I recommend downloading and running the Ultimate Boot CD. That's got a couple of memtesters on there, amongst many other useful things :)

Who is online

Users browsing this forum: No registered users and 31 guests