Single User mode questions

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Single User mode questions

Postby TheGreatSudoku on Sun Feb 12, 2012 6:31 pm

When booting into recovery mode (single user mode) I find it hard to do any troubleshooting because

1.)sh is the only shell that works. bash has some very erratic behavior after i hit enter as documented in this post:
viewtopic.php?f=199&t=74879
I really miss things like bash completion in single user mode. Which brings me to my next issue.

2.)The arrow keys don't work in single user mode. This makes it next to impossible to edit config files, unless I want to go old school and use the super-unintuitive vi. It would also be nice if I could get bash working to be able to use the up arrow to repeat the previous command I issued in bash (assuming bash actually works in single user mode). It would be nice to use arrow keys and nano in single user mode when I'm troubleshooting issues that prevent normal booting.

Is there a way once I am in single user mode to run a program that configures the keyboard layout (so that I can use the arrow keys). Or is there a setting in GRUB I can set to facilitate use of the arrow keys in single user mode?

Also is there a way to get bash to actually work in single user mode?
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Linux Mint is funded by ads and donations.
 

Re: Single User mode questions

Postby viking777 on Mon Feb 13, 2012 7:02 am

Maybe you actually enjoy rooting around in run level 1? For me I thought the dubious joys of all that had been replaced by live cd's - but whatever you want.

If you do want to stay in the dark world of single user mode I think you need Midnight Commander:

http://www.trembath.co.za/mctutorial.html

It is in the repos where it is called 'mc' (which is also the command you use to launch it) (and it runs in single user mode).
Fujitsu Lifebook AH532 Laptop. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Ubuntu12.10 (Unity), Mint14 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 13
Level 13
 
Posts: 4916
Joined: Mon Dec 01, 2008 11:21 am

Re: Single User mode questions

Postby TheGreatSudoku on Mon Feb 13, 2012 9:32 am

I don't enjoy rooting around in runlevel 1, but lately it has become necessary as during the course of my troubleshooting I've gotten to points where X doesn't load at all.

I'm aware the live CD can be used for rescue purposes. It's great for when GRUB gets hosed, or when my box otherwise won't boot. The live CD is a great rescue tool when my linux install becomes unbootable.
However, if it is just X that is acting up, and all I need to do is comment out an entry from a conf file... Booting into runlevel 1 saves a boatload of time vs. booting from the live CD.

Midnight commander looks interesting, I'll install it, but it doesn't really address the problems I have of my arrow keys and bash not working. As well I'd be stuck using MCs file editor, as opposed to nano, which I am comfortable with and want to use.
↯Acer Aspire 7730 17" laptop ↝ Intel Core Duo 2.00Ghz x2  4gig DDR2 RAM ⤗ Intel Mobile 4 Graphics ➫ Kernel: 3.2.0-14-liquorix ZEN SMP PREEMPT x86_64  Linux Mint Debian Edition using Sid Repositories ⇨ KDE 4.7.4 ⟿ Installed: 11/23/2010↯
User avatar
TheGreatSudoku
Level 3
Level 3
 
Posts: 149
Joined: Tue Dec 07, 2010 12:05 am

Re: Single User mode questions

Postby viking777 on Mon Feb 13, 2012 10:39 am

Midnight commander looks interesting, I'll install it, but it doesn't really address the problems I have of my arrow keys and bash not working. As well I'd be stuck using MCs file editor, as opposed to nano, which I am comfortable with and want to use.


The up down arrow keys work for me in mc - that is really why I mentioned it (that is not to say they are going to work for you though). Also you are not stuck with mc's built in editor, you can use your own editor. The setting is in Options>Configuration>use internal edit (which you untick). It then obeys whatever the environmental variable for 'editor' is set to.

Code: Select all
printenv


Will show you what it is already set to (if it is set at all) and adding it to /etc/environment will set it globally. I think it is something like

Code: Select all
EDITOR=/usr/bin/nano


But check that because I am not sure.
Fujitsu Lifebook AH532 Laptop. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Ubuntu12.10 (Unity), Mint14 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 13
Level 13
 
Posts: 4916
Joined: Mon Dec 01, 2008 11:21 am


Return to Other topics

Who is online

Users browsing this forum: No registered users and 6 guests