First things first. You're probably reading this page because you've bricked your Eee PC, or it's stuck in an endless reboot loop, or a similar predicament. If that is the case, you need to access SINGLE-USER MODE in order to make changes to file system and hopefully fix your system. So let's start off by getting into SINGLE-USER MODE.
In this single-user mode, the file system, and your solid-state drive, is not mounted. Use the “print working directory” (“pwd”) command to check your location in the file system:
pwd
You should get the reply: /
/
So, you are now at the root level. Now see what's on the file-system by typing 'ls':
ls
You should see:
bin etc mnt mnt-user proc sys dev init mnt-system modules root
We need to mount the two drive partitions to mnt-system and mnt-user:
mount /dev/sda1 /mnt-system mount /dev/sda2 /mnt-user
Anything created by Xandros Linux will be in /mnt-system, and any edits you have previously made will be /mnt-user. Inside each of these folders is a complete set of directories that you would normally find after boot. During the boot process, they are merged so that under normal operation you see them as one. (But also note that at the point you press F9 to get the list of boot options, the user-made changes in /mnt-user are not yet available, which is why you can't make your edits to menu.lst from within your graphical text editor on the desktop).
Let's say that you had put a script in /etc/rc.local to get executed at start-up and you suspect that's the cause of your problems. You should now do the following: 'cd /mnt-user/etc', and 'vi rc.local', and then make your changes. Note: using the vi editor is a topic unto itself!
cd /mnt-user/etc
vi rc.local
When you are done making your changes, simply type the following to boot as normal:
exit
Installing rescue mode is simply the process of adding another entry to the Grub boot menu, so you can simply select the entry for getting into Rescue Mode (Single-User Mode) instead of doing steps 1 to 8 in the “starting SINGLE-USER MODE” section again manually.
You might want to do this before you start hacking on your system.
You need to edit the file /boot/grub/menu.lst, you need to do it as root, and alas, you need to do it in single-user mode. So, hopefully for the last time, manually perform steps 1 to 8 in the “starting SINGLE-USER MODE” section to start single-user mode, then mount /dev/sda1 on /mnt-system:
mount /dev/sda1 /mnt-system
Then use vi to edit /mnt-system/boot/grub/menu.lst:
vi /mnt-system/boot/grub/menu.lst
After opening the file, you'll see three entries. Copy the one for Normal Boot, and paste it just below it.
(Do a Google search on vi commands. It works very differently from MS Notepad or modern gui text editors so if you don't know it, you won't be able to guess your way around. And yes, NANO or KWRITE or any other text editor seemingly will not work in single user mode. In this case: move the cursor to the beginning of the line 'title Normal Boot', type Esc 5 Y Up p. The Y must be uppercase. Otherwise: “i” switches to insert/edit mode, “Esc :wq” saves the file.)
Now edit it so that it looks like this:
title Rescue Console
root (0x80,0)
kernel /boot/vmlinuz-2.6.21.1-eeepc quiet rw irqpoll root=/dev/sda1 XANDROSBOOTDEBUG=y
initrd /boot/initramfs-eeepc.img
(note about the vmlinuz version number - if the text you copied does not have the numbers 2.6.21.1, don't worry about it - NO NEED TO ALTER IT! The ONLY changes you are making is simply changing the title in the first line and then adding “XANDROSBOOTDEBUG=y” on the third line)
If you want to see all of the Linux boot messages, leave out the 'quiet' option.
You should also change the fallback=2 line near the top of the file. If the system fails to boot properly Grub will use the specified fallback entry on the next boot attempt. The number 2 means that the third entry will be tried. (the first boot entry is 0) Replace the number 2 with the desired boot entry number. For example, if you want to fallback to the newly added Rescue Console entry, and if you placed it after the Normal Boot entry, change fallback=2 to fallback=1. To do this in vi, position the cursor over the 2 and type r1.
Now save your file and close the editor (using Esc :wq in vi). Check to see that the changes were accepted by printing your file to the screen: 'cat menu.lst'. Then power down the Eee PC. Next time you need Rescue Mode, you can select this option. Maybe it would be a good idea to test that out now?
Many thanks to user Kibobo for most of the information contained in this how-to. Read his original post on the blogee.net forum.
The easy alternate way around using vi is to boot normal, make a copy of /boot/grub/menu.lst into the homedir and edit it with your preferred editor (mine is kate). Then boot into rescue-mode, mount the dirs and copy your pre-changed menu.lst with the following commands
mount /dev/sda1 /mnt-system mount /dev/sda2 /mnt-user cp /mnt-user/home/user/menu.lst /mnt-system/boot/grub umount /mnt-system umount /mnt-user
and switch off your system. Ready.