LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-08-2008, 09:29 AM   #1
Gens
LQ Newbie
 
Registered: Sep 2008
Posts: 4

Rep: Reputation: 0
Unhappy How to restore my Kubuntu in recovery mode?


Hello everybody!

Here is my big problem.
My configuration is Ubuntu (KDE) in dual boot with Xp pro.

I made as root by mistake a mv /* /usr/lib/thunderbird

Actually i wanted to type mv ~/thunderbird/* /usr/lib/thunderbird

I guess you can imagine the result.
I can't anymore boot on my Kubuntu and I don't really know what to do in recovery mode to restore my partition.
Is it possible to do something and if yes, can you help me?

NB: I can boot on my Xp OS so i guess my /boot is still alive!
In recovery mode i find my root / in /root/usr/lib/thunderbird that is to say in /root/usr/lib/thunderbird i have:
etc mnt media bin sbin var cdrom ....

Thanks for your help!!!!!
 
Old 09-08-2008, 09:46 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Welcome to LQ!
You have learnt the danger of working as root
You could try (as root) the reverse of the mv command you issued:

Code:
mv /usr/lib/thunderbird/*   /
Then reboot.
Your system may still be broken though (How did you stop the original mv command?)

If still broken, rescue your personal home files, and reinstall.
 
Old 09-08-2008, 10:31 AM   #3
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Alternatively use a live cd like parted magic to undo the move. You can do it in GUI mode after mounting the kubuntu partition...with the mouse
 
Old 09-08-2008, 12:18 PM   #4
Gens
LQ Newbie
 
Registered: Sep 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hey,
thank you for your answer.

Tredegar,
i can't do the reverse of the mv command because it seems that he doesn't like it:
Cannot move files, Read only files system.

I am in recovery mode but do you know if the recovery mode loads a kernel in memory or my own kernel in the Hard Drive???

Amani,
the fact is that i can't load my GUI mode. My system is corrupt and even if i start the normal mode, it loads the recovery mode!
So how can i mount my kubuntu partition?

Thank you
Gens
 
Old 09-08-2008, 12:34 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Cannot move files, Read only files system.
Hmmm. Well, we could make it a read/write, but I am not at all sure what you mean by "Recovery mode", and do not wish to offer bad advice.

It may be best to boot from a live-CD. You already have one - the CD / DVD you used to install kubuntu (you were using KDE, Yes?).

Then you can (rather slowly, as you are running from the CD, not your HDD) mount your broken root filesystem, move the files back, and try rebooting (it still may not be fixed).

This is all best done from the command-line, NOT the GUI. I'll talk you through it if you need help. So ....

Can you boot from your original install CD?
Do NOT click on the "Install" icon! Just check that you can boot to a live distro, give us the output of
Code:
sudo fdisk -l
(that's "ell" not "one") in a terminal then shut it all down and come back here.

Further Qs:
Do you have any important personal data in /home/gens that you need to recover / preserve?
If so, do you have a USB external HDD or memory stick large enough to backup your personal data ?

You didn't answer "How did you stop the original mv command?"

Last edited by tredegar; 09-08-2008 at 12:37 PM.
 
Old 09-09-2008, 06:39 AM   #6
Gens
LQ Newbie
 
Registered: Sep 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hello Tredegar,

By recovery mode i mean when i boot i have 2 options, start ubuntu in normal mode or in recovery mode (the same thing exists with Windows by pressing F8 at the boot menu).

I don't think i have the live-cd i used to install my ubuntu but i may download it again. Yes i use KDE.

Ok i think taht this is the best idea. I'm gonna download the Live-CD and repair my files by mounting my broken files system, like you said, if it works.

As soon as i boot on the live Cd, i will give you the result of the output
Code:
sudo fdisk -l
In my home directory, i have nothing very important but i'am going to check out.

For the original mv command, she stopped by itself a few seconds later.

Thanks for your advice.
Gens
 
Old 09-13-2008, 11:50 AM   #7
Gens
LQ Newbie
 
Registered: Sep 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hello everybody,

That's it, i have solved the problem!

The solution was the Live CD (ubuntu or others Linux distribution):

Boot from the live cd and then:
Code:
cd /media && sudo mkdir kubuntu (for example)
and
sudo mount /dev/XXXX /media/kubuntu
where XXXX represents the partition where is installed your linux distribution (actually the root /). It can be hda1, sda1, sda2, sdb1...

This, to mount my linux partition in media of the LiveCd.

Then, just doing the inverse command of my mistake
Code:
sudo mv /media/kubuntu/usr/lib/thunderbird/* /media/kubuntu
and THAT'S IT.

If that can help someone, it is cool!
Thanks and see ya.
 
Old 09-13-2008, 11:56 AM   #8
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
After mounting it as you did, you can just cut and paste in the Live CD GUI. That is what I said.
 
  


Reply

Tags
crash, error, mode, recovery, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System Restore, Kubuntu have an equivalent to Windows? swalker23 Linux - Newbie 4 09-07-2008 08:33 PM
restore hp recovery partition leedude Linux - Software 3 03-09-2008 12:12 AM
Kubuntu - how do I restore the K menu? And3rew Ubuntu 4 06-10-2007 05:38 AM
LXer: Methods of Linux Bare Metal Restore and Disaster Recovery LXer Syndicated Linux News 0 08-06-2006 08:21 PM
Backup / Restore / Recovery software 1kyle SUSE / openSUSE 2 09-07-2005 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration