LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-10-2005, 01:52 PM   #1
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Rep: Reputation: 15
SOLVED (phew!): moved /home - now it seems everythings gone!


I had originally partitioned the harddrive to allow for a Windows 98 installation alongside that of a SuSE 9.2 Professional installation, and to dual boot the PC.

I originally partitioned the harddrive, with fdisk from the Windows 98 start-up disc, into one primary DOS partition, for Windows 98, and an Extended partition divided into three for swap space, programmes, and own files). Leaving about half the drive empty, for the Linux installation.
I installed SuSE 9.3, dividing the spare space into two, / and swap.

I have just removed the Windows installation and used YaST to repartition the harddrive.
I reformatted it as ext3 and set the mount point to be /home. YaST did not update fstab, so I editted it by hand, saving the original in the home directory...

I removed the entries (yes, removed, not #ed out!) for the partitions used by Windows hda1, hda5, hda6, and hda7, and replaced it with an entry for the resized partition, as hda1 /home.

On reboot and autologin for the default user account, KDE threw up loads of error messages, like "DCOP not running" "cannot find this, cannot find that" and so on. Then it gave a last gasp and shutdown to a little X terminal.
The original /home directory has gone.

I relogged in as root, and KDE started OK, greeted me as a new user.

Looking in /home now, all there is, is lost+found.

Any ideas how I can recover the contents of the original /home directory?

Last edited by aes canis; 05-10-2005 at 03:19 PM.
 
Old 05-10-2005, 02:01 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Which partition was /home originally on?
 
Old 05-10-2005, 02:53 PM   #3
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
The original /home directory was on hda3 which is /

Anyway, I had a spark - I editted out the fstab entry for hda1, mounted as /home, and rebooted. Sure enough, the original /home directory was back! I copied the entire contents (inc. hidden folders/files) to a new folder in / called /newhome. Then I re-editted fstab to mount hda1 as /home again, and copied the contents from /newhome back to /home.

On restarting the xserver, there are not so many errors, but it delcares that the /home$ folder is not writable. A permissions thing?
I have checked the permissions and the owner is root and the group is root - because they were created under root login. So I'm just about to change these...
 
Old 05-10-2005, 02:57 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
When you copy use "cp -ar" this will preserve permissions as well
 
Old 05-10-2005, 03:16 PM   #5
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
Thanks Dave, I will remember that for next (?) time...
I did actually read the cp man pages, but I copied the files from the original /home to /newhome at th command line, so used cp -r, what -p preserve=ownership, etc etc meant didn't click straight away, and I copied from /newhome to the new /home with konquror, whilst logged in as root.

I changed the permissions while logged in as root, restarted the xserver and have now logged in as the regular user account - and it works!

I had though of copying the whole /home directory onto a CDROM, but it's only x8 drive and there is just under 600 MB of stuff, so I couldn't be bothered. duh!
The moral of this story, boys and girls, is BACKUP!!! If you're going to mess about with important files and folders, make copies that are easily recovered.

Last edited by aes canis; 05-10-2005 at 03:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Moved /home can't mount reiserfs Sigkill(9) Linux - Hardware 28 11-02-2005 12:57 PM
Everythings double spaced with Mandrake update jackp Mandriva 1 09-18-2004 04:11 PM
Ad Server Moved jeremy LQ Suggestions & Feedback 0 02-27-2004 01:57 PM
moved home: permission denied mtb Linux - Software 4 12-17-2003 06:09 AM
/home has been successfully moved jeremy LQ Suggestions & Feedback 3 08-18-2000 05:25 PM


All times are GMT -5. The time now is 10:32 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration