I've broken my links to home paths in KDE

Asked by Ex ISP

I discovered that I had 29GB of unused/unactive partition space on an IDE HDD. Using the GUI partition manager in KDE, I mounted it as /home. That made all the profiles, links to progs, etc, break. The oly way I can get back in is through "safe-mode" and in Gnome, which is not my native environment. I really want to get KDE working again.

I checked /etc/passwd and it is pointing to /home/chris as it should be. I'm really lost here and would hugely be thankful for any help in the right direction. I think I understand why I'm in this mess...just not sure how to recover from it!

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ex ISP
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Ex ISP (ex-isp) said :
#1

Also, when I do get logged into Gnome (as KDE has almost become non-functional) many of the program links don't work...I'm assuming it's because they rely on the same /home profiles.

Revision history for this message
Allen Chemist (alchemist) said :
#2

A few questions for this.

First, can you go into applications -> Accessories -> Terminal, and type
sudo fdisk -l

to help me learn how your hard drives are set up.

Second, in that terminal can you type
gedit /etc/fstab

copy the entire contents of that file, and paste it back here too. This shows how your drives are currently being setup.

Revision history for this message
Allen Chemist (alchemist) said :
#3

Actually, based on your last comment "I think I understand why, just not sure how to recover", here's how I see the situation, and my proposed recovery (which would work if you are in the situation I think you are). Based on that bit of your question, I think you know more about Linux than I initially gave you credit for :)

Before things broke, this was your /home configuration:
/home was simply a folder on your root partition

What broke it
You came along and added a new partition, /home/ and mounted it within /home, thus hiding of all of your profile data, and personal data. Now, if you examine /home/ it is empty (thus preventing KDE from working correctly)

Steps to fix it (there is probably a GUI way to do this, but I like command line better, and it's easier to explain in a text box!):
Assuming your 29gb drive is /dev/hda2. If you dont know this, you can do a sudo fdisk -l to show all your drives and partitions. Find the new 29gb one and replace hda2 below with whatever it comes up as (hda3? sdc6?)

unmount /home first (sudo umount /dev/hda2)
make a folder for the new partition (sudo mkdir /newhome/)
mount the new home in 'newhome' (sudo mount /dev/hda2 /newhome/)
copy all of your home data into the 'newhome' (sudo cp -R /home/* /newhome/)

test your stuff (sudo mount /dev/hda2 /home)
try logging out and in, which should be successful into kde

Finally, only after your 100% sure everything has been done correctly and is working, you can erase the original /home folder to free up some drive space on your original drive
1. unmount the 'new' home, to show the old one (sudo umount /dev/hda2 )
2. remove the old home's contents *** THIS IS ALL OF YOUR PERSONAL DATA ** BE SURE YOU HAVE A COPY LOCATED ON HDA2 __AND__ HAVE IT BACKED UP ** (sudo rm -rf /REMOVEMEhome/* ) (remove the removeme from the left command)
3. mount hda2 to /home (sudo mount /dev/hda2 /home)

ensure hda2 is set to do this on reboot, by examining the fstab file (sudo gedit /etc/fstab ). it should have a line similar to this:
/dev/hda2 /home ext3 defaults 0 0

Hope this helps, and if you have ANY questions don't hesitate to post back

Revision history for this message
Ex ISP (ex-isp) said :
#4

Allen chemist,

First, let me thank you very much for you indepth and insightful replies!

Just for the record, (and thanks for the command line options!) I am pasting your requests in before making any changes.

Device Boot Start End Blocks Id System
/dev/hda1 1 3618 29061553+ 83 Linux
/dev/hda2 4758 4998 1935832+ 5 Extended
/dev/hda3 * 3619 4757 9149017+ 83 Linux
/dev/hda5 4811 4998 1510078+ 82 Linux swap / Solaris
/dev/hda6 4758 4810 425659+ 82 Linux swap / Solaris
*********************************************************************
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
**********************************************************************
Again, before mounting/unmounting anything, I will await confirmation of what I now have (made a mess of lol). This is all on one single 40GB HDD. Originally setup with default Ubuntu config (no input from me on partitioning), but I haven't played with it that much, and just realized that I had all this extra space out there, unused that I now want for network backup storage.

Please let me know if you need more data or I haven't provided enough to be clear.

Many thanks (he says humbly to the community gurus!)

Revision history for this message
Allen Chemist (alchemist) said :
#5

Hmm, so I was partially wrong in what I said before, so don't do any of it (in the end, the solution will probably involve a lot of that)

and that output has confused me somewhat. Re-mark this as open, and know that I'm still thinking about it.
(I just wanted to post back to say don't do any of what I said before)

The main problem I'm having is this:

Partition number / start / end
1 / 1 / 3618
2 / 4758 / 4998
3 / 619 / 4757
5 / extended stuff (unimportant for problem at hand)

How is it, that partition 3 is _inside_ of partition 1, and extends beyond the end of partition 1? Partition 3 is also your place with all the data on it, which is mounted at /. The new stuff that you're finding is partition 1.

To help scratch my head, what is the output of:
df
and the output of
ls /home

Revision history for this message
Ex ISP (ex-isp) said :
#6

root@chris-ub:/etc# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 9005304 3266048 5281808 39% /
varrun 257992 16 257976 1% /var/run
varlock 257992 4 257988 1% /var/lock
udev 257992 68 257924 1% /dev
devshm 257992 0 257992 0% /dev/shm
lrm 257992 18856 239136 8% /lib/modules/2.6.15-26-386/volatile
root@chris-ub:/etc#
***************************************************************
root@chris-ub:/# ls /home
chris
***************** contents of /home/chris
drwxr-xr-x 4 chris chris 4096 Nov 23 22:09 Desktop
drwxr-xr-x 2 chris chris 4096 Nov 21 16:39 Downloads
lrwxrwxrwx 1 chris chris 26 Sep 9 09:24 Examples -> /usr/share/example-content
drwxr-xr-x 2 chris chris 4096 Sep 11 19:09 photos
root@chris-ub:/#

Many of the indicators show the things they should...

When I was trying to add/make usable this additional 29.x GB of the drive...it showed as unmounted and in an obsure format (I dont now recall what it was), show I formated it to Xfs and mounted it. THIS mounting is where I think I blew it.?!

It asked me for a path...I wanted something new...like "storage". It only gave me certain options available (wouldn't let me offer ). I had a choice of all system folders and /home seemed to be the least destructive choice if I made the wrong one, not being sure of the consequences involved...

So in my thinking, I've broken links to the GUI desktops. In older SunOS and Solaris (maybe still), there was a command line that was very simple (though I don't remember that either...too many years ago) that would reset config files to default in the event of coruption. This would prevent you from manditorily having to reinstall and loose things.

Really could reinstall...but then would learn less! Whatya think?

Revision history for this message
Ex ISP (ex-isp) said :
#7

I haven't paid any attention to passwd file until now...pasting it below...there are three lines in it that seem odd...pasting in text below for perusal What is the significance of the commas X3 and is it an issue/normal?

cupsys:x:100:106::/home/cupsys:/bin/false
messagebus:x:104:107::/var/run/dbus:/bin/false
haldaemon:x:108:108:Hardware abstraction layer,,,:/var/run/hal:/bin/false
hplip:x:105:7:HPLIP system user,,,:/var/run/hplip:/bin/false
gdm:x:106:111:Gnome Display Manager:/var/lib/gdm:/bin/false
chris:x:1000:1000:,,,:/home/chris:/bin/tcsh
postfix:x:107:114::/var/spool/postfix:/bin/false
~

Revision history for this message
Ex ISP (ex-isp) said :
#8

I haven't paid any attention to passwd file until now...pasting it below...there are three lines in it that seem odd...pasting in text below for perusal What is the significance of the commas X3 and is it an issue/normal?

cupsys:x:100:106::/home/cupsys:/bin/false
messagebus:x:104:107::/var/run/dbus:/bin/false
haldaemon:x:108:108:Hardware abstraction layer,,,:/var/run/hal:/bin/false
hplip:x:105:7:HPLIP system user,,,:/var/run/hplip:/bin/false
gdm:x:106:111:Gnome Display Manager:/var/lib/gdm:/bin/false
chris:x:1000:1000:,,,:/home/chris:/bin/tcsh
postfix:x:107:114::/var/spool/postfix:/bin/false
~

Revision history for this message
Ex ISP (ex-isp) said :
#9

Here is different output from df -H

chris-ub:~# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 9.3G 3.4G 5.5G 39% /
varrun 265M 17k 265M 1% /var/run
varlock 265M 4.1k 265M 1% /var/lock
udev 265M 70k 265M 1% /dev
devshm 265M 0 265M 0% /dev/shm
lrm 265M 20M 245M 8% /lib/modules/2.6.15-26-386/volatile
chris-ub:~#

I don't even see that space listed...and I think thats where soe of the links (if I'm even saying it correctly) got pointed at when I THOUGHT (lol) I created a new 29+GB partition.

Revision history for this message
Ex ISP (ex-isp) said :
#10

Just did man on sudo...I keep saying "links"...."environment variables" is the term I was looking for. Would not these being horked cause these issues? I mentioned in KDE are massive problems, but some of them also are being affected in Gnome...ie the trail of system/administration/device manager are now non-fucntional as a direct result of whatever I affected.

Revision history for this message
Allen Chemist (alchemist) said :
#11

ok one thing at a time :)

,,, in the passwd file are the separators between real name, phone number, department (or something like that). ,,, only means you don't have a name, phone number, etc specified for yourself.

The contents of your /home look to be in order, you have files there from sept, so it's not the temporary profile I was thinking was happening

what about ls -la /home/chris

does it show a .kde folder (and correct permissions on .kde)

Also, df is 'disk free' and shows how much space you have free on mounted disks. hda1 is not mounted, so that's why it doesn't show up in the list.

Revision history for this message
Ex ISP (ex-isp) said :
#12

I have restarted abut three time now, created a new user through command line, and logged into KDE.
Things appear normal so far from this users standpoint. The partition I had set has changed...the (now 27 gb) partition is showing up in KDE disk manager as

"file system Windows virtual fat -access path none-free space not available."

This now gives me a chance to format and apply path again, and "enable".

NOW I have access to format this space as /storage!!!!!!!!!!!!!!!!!!

I have formatted now as XFS, pathed it as /storage, and can read 27GB of unused space.

I have removed my primary account (chris) and rebuilt anew. Am now logged in with this account and seems to be normal. Created new "test" file in /storage with touch command. Removed same. Size is right,

By golly, I'm not quite sure why, as problem seemed to be associated with incorrectly formatted/pathed/mounted space...as it had unmounted itself(?) and variables seem norm now...

But we are functional again!

Revision history for this message
Ex ISP (ex-isp) said :
#13

root@chris-ub:/storage# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.6G 3.2G 5.1G 39% /
varrun 252M 72K 252M 1% /var/run
varlock 252M 4.0K 252M 1% /var/lock
udev 252M 72K 252M 1% /dev
devshm 252M 0 252M 0% /dev/shm
lrm 252M 19M 234M 8% /lib/modules/2.6.15-29-386/volatile
/dev/hda1 28G 272K 28G 1% /storage

Revision history for this message
Ex ISP (ex-isp) said :
#14

I'm just still confused about why my path settings are all working now and environment has "fixed self".