Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 gentoo installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Mika Pesu
n00b
n00b


Joined: 09 Jul 2002
Posts: 15

PostPosted: Mon Jul 15, 2002 2:05 pm    Post subject: 2 gentoo installation Reply with quote

how can i install 2 gentoo linux in 1 computer without losing any data?
i have already installed gentoo 1.2 and i want to have "test bed" for other's like gentoo 1.3b.

-how can i share configure files between these two systems?
-if i have to re-partion my hard disks how can i do that so i don't lose any data?
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Mon Jul 15, 2002 2:14 pm    Post subject: Reply with quote

Sure, you can have multiple gentoo's. Just have two partitions (i'm no partitioning expert, still use PartitionMagic or the Mandrake install disc).

If your /boot is a seperate partition, then things are easy. Just copy your new kernels there (if you have a new one - you can probably use the same one for both, just create two grub entries pointing to it with different roots).

Sharing config files is relatively painless - just copy them. You'll probably need to edit some of them, though, especailly for optimizations.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 15, 2002 2:24 pm    Post subject: Reply with quote

If you have users (you really should :)), having /home as a separate partition will help you share user data between the two configurations. I use this to try out even other distributions without too much fuss. As alec suggests, copying config files may be the best option (don't have /etc as a separate partition!). I would be careful in doing this since you may be using different compiler options between the two gcc versions, etc.

For resizing partitions, a non-commercial option is GNU "parted". I have not used this recently, so I am not sure how well it works.
Back to top
View user's profile Send private message
Mika Pesu
n00b
n00b


Joined: 09 Jul 2002
Posts: 15

PostPosted: Mon Jul 15, 2002 2:41 pm    Post subject: Reply with quote

i have two partitions
/boot,/stuff and /root
so if i "cut down" the size of root and make another partition for 1.3b,
how can i share the programs so they won't take diskspace so much,i
dont have much free space left.

user home dirs dont contain any stuff(only config files), i have own partition for programs (/stuff).
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Jul 15, 2002 2:47 pm    Post subject: 2 x gentoo Reply with quote

you have diffenrent choises
- dual boot: using seperate patitions
- bochs
- vmware
- user mode linux
- chroot

xming
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Mon Jul 15, 2002 3:20 pm    Post subject: Reply with quote

WARNING: be very conservative about sharing kernels and/or settings between GCC 3.1 and GCC 2.95.3 stuff. It can cause huge troubles.
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Jul 15, 2002 3:28 pm    Post subject: Reply with quote

You may also want to consider getting a spare hard drive. A 40GB one will cost you about $75 at newegg (if you are in the US).
Back to top
Mika Pesu
n00b
n00b


Joined: 09 Jul 2002
Posts: 15

PostPosted: Mon Jul 15, 2002 4:34 pm    Post subject: Reply with quote

thanks for all the answers, i decided to buy new hard drive.
when the disk arrives i make it primary and i have to transfer all the stuff to it, is it simply cp -R * or is there a tool to transfer existing gentoo installation to new drive?
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 15, 2002 5:01 pm    Post subject: Reply with quote

I use "cp -ax" to make a copy of one filesystem to another. The "a" part is for "archive" - it preserves file permissions, owner, etc; it is equivalent to "-dpR". The "x" part makes sure you don't span file systems when doing recursive copies.

If you want to be ultra-safe, use the gentoo boot CD to boot. Then mount the old and new partitions at suitable mount points to do the copy. You can remove the old partition(s) once you are convinced that the new one works. This way, you have quiescent partitions when doing the copy.

Mika Pesu wrote:
thanks for all the answers, i decided to buy new hard drive.
when the disk arrives i make it primary and i have to transfer all the stuff to it, is it simply cp -R * or is there a tool to transfer existing gentoo installation to new drive?
Back to top
View user's profile Send private message
xming
Guru
Guru


Joined: 02 Jul 2002
Posts: 441

PostPosted: Mon Jul 15, 2002 7:45 pm    Post subject: tar Reply with quote

always use tar, cp -aRp is not reliable

cd <dest>
tar cf - /src/path | tar xvf -

be carefull if your dest is included in the /src/path then you hace to exlude it (man tar)


xming
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 15, 2002 7:51 pm    Post subject: Re: tar Reply with quote

Hmmm... never had problems with cp -ax. However, if you do use tar, do use:
Code:

tar cplf - /src/path | (cd <dest>; tar xvplf -)


The "l" option will prevent tar from spanning file systems and "p" preserves permissions.

xming wrote:
always use tar, cp -aRp is not reliable

cd <dest>
tar cf - /src/path | tar xvf -

be carefull if your dest is included in the /src/path then you hace to exlude it (man tar)


xming
Back to top
View user's profile Send private message
3x9
n00b
n00b


Joined: 20 Jun 2002
Posts: 34
Location: Canada

PostPosted: Tue Jul 16, 2002 9:03 pm    Post subject: new hard drive Reply with quote

If you wish to save time, avoid problems, why setup the new drive as primary ?

Linux does not care where it is installed, primary , extended (logical), drives - 1- to as many as controllers support. Even the boot Mgr. can be placed in other than old
1024 cyl limit, w/the newer BIOS's
Boot loader does not have to go in MBR, often, that is bad choice anyway, Esp. when
WinNt or XP involved.
If unsure about how to boot, use floppy until you decide later on what the end
layout should be. As root, in directory /usr/src put floppy in, do not mount , run
"make bzdisk" command to make a bootable floppy.
No lilo or grub to worry about, boots straight into that version.
Another hard drive is wise move.
Back to top
View user's profile Send private message
stardis
n00b
n00b


Joined: 09 Jul 2002
Posts: 18

PostPosted: Tue Jul 16, 2002 11:44 pm    Post subject: second drive Reply with quote

I installed the nicklock key switch for a second drive and it has worked very well for me. http://www.nicklock.com/docs/main.htm
I bought mine from http://www.kustombuiltcomputers.com/nicklockinfo.htm It made things easy for a novice like me.
Back to top
View user's profile Send private message
strawbeard
n00b
n00b


Joined: 05 Oct 2002
Posts: 11
Location: Basel (region), Switzerland

PostPosted: Fri Nov 01, 2002 11:08 pm    Post subject: cp -dpR complete root - target reiserfs damaged Reply with quote

Naan Yaar wrote:
Hmmm... never had problems with cp -ax.

Well I had with reiserfs. Running under LiveCD (1.4) I duplicated my original root fs (I use 3 partitions: root, boot, swap):
Code:
...
mount -t reiserfs /dev/hda8 /mnt/g1
mkfs.reiserfs /dev/hda9
mount -t reiserfs /dev/hda9 /mnt/g2
cp -dpR /mnt/g1/* /mnt/g2

AFAICT the missing -x shouldn't matter here, since g1 and g2 were both a reiserfs with nothing else mounted onto them. Both took no part in the actively running system (LiveCD); they were only involved in the copy process.

Later I started g2 as a clone of g1 and it worked very well. I used it to enlarge g1 with parted+libreiserfs (both from portage). Operation was so fast, tbat I became supicious and ran reiserfsck over the enlarged partition - reiserfs was damaged (non-fixable). 8O That would be a new topic, back to the copying process...

I was glad, I had my clone g2. Under LiveCD I re-made g1 from g2 using again the cp command. I ran reiserfsck over g1 and got a bitmap error :( - it was fixable. I lost no data, only a few thousand blocks of free space. 8) But I was back in business again :)

Would cpfs.reiserfs do this better? (man page tells very little). Since I know very little about reiserfs, I specified no parameters on mkfs.reiserfs. Partition size is now 4.5GB and g2 starts well beyond 50GB on the hard disk - would I need parameters on mkfs.reiserfs?

I'm only glad, I don't have to repeat this experience for some time. :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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