LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-01-2005, 11:01 AM   #1
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Rep: Reputation: 15
New hard drive plz help


I have 3 Partitions i want to put /usr on a new hard drive couldnt i just do this?

/dev/hda1 for /boot
/dev/hda2 for swap
/dev/hda3 for /

Coudlnt i just mount /dev/hdb to /mnt/hdb then

CP -R /usr /mnt/hdb

then add the mount entry in fstab and reboot? Or would this screw things up
 
Old 03-01-2005, 11:05 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
that would screw things up.

I've done that before... it really screwed up the box.

cp -Rp SHOULD work.

I'd advise you to use a LiveCD for the remount phase... I assume you'll want to remove the contents of the old /usr first: otherwise it will still consume space in /.
 
Old 03-01-2005, 11:45 AM   #3
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Ok thanks ill try that. Thanks for the fast response
 
Old 03-01-2005, 01:43 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
my suggestion would be to mount the drive on a temporary mount point... copy everything from the old /usr to the new... then mount the new drive as /usr... make sure it works... then remove the mount temporarily, erase everything from the old /usr, and then remount /usr
 
Old 03-01-2005, 02:19 PM   #5
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Quote:
Originally posted by frieza
my suggestion would be to mount the drive on a temporary mount point... copy everything from the old /usr to the new... then mount the new drive as /usr... make sure it works... then remove the mount temporarily, erase everything from the old /usr, and then remount /usr
this sounds right. mounting the "new" /usr over the existing /usr dir should render the "old" /usr inaccessible and allow you to make sure everything works properly, before you delete the old one for good.
 
Old 03-01-2005, 03:26 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
While I agree with the above, one point is to be made: you'll have a hard time mounting and unmounting the active /usr on a system. Probably deleting too. So much runs from there. Fortunately mount is usually /bin/mount or you'd be truly up a creek.
 
Old 03-01-2005, 04:14 PM   #7
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Well i tried but didnt work.

CP -Rp /usr /mnt/hdb1

then edited fstab

/dev/hdb1 /usr ext3 defaults 0 1

Linux boots but doesnt go into X windows.

It wont let me just mount /dev/hdb1 as /usr and it wont let me umount /usr
 
Old 03-01-2005, 04:24 PM   #8
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Ah ok I got it working. It was user error. the first time i copied /usr to /mnt/hdb1 it did it was a folder so when i mounted /usr i had a /usr/usr .

Thanks for the help
 
Old 03-01-2005, 07:35 PM   #9
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
No problem. Fully working now?
 
Old 03-01-2005, 09:22 PM   #10
sendas4
Member
 
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Yup :P
 
Old 03-01-2005, 10:03 PM   #11
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Quote:
Originally posted by sendas4
Yup :P
excellent


Matir - good point. that's the reason for having a dedicated /bin and /sbin (as opposed to /usr/bin, etc.) :

http://www.icon.co.za/~psheer/book/n...00000000000000

Last edited by Genesee; 03-01-2005 at 10:04 PM.
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Help installing simplymepis3.3 onto hard drive plz help ddlinux Linux - Software 2 02-27-2005 09:22 PM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 02:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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