LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2005, 09:41 AM   #31
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30

Quote:
Originally posted by Matir
You probably didn't do the copy in a manner that preserves permissions = bad.
Now I know.
 
Old 08-23-2005, 09:42 AM   #32
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Everything is a learning experience.
 
Old 08-23-2005, 12:56 PM   #33
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30
I am not able to run "root:/usr # cp -rp *.* /mnt/new_usr".

I want to have only the content of /usr copied to /mnt/new_usr.

It seems the good old DOS command "*.*" does not work in linux.

What do you do in such a case?
 
Old 08-23-2005, 01:29 PM   #34
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
most files in /usr do not contain a period. What you are doing would only copy file names containing a period. why not just:
Code:
cp -Rp /usr/ /mnt/new_usr

Last edited by Matir; 08-23-2005 at 01:30 PM.
 
Old 08-23-2005, 01:41 PM   #35
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30
I have to think about it
 
Old 08-23-2005, 01:57 PM   #36
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30

Last edited by g-string 3; 08-24-2005 at 03:35 PM.
 
Old 08-24-2005, 03:39 PM   #37
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30
What do you think about this?

# su
# (in fstab) /dev/hda7 /mnt/new_usr defaults 0 0
# cp -rp /usr/ /mnt/new_usr/
# umount /mnt/new_usr/
# rm -r /usr
# (in fstab) /dev/hda7 / defaults 0 0
# reboot

Last edited by g-string 3; 08-24-2005 at 04:10 PM.
 
Old 08-24-2005, 04:07 PM   #38
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Use a LiveCD.
 
Old 08-24-2005, 04:11 PM   #39
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30
And then this should work?

Shall I use a LiveCD to be able to delete the old /usr directory safely?

Last edited by g-string 3; 08-24-2005 at 04:13 PM.
 
Old 08-24-2005, 04:35 PM   #40
rpz
Member
 
Registered: Mar 2005
Posts: 126

Rep: Reputation: 15
You should definitely have a livecd ready in case something goes wrong. A lot of really important stuff is in /usr and if this does not mount correctly you're in trouble.
Also, I think you want to do
# (in fstab) /dev/hda7 /usr defaults 0 0
in your code above. (/usr instead of /)

And make sure the partitions are large enough this time Always make them twice as large as you think would be enough.
 
Old 08-24-2005, 04:48 PM   #41
g-string 3
Member
 
Registered: Aug 2004
Location: Germany
Distribution: Sarge
Posts: 153

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by rpz
Also, I think you want to do
# (in fstab) /dev/hda7 /usr defaults 0 0
in your code above. (/usr instead of /)
The correct handling of the /usr directory is a major problem for (to) me. (off-topic: Would you say "problem to me" or "for me"?)

I did cp -rp /usr/ /mnt/new_usr
so I have a folder usr in my /mnt/new_usr at the moment

# (in fstab) /dev/hda7 /usr defaults 0 0
would result in having /usr/usr/, wouldn't it?

Please correct if I am wrong


What do you think about the time I chose for umounting the drive, is it important at all?
 
Old 08-24-2005, 05:55 PM   #42
rpz
Member
 
Registered: Mar 2005
Posts: 126

Rep: Reputation: 15
No, you should not copy /usr INTO /mnt/new_usr, because that would leave you with a non-empty mountpoint (/). You can not mount two filesystems at the same mountpoint AFAIK.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why would I put /home on it's own partition? glenn69 Linux - Newbie 10 08-11-2005 10:50 AM
can i put /boot in lvm partition benseghir Linux - Enterprise 1 06-15-2005 08:29 AM
Where to put swap partition mikieboy Linux - Software 3 11-25-2004 12:01 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM
Linux put the swap partition on my second HD. Don't want it there. rdaves@earthlink.net Linux - General 3 09-21-2001 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 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