LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2005, 12:01 PM   #1
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Rep: Reputation: 30
'cp -R /' but keep old permissions


i bought a new hdd and need to move everything onto the new hdd.
I've tried
Code:
cp -R / /mnt/newroot
i ammended fstab and grub.conf to reflect the new partitions but grub was so garbled i could barely make out my boot menu but once the framebuffer kicked in everything was cool, or so i thought. I couldn't log in as a normal user because i didn't have permissions to my home dir. so logged in as root and chowned the home dir but that didn't give me permissions to run X. Is there a way around this, other than
Code:
chown -R opaltoad /
 
Old 06-02-2005, 12:51 PM   #2
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
That is what the -p option is for. "cp -Rp". Also, when you copy mount your original hd to /mnt/oldroot, so you can do "cp -Rp /mnt/oldroot /mnt/newroot". And don't forget to umount /proc.
 
Old 06-02-2005, 01:32 PM   #3
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by aaa
Also, when you copy mount your original hd to /mnt/oldroot, so you can do "cp -Rp /mnt/oldroot /mnt/newroot". And don't forget to umount /proc.
which will mean i have to use a live cd to boot to, wouldn't i?. i was hoping i wouldn't have to do that as i only have two single connector ata/100 cables, so i can only have two drives running at a time fsck!
 
Old 06-02-2005, 02:59 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You could use a boot floppy. Tom's rtb, or one of the several hundred other boot linux floppies could work for this too. You could also look at network or USB boot if your motherboard supports it, but I doubt it if you only have single connector cables

You could also take the time to install a tiny distro into another partition, boot from it, and then do your work with the umounted devices.

Several very viable options, but really the best is to just grab a 2 connector cable for 5 bucks (USD, not sure what the conversion or cost is to the Euro currently )

Cool
 
Old 06-02-2005, 03:18 PM   #5
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
I don't think you need to use a boot cd/floppy:
Code:
# mount /dev/hda2 /mnt/tmp -t ext3
# mount
...
/dev/hda2 on / type ext3 (rw)
/dev/hda2 on /mnt/tmp type ext3 (rw)
...
 
Old 06-02-2005, 03:57 PM   #6
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Original Poster
Rep: Reputation: 30
cheers! i'll give that a go.
 
Old 06-02-2005, 05:15 PM   #7
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Original Poster
Rep: Reputation: 30
WICKED!! got it working...obviously!

Thanks guys!!!

only problem is the boot screen is still garbled.
any ideas?

Last edited by 0pal_t0ad; 06-02-2005 at 05:20 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 05:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 01:52 PM
permissions JROCK1980 Linux - Software 6 04-09-2004 05:03 AM
need help with permissions hbbtstar Linux - Newbie 4 10-13-2003 07:02 AM


All times are GMT -5. The time now is 05:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration