Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo transfer ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
loki
n00b
n00b


Joined: 01 Oct 2002
Posts: 36

PostPosted: Tue Jun 24, 2003 8:30 pm    Post subject: Gentoo transfer ? Reply with quote

A friend 'Sarlok' and I are busy installing his new 80gig harddrive and would like to move his gentoo installation, to avoid recompile and un-necessicary setup, we've try'd simply using 'cp -pRd' to copy each individual folder into the root of the new drive because it choke's on /proc and a couple of other things, the system actually boot's properly, but thing's like xterm and sshd dont work properly... perhap's theres a better way of going about cloneing his installation

thanks in advance :)
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Tue Jun 24, 2003 9:47 pm    Post subject: Reply with quote

I have to say I love this phrase "like xterm and sshd dont work properly". What does properly mean? Can you use them or do they fail with a certain error?

The best way of moving the root partition to a new drive would be to use tar or cpio. It is not a straight forward issue and it may actually give you problems. The only thing that I can gurantee will work, is to use a decent backup program and then restore from the backup onto the new drive.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
Sarlok
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2003
Posts: 98

PostPosted: Tue Jun 24, 2003 11:39 pm    Post subject: Reply with quote

Not working, meaning xterm won't start as a non-super user. As far as I can tell, every user should have permission to start it, the group files and read/write/owners of xterm file, and the folder it's in are all the same as on my other working drive (the one I've booted from at the moment).

As far as ssh goes, it freezes on the clients end if they try and connect to my pc after they enter their password. That requires killing the process to stop it.
Those are the only things we've noticed so far that are messed up, allthough I would like to make sure it all copys fine so that everything works.
Same thing happens trying to et to it from my PC.

I'd rather find a way to copy everything properly than get these individual things working again. cp almost worked, but it can't seem to get the permissions and owners right still. either all owned by root/root, or 0/0.
That or it keeps giving me "No room left on device" when there's still 32 gigs free.
fschk doesn't give any errors on bootup or when it's run either.

Any sort of backup apps you could suggest that I could emerge? I found 'flexbackup', a backup script... but it's a little on the scary side.

I'll get back to googleing, but if you reply before I find something... :)
_________________
Four-thousand, six-hundred and ninety-one Irradiated haggis.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Wed Jun 25, 2003 12:40 am    Post subject: Reply with quote

Well, here's an easy way to copy partitions that has always worked for me. Boot from the livecd. Mount both the old and new partitions. Then run the following.
Code:
$ cd /mnt/old_part
$ find . -print | cpio -pamd /mnt/new_part
Back to top
View user's profile Send private message
Sarlok
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2003
Posts: 98

PostPosted: Wed Jun 25, 2003 3:28 am    Post subject: Reply with quote

PowerFactor wrote:
Well, here's an easy way to copy partitions that has always worked for me. Boot from the livecd. Mount both the old and new partitions. Then run the following.
Code:
$ cd /mnt/old_part
$ find . -print | cpio -pamd /mnt/new_part


Fantastic. Worked perfectly.
Thankyou. :D
_________________
Four-thousand, six-hundred and ninety-one Irradiated haggis.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Wed Jun 25, 2003 5:56 pm    Post subject: Reply with quote

Sarlok wrote:
[Fantastic. Worked perfectly.
Thankyou. :D
Cool, no prob.
Back to top
View user's profile Send private message
jeffrice
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2003
Posts: 89
Location: New York, USA

PostPosted: Tue Jul 08, 2003 8:16 pm    Post subject: Reply with quote

Am I right in assuming that cpio will work if the partitions aren't identical in size? dd, as far as I understand, will replicate them *exactly*, which is not what I want.

My plan is to put both HDs in, new being /dev/hdb and then copy /dev/hda1 -> /dev/hdb1, /dev/hda2 -> /dev/hdb2 and so forth. but the matching /dev/hdb* will be bigger (in general) than it's hda counterpart.

Will cpio do this?
Back to top
View user's profile Send private message
plate
Bodhisattva
Bodhisattva


Joined: 25 Jul 2002
Posts: 1663
Location: Berlin

PostPosted: Tue Jul 08, 2003 9:09 pm    Post subject: Reply with quote

But of course. 8)
Back to top
View user's profile Send private message
Smokerdave
n00b
n00b


Joined: 13 Dec 2004
Posts: 17

PostPosted: Fri Dec 24, 2004 7:48 am    Post subject: Reply with quote

I tried doing this with a 2004.3 CD, but I get "cpio - command not found" trying. Am I using the wrong CD for this?
Back to top
View user's profile Send private message
madmango
Guru
Guru


Joined: 15 Jul 2003
Posts: 507
Location: PA, USA

PostPosted: Fri Dec 24, 2004 2:06 pm    Post subject: Reply with quote

Apparently cpio isn't included on the 2003.4 cd. You could also accomplish this with rsync, which is what I do for backups.

Code:
cd /mnt/old_part
rsync -av --exclude=mnt --exclude=proc --exclude=usr/portage/distfiles ./ /mnt/new_part

_________________
word.
Back to top
View user's profile Send private message
retsaw
n00b
n00b


Joined: 16 Dec 2004
Posts: 10

PostPosted: Fri Dec 24, 2004 2:45 pm    Post subject: Reply with quote

jeffrice wrote:
Am I right in assuming that cpio will work if the partitions aren't identical in size? dd, as far as I understand, will replicate them *exactly*, which is not what I want.


This is true, however dd will work and you could resize the filesystems once it is done. I haven't tried it on a partition by parition basis, but it worked when I copied a 2GB to 20GB disk, leaving me with 18GB unallocated space and I resized the partition after that.

What I normally do for copying all the files is use tar eg.

Code:
tar cpC /mnt/oldpart/ ./ | tar xpC /mnt/newpart/
Back to top
View user's profile Send private message
Smokerdave
n00b
n00b


Joined: 13 Dec 2004
Posts: 17

PostPosted: Fri Dec 24, 2004 6:37 pm    Post subject: Reply with quote

madmango wrote:
Apparently cpio isn't included on the 2003.4 cd. You could also accomplish this with rsync, which is what I do for backups.

Code:
cd /mnt/old_part
rsync -av --exclude=mnt --exclude=proc --exclude=usr/portage/distfiles ./ /mnt/new_part

So, if I use this to copy my current 8gb partition to a new 16gb partition (on the same disc), everything will work and I will have 8gb free space? If so, then thanks alot :)
Back to top
View user's profile Send private message
Smokerdave
n00b
n00b


Joined: 13 Dec 2004
Posts: 17

PostPosted: Mon Dec 27, 2004 2:50 am    Post subject: Reply with quote

Note: rsync isn't included on the CD either, and using tar gives me alot of "tar: ./path/file: socket ignored". Is it really safe trying to boot the new disc even if I get this?
Back to top
View user's profile Send private message
Kaapeli
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2004
Posts: 110
Location: Oulu, Finland

PostPosted: Mon Dec 27, 2004 4:27 pm    Post subject: Reply with quote

Why didn't anyone mention this command:

Code:

cp -a /mnt/old /mnt/new


I've transferred this Gentoo installation couple of times on a new partition and it has always worked with the first try.
Back to top
View user's profile Send private message
xbmodder
Guru
Guru


Joined: 25 Feb 2004
Posts: 404

PostPosted: Tue Dec 28, 2004 4:57 am    Post subject: Reply with quote

kaapeli you beat me to it!
haha!
i think
do this in system boot:
Code:

dd if=/dev/hda3 of=/dev/hdb3
mkswap /dev/hdb2
dd if=/dev/hda1 of=/dev/hda1
resize2fs /dev/hda1
resize2fs /dev/hda3

now boot into live CD
make sure that the drives are switched hdb > hda
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
go into chroot:
Code:

mkdir -p /mnt/gentoo
mount /dev/hda3 /mnt/gentoo
mount /dev/hda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo
env-update
source /etc/profile

follow step 10b
your done!
_________________
http://xbmodder.us/
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3374
Location: USA

PostPosted: Mon Feb 14, 2005 3:30 am    Post subject: Reply with quote

Kaapeli wrote:
Why didn't anyone mention this command:

Code:

cp -a /mnt/old /mnt/new


I've transferred this Gentoo installation couple of times on a new partition and it has always worked with the first try.

it sounds good. my bet is that you haven't actually tried it. :?
Back to top
View user's profile Send private message
teknomage1
Veteran
Veteran


Joined: 05 Aug 2003
Posts: 1239
Location: Los Angeles, CA

PostPosted: Mon Feb 14, 2005 10:56 am    Post subject: Reply with quote

I have, it's part of my standard harddrive replacing spiel, I think you can find it if you search deep enough in the forums. It hasn't given me any issues. Why would it be worse than a bit for bit dumb copy like dd? Maybe it will take longer but it preserves all the important info.
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3374
Location: USA

PostPosted: Mon Feb 14, 2005 7:15 pm    Post subject: Reply with quote

well, here i am with my foot in my mouth, then. :oops:

i tried it yesterday and ran into problems when it tried to copy /mnt.
Back to top
View user's profile Send private message
jsheedy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2004
Posts: 101
Location: IL:USA

PostPosted: Tue Jun 28, 2005 7:10 pm    Post subject: Reply with quote

I want to move from one hard drive 36gig to another 73 gig.

I have partitioned the second disk

/dev/sdb1 will be boot 73MB
/dev/sdb2 will be swap 300MB
/dev/sdb3 will be root rest

I was going to boot up the live cd and mount the the root part /mnt/oldroot /mnt/newroot and cd /mnt/oldroot, cp -ax * /mnt/newroot. (boot also)

Will this work ok?

I will just have to make some changes to grub.conf then?

Thanks
_________________
Just J
Back to top
View user's profile Send private message
jsheedy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Nov 2004
Posts: 101
Location: IL:USA

PostPosted: Tue Jun 28, 2005 11:40 pm    Post subject: Reply with quote

In trying to do the cp -ax, I received some SCSI IO errors. Is there something else I should try?

SCSI error : <1 0 1 0> return code = 0x80000002
Current sdc: seanse = 70b
ASC=47 ASCQ= 0
Raw sense data:0.70 0x00 0x0b 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x47 0x00 0x08 0x00 0x00 0x00
end_request: I/O erro, dev sdc, sector 5084074
printk: 13 messages suppressed
Buffer I/O error on device sdc3, logical block 470843
lost page write due to I/O error on sdc3

that error is repeated a countless number of times

Josh
_________________
Just J
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
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