Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Am I required to re-install?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sun Mar 20, 2005 2:09 am    Post subject: Am I required to re-install? Reply with quote

Hi, ALL,
Do I have to re-install the system, if I add one more hard drive?

Thank you.
Back to top
View user's profile Send private message
martoni
Apprentice
Apprentice


Joined: 16 Jan 2004
Posts: 244
Location: Tyresö, Sweden

PostPosted: Sun Mar 20, 2005 2:11 am    Post subject: Reply with quote

Definately not. Why should you?
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Sun Mar 20, 2005 2:23 am    Post subject: Reply with quote

Not at all. You'll just need to fdisk and format the drive then add it to /etc/fstab. If your first hard drive was named /dev/hda (look at what worked in /etc/fstab) then the second will most likely be named /dev/hdb. You may want to use the hdparm -tT /dev/hdb command to make sure you've got it right though.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Sun Mar 20, 2005 3:41 am    Post subject: Reply with quote

How are you looking to integrate it into your system? Are you looking to use an existing directory as a mountpoint? For example, do you want to use /home as the mountpoint. If this is the case you can tar all the files in /home, mount the new hard drive at /home, (after partitioning it and creating filesystems), then untar the files to the hard drive using the -p flag to preserve permissions. Then add a line for it in your fstab. If you want to add a mount point in /mnt for it, like /mnt/storage, then just create the folder, partition and create filesystems, then mount your new hard drive (or a partition on the new hard drive) there. If you want it mounted at boot then you can add it to your fstab as well.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sun Mar 20, 2005 3:52 am    Post subject: Reply with quote

Thank you all for the responce.
I am actually looking to have it as a storage for my tools, like KDevelop, Gimp, and my programs that I will write. So, I guess, it will be more like /usr or /etc.

Thank you.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Sun Mar 20, 2005 6:35 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Thank you all for the responce.
I am actually looking to have it as a storage for my tools, like KDevelop, Gimp, and my programs that I will write. So, I guess, it will be more like /usr or /etc.

Thank you.
Same deal then, just be sure to tar the files, not copy them. Preserving permissions is even more vital when it comes to the files in /usr or /etc.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sun Mar 20, 2005 8:16 am    Post subject: Reply with quote

Thank you for the responce, Sith_Happens,
Now, do I have to do anything for the swap partition? Or just make it and add a mount point?

Thank you.
Back to top
View user's profile Send private message
bet1m
l33t
l33t


Joined: 04 Dec 2004
Posts: 631
Location: Kosova/Prishtine

PostPosted: Sun Mar 20, 2005 9:26 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Thank you for the responce, Sith_Happens,
Now, do I have to do anything for the swap partition? Or just make it and add a mount point?

Thank you.

nope.
_________________
#370559
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Sun Mar 20, 2005 9:44 am    Post subject: Reply with quote

ONEEYEMAN wrote:
Now, do I have to do anything for the swap partition? Or just make it and add a mount point?

A little expansion on the response of bet1m might be in order.
If you wish to move the swap, create a partition (can be a file, but we won't go there), mkswap, then add to fstab, removing the former swap.
If you want to prove it all works before booting it in, do a swapon for the new, a swapoff for the old, then a swapon -s to see what is currently used.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sun Mar 20, 2005 8:52 pm    Post subject: Reply with quote

Thank you, guys,
I am actually thinking abot increasing the size of my presently existing swap partition. Will I be able to do that?
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Sun Mar 20, 2005 10:16 pm    Post subject: Reply with quote

You probably can by taking it off first - I *NEVER* screw with my current partitions.
If I want to resize, I create a new one and copy everything over. Gives my an automatic backup too ... 8)

For swap I prefer to do as I outlined above. Another option is to create another of the size you want to increase your swap by, and simply add that.
Linux handles multiple swap partitions just fine.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Thu Mar 24, 2005 8:02 am    Post subject: Reply with quote

Hi, syg00,
You mean I just comment the line with the old swap partition in the fstab file, and add the line with the new one?
Also could anybody give me a tar command for archiving my files in /usr and /var, please? Like Sith_Happens said, permissions are vital... :D

Thank you.
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Thu Mar 24, 2005 8:21 am    Post subject: Reply with quote

If you just want to copy them over, use cp -vpR /location /newlocation/
If you want to make a real archive, tar -cvjpf newfile.bz2 oldfile1 oldfile2 olddirectory1 olddirectory2
To uncompress that archive, change -c to -x (create and extract). The only reason I mention using the -j (which makes a file typically associated with .bz2 and not .tar, although remember that UNIX doesn't do file-name extensions) is that bz2 gets so much better compression. The -p option keeps permissions.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Thu Mar 24, 2005 8:21 am    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Thu Mar 24, 2005 9:57 am    Post subject: Reply with quote

I will probably just confuse matters, but I find the easiest way:
Code:
cp -a /olddir /mountpoint

From the manpage
Code:
       -a, --archive
              Preserve as much as possible of the structure and attributes of the original
              files  in the copy (but do not preserve directory structure).  Equivalent to
              -dpPR.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Fri Mar 25, 2005 5:20 pm    Post subject: Reply with quote

Thank you, guys. You are very helpful.
Now, since I am trying to copy /usr, /var and /etc how I will be able to differentiate between 2 hard drives? I will add the mount point for second one in the /etc/fstab for /usr for example, but how I can copy files over to the second hard drive?
Or in other words I would like to have a KDE, KDevelop and all other programs that I will install to be located on the second hard drive. Right now they are on the first one. I will be able to copy them over when I will have a mountpoint, but how to differentiate between 2 of them?

Thank you.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Fri Mar 25, 2005 6:13 pm    Post subject: Reply with quote

Lets say that your new hard drive is /dev/hdb, and you want to move /usr to /dev/hdb1, then:
Code:
mkdir /mnt/new_usr
mount /dev/hdb1 /mnt/new_user
tar -cvjf usr.tar.bz2 /usr/*
tar -xvjpf usr.tar.bz2 -C /mnt/new_usr/
rm usr.tar.bz2
umount /mnt/new_usr
rmdir /mnt/new_usr
rm -fR /usr/*
mount /dev/hdb1 /usr
Ba-da-bing ba-da-boom. :)
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Fri Mar 25, 2005 8:26 pm    Post subject: Reply with quote

I wouldn't do the rm -fR /usr/* for a couple of days. Just mount the new hd (mount /dev/hdb1 /usr). When you are sure everything works ok after a few days:
Code:
umount /usr
rm -rf /usr/*
mount /dev/hdb1 /usr
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Fri Mar 25, 2005 8:48 pm    Post subject: Reply with quote

BlackEdder wrote:
I wouldn't do the rm -fR /usr/* for a couple of days. Just mount the new hd (mount /dev/hdb1 /usr). When you are sure everything works ok after a few days:
Code:
umount /usr
rm -rf /usr/*
mount /dev/hdb1 /usr
Good idea, just to be safe. :wink:
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sat Mar 26, 2005 12:29 am    Post subject: Reply with quote

Thank you.
I am running this script right now, but I have another question.
This is my fstab right now:

Code:

/dev/hda1     /boot     ext2
/dev/hda2    none      swap
/dev/hda3    /            ext3


So, my question is:
If instead of the third line I will put something like this:

Code:

#/dev/hda3    /            ext3
/dev/hdb2   /             ext3


it will mean that I will be able to run evrything as before, right? All I need is to copy /usr, /var and /etc, correct? Or did I miss some sub-catalog?

Thank you.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Sat Mar 26, 2005 1:00 am    Post subject: Reply with quote

I'm a little confused. Are you trying to move your entire root partition or just a few partitions? If your root partition is remaining on /dev/hda3, then you should leave that line in the fstab. Then, add lines for each additional partition you wish to have mounted at boot, i.e.
Code:
/dev/hdb2                      /usr              ext3         default      0 0

_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall


Last edited by Sith_Happens on Sat Mar 26, 2005 2:07 am; edited 1 time in total
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Sat Mar 26, 2005 1:01 am    Post subject: Reply with quote

I'm confused as well :(
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sat Mar 26, 2005 4:07 am    Post subject: Reply with quote

OK, then the little explanation is in order.
I installed Gentoo on the old computer. It had 9 GB hard drive, and didn't have much memory. It's 6 y.o. PC x86 Now I bought a new hard drive, which is much faster, and much bigger. All I want to do now is say: I have 2 hard drives. I will boot up from the smallest one, and run all my programs from the second one, since it's much faster. And I want to keep all system and boot-up files on the first hard drive, but move the "GUI shell" and everything that I will install, write and prepare on the second hard drive.

Thank you.
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Sat Mar 26, 2005 5:01 am    Post subject: Reply with quote

Well, what I would do is create partitions for /usr, /home, /opt, and maybe /var, /tmp, and /lib on the new drive, and move the files as described above.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3612

PostPosted: Sat Mar 26, 2005 5:22 am    Post subject: Reply with quote

OK, what about /etc/fstab file? How I should change it?
Is the changes I put in my previous post OK? Or I should leave the root to the first one and just create partitions for /usr, /home and opt for the second hard drive?

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum