Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-08-17 12:49:15 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

What can you do in rescue mode?

In the past week, I have been working on testing what we can do in rescue mode and I have written a lengthy wiki instruction on this. I would like some courageous ones to test it and report any problems. Here are a list of its contents:

Hacking in Rescue Mode:
   Setting up the working environment
      1) Set up hotplug
      2) Mount USB drives in rescue mode
      3) chroot to sda1
   Changing your password
   Perform Disk Scan on sda1
   Backup and Restore partitions in rescue mode
   Uninstall programs from factory OS
      Using dpkg and apt-get
      What programs can I uninstall to free disk space
      Let dpkg keep track of changes
   Install/Upgrade programs to the read only partition of the SSD
      CASE 1: Install deb package with dpkg
      CASE 2: Install deb packages you have downloaded with apt-get
      CASE 3: Upgrade factory OS with the xepc-upgrade-disc

==================

TO DO LIST:
1) Test the use of parted in rescue mode to resize SSD [NB. I am afraid I have corrupted my default Xandros testing on this]
2) Setting up network connection (but I am no expert in networking).
3) Scripts to automate the above process, e.g. with a decent menu to select operations to do.
4) Perhaps a new initramfs image that would allow auto running of these scripts. Something like a batch file starting Partition Magic in DOS mode after reboot.

albkwan

Last edited by albkwan (2008-08-17 12:50:05 am)


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#2 2008-08-17 1:25:17 am

vofiwg
Senior Member
From: Germany
Registered: 2007-11-10
Posts: 322
Website

Re: What can you do in rescue mode?

Thanks for writing the wiki-entry. Its very useful.


VoFiWG

Offline

 

#3 2008-08-17 1:04:19 pm

winotree
ExtrEmE User
From: Texas
Registered: 2007-11-11
Posts: 2743

Re: What can you do in rescue mode?

I am suitably impressed!!  Very good job, albkwan, very good.  smile

Offline

 

#4 2008-08-17 9:04:51 pm

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: What can you do in rescue mode?

winotree,

This is just the beginning. Since day 1 of getting my Eeepc, I have been looking for a way to install / upgrade programs to sda1 instead of sda2. This is just a continued effort on the way to achieving this.

With all the hacks we have achieved so far, it should be possible to:

1) apt-get clean
2) Run synaptic (or apt-get) to install program, but download only (- d)
3) Reboot into rescue mode (or with a modified initramfs image, automatically run a script to install downloaded packages)
4) Mount sda1 and sda2
5) chroot to sda1
6) Change apt-get to use cache archive folder (/var/cache/apt/archives) in sda2 (where we have downloaded the debs)
7) Config dpkg to use the config files (/var/log/dpkg.log and /var/lib/dpkg) in sda2
8) apt-get install or dpkg -i all the debs we have downloaded.

The tricky thing is disk space and how to calculate disk space required and subsequently to resize sda1 to give room for new programs. This we still need to work on.

albkwan

Last edited by albkwan (2008-08-18 10:42:34 am)


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#5 2008-08-19 10:56:01 am

tobiasly
New member
Registered: 2008-06-04
Posts: 6

Re: What can you do in rescue mode?

Thanks for the info, I've gone and done something stupid and this has gotten me halfway to fixing it. I wanted to change the default username from "user" so I'd quit having to type usernames when using ssh, so I changed the /etc/passwd entry and renamed /home/user, then created a symlink at /home/user to point to the new username.

Now I can't boot at all... I've fixed /etc/passwd back to what it was, but now I can't find the /home directory in rescue mode. The one in /mnt-system seems to be an empty "default", and there isn't one in /mnt-user. Where can I find the /home directory to fix it back?

Offline

 

#6 2008-08-19 10:59:51 am

tobiasly
New member
Registered: 2008-06-04
Posts: 6

Re: What can you do in rescue mode?

hmmm... just read your caveat regarding 900 model on the hacking page. So it seems I've got lots of manual typing to do before fixing things smile

Offline

 

#7 2008-08-19 11:20:18 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: What can you do in rescue mode?

Don't worry! Just do it a few times and you will be familiar with the steps. Now I can mount USB drives in rescue mode without any script within a minute! smile

Also, in Linux, you can always use the TAB to auto-complete folder paths and filenames.


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#8 2008-08-19 11:47:48 am

tobiasly
New member
Registered: 2008-06-04
Posts: 6

Re: What can you do in rescue mode?

OK, I was able to get the USB subsystem working, changed back the entries in the "real" /home on sdb1, but now it's still hanging during boot... I'm getting as far as the X startup screen (I have the "X" cursor) and that's it. I've started a new thread to deal with that issue, but thanks for your help to get me to this point!

Offline

 

#9 2008-09-09 8:18:37 pm

fredex
Senior Member
Registered: 2008-07-24
Posts: 109

Re: What can you do in rescue mode?

Maybe ALBKWAN or someone else can advise me.

I've got a 901 linux and am stil using Xandros's default install.

Today I decided to enable a user password and to disable automatic logon. Now I wish I hadn't...

after making those two changes I rebooted, came to a login screen where it steadfastly refused to let me log in with the password I entered. Trying common typos/variations on the password did not help either.

I've found the WIKI entries on getting into rescue mode with GRUB, and deleted the password field from the 'SHADOW' file which didn't help.

I've found the posts (from ALBKWAN, I think) about how to set up to run the passwd program in rescue mode. Did that. Now when I boot it still requires me to enter a password then refuses to do anythning when I hit enter or click the login button.

Perhaps if I could figure out how to RE-ENABLE the automatic login I could get past this problem. Anybody here know how to do that?

Thanks!

Offline

 

#10 2008-09-09 9:09:03 pm

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: What can you do in rescue mode?

Have you tried the various methods I have consolidated in this wiki: Help! I forget my Log in password!. I have done these many times, they should work.


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#11 2008-09-09 9:42:19 pm

fredex
Senior Member
Registered: 2008-07-24
Posts: 109

Re: What can you do in rescue mode?

Thanks for the reply. I saw a long posting that I believe was the one you refer to and I did try at least parts of it.

After messing with it for a couple of hours I turned it off in disgust and left it sitting til about an hour ago. At that time I turned it on, typed in my password and voila, it logged me in!

I have no explanation--it's just one of those things that seemingly isn't required to make sense.

i've since then carefully once again made sure the "log me in automatically" checkbox is checked.

I may try it again in the future, but for right now I"m just glad to be back into it.

Thanks for the useful info, though, I'm sure I'll be making use of it in the future.

Offline

 

#12 2008-10-14 10:48:53 pm

fredex
Senior Member
Registered: 2008-07-24
Posts: 109

Re: What can you do in rescue mode?

Albkwan;

I did it again. stupid computer!

I tried to enable the login so it wouldn't automatically log me in. I know it knew the password because it let me log in -- FINALLY -- as described above, the last time I  had this problem.

Today once I unchecked the automatic login box and restarted nothing I could do would make it log me in.

I tried resetting the password, as you described in the wiki. Nada. STUPID COMPUTER! I tried removing the battery, disconnecting the power, waiting and rebooting but no, it wouldn't accept the password.

I absolutely DO NOT want to do the F9 bit--I've got too much sweat into configuring it to do it all over again.

I looked at the USB instructions (this is a 901) and agreed with your wiki article that it's rather daunting. So I tried a different approach:
using my external USB cd/dvd drive, I booted up my Knoppix dvd. Knoppix found a whole bunch of "hard drives". I looked at each one until I found the one with the .firstrundone file in it (/media/hdd1). It wouldn't let me delete the file because the "drive" was mounted 'ro'. so I did this "mount -o remount,rw /media/hdd1" then I was able to remove the file. shut down Knoppix and rebooted and it ran the first run wizard.

Still weird things happened:
I told it YES to automatically log me in. so what did it do? when it finished the wizard it asked me for my password--but this time it worked! So I rebooted to test it again and it still asked me for my password, but at least it is now working, which is what I originally had wanted, so I left it that way.

Sigh.

STUPID COMPUTERS! smile smile

I was thinking you might want to add a procedure like this one to your wiki article. Up to you. Thanks for writing it, though, since it gave me the basic idea I needed to be able to do this.

Offline

 

#13 2008-10-15 7:49:50 am

albkwan
ExtrEmE User
From: Hong Kong
Registered: 2007-11-04
Posts: 1440
Website

Re: What can you do in rescue mode?

fredex

I have met with similiar situation when I test booting the 901 default Xandros installed to an USB HD while having a HOME partition in a SD card.

The problem I have analyzed is that the system tried to mount the HOME partition, but fails to do this because USB driver is not yet loaded when fastinit runs. So, it cannot read the password file. But after 2, 3 times restarting X, USB drivers are already loaded and HOME partition gets mounted, then password file can be read and then it let me log in.

Something I need to clarify is that I do not own a 901. The point that the 2nd SSD is on USB interface is mentioned by other forum members in earlier threads. But recently, after I digged into fastinit, understanding the whole bootup process, I came to realize that the 2nd SSD is not really on USB interface. HOME partition is mounted by fastinit before USB drivers are loaded. Now I don't understand why 2nd SSD can only be mounted in rescue mode after loading USB driver (as mentioned by other forum members). I will need real access to a 901 to understand this.

But back to your question, I think the root cause is there are filesystem errors or something like that which is causing a delay in mounting the HOME partition (in the 2nd SSD) and this leads to the password file not read by the system. So, you can't log in.

So, I would suggest you to press F9 at bootup to access the boot menu and perform a disk scan.

albkwan


EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

Offline

 

#14 2008-10-15 8:15:55 am

fredex
Senior Member
Registered: 2008-07-24
Posts: 109

Re: What can you do in rescue mode?

Albkwan:

Thanks for the info.

I did use F9 to do a disk scan only a couple of days ago, but I can certainly do it again.

It's LIKELY that the disk needs checking, because once it goes to the login screen, and rejects my login, repeatedly, I can't find any way to cleanly shut down the machine--the shutdown icon on the taskbar doesn't work when it's in that state, so the only way to power down the system is to turn it off. Nasty.

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson