LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to get my mountpoint back after partitioning? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-my-mountpoint-back-after-partitioning-572223/)

xpucto 07-25-2007 01:51 PM

how to restore a mountpoint after partitioning?
 
Hi!

I use Suse 9.0 and add a new HD today. suse recognized it immediatly and ask if I wanted to partition it. so I've partitioned the new HD, but made the mistake to mount /opt on this new HD. Now all what was in /opt (KDE for example) is gone! I know: very stupid of me.
1)Is there a possibility to get my moutpoint for /opt back? If yes how?
when I search for example for files (like startkde) that used to be under /opt, I get as result
Quote:

/proc/2176/fd : file or directory not found
.

2) if there is no possibility to get my mountpoint back, what would you advice me to do? Should I for example deinstall KDE, and then reinstall it?

thanks for any help.

bigrigdriver 07-25-2007 02:04 PM

Quote:

Now all what was in /opt (KDE for example) is gone! I know: very stupid of me.
No, it isn't gone. It's still on the hard drive under the root of the file system. You've mounted another partition over it, so you can't see it.

To prove my claim, boot a livecd and mount the original partition, but not the new partition. Then, from a console, or gui filemanager, look at /opt. You will see it all there.

If the new harddive partition is listed in /etc/fstab with mount point /opt, delete or comment out the line, save the file, and reboot.

dam294 07-25-2007 02:07 PM

If I understand you correctly, you created a new partition and mounted it on /opt?? I assume your old /opt was just a directory off of / ?

If that is the case, more than likely you have just mounted your new partition over you existing opt directory. Try unmounting the new partition. All of your programs etc. should still be there.

If you want you can then mount your new partition to a different mount mount, copy the contents of /opt to the new partition then unmount the new partition and mount it back up to /opt.

xpucto 07-25-2007 02:38 PM

thank you very much! And commanted /opt and got the files back.

still and I reboot, KDE tries to start but don't. I don't understand why.
when I try to start it from the command line, I get error messages like

Quote:

xsetroot: unable to open display ''
xset: unable to open display ''
ksplash: error while loading shared librairies: libkdeui.so.4: cannot open shared object file: no such file or directory
....

xpucto 07-25-2007 03:17 PM

Now it works again! I just made an update of KDE.

Quote:

Originally Posted by dam294

If you want you can then mount your new partition to a different mount mount, copy the contents of /opt to the new partition then unmount the new partition and mount it back up to /opt.

I'm not sure to understand...
now I have /opt that is under /. if I want its content in the new partition /opt (that I commented in fstab), what should I exactly do?

GregLee 07-25-2007 04:10 PM

Starting with the new partition mounted on /opt and the fstab entry that mounts it there, as you originally described:
Code:

umount /opt
mv /opt /opt_orig
mkdir /opt
mount /opt
cp -a /opt_orig/* /opt



All times are GMT -5. The time now is 11:08 PM.