Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

So I have a bug in a script in my init.d directory and bottom line...I can't completely boot the pi.

How can I boot into runlevel 1 (single user mode) so I can fix the bug?

share|improve this question
1  
Check this link for several options raspberrypi.org/phpBB3/viewtopic.php?f=28&t=16185 –  Steve Robillard Nov 27 '12 at 4:42

3 Answers 3

up vote 4 down vote accepted

That's not exactly a way to enter runlevel 1, but there is "safe mode" boot option in raspberry Pi firmware. To enable it, you have to insert a jumper between pins 5 and 6 on P1 (GPIO) header when booting.

Safemode pins

If you do this, bootloader will ignore the config.txt file (except from avoid_safe_mode option which can be used to disable this feature) and will try to boot kernel_emergency.img (if available) instead of kernel.img.

Default kernel_emergency.img has special emergency initramfs build in and it will boot to this busybox based OS so that you can fix the problems in your OS manually (or change kernel boot parameters to run runlevel 1 at next boot). Remember to run sync before powering down since reboot or shutdown commands may not work.

share|improve this answer
    
That's exactly what I was looking for. –  peledies Dec 2 '12 at 2:32

If you want to access and change SD card Linux partition files from Windows you can do it with one of these utilities.

share|improve this answer

I couldn't find a way to force the pi to boot into runlevel 1 so I fired up a fedora live disk I had laying around and used the terminal to remove the script in question from the /etc/init.d directory

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.