View previous topic :: View next topic |
Author |
Message |
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Sun Jan 27, 2008 3:56 am Post subject: Copy Desktop Gentoo to my Laptop? |
|
|
If I have a system compiled on my desktop, is it possible to copy all the files over to my laptop and it run correctly?
Both have same processor, but the laptop has one hard drive and the desktop has raid... would I have to just re'edit some config files to make it work correctly?
Just don't feel like recompiling gentoo for my laptop but alas if i must i will |
|
Back to top |
|
|
SiberianSniper Guru
Joined: 06 Apr 2006 Posts: 378 Location: Dayton, OH, USA
|
Posted: Sun Jan 27, 2008 4:04 am Post subject: |
|
|
My gut feeling is that most things should work, although I'd recompile the kernel with a new config and make sure I looked at all of my /etc files again. Make sure when you copy it that permissions are preserved (I like tar, as it does this automatically). And I'd recommend copying the desktop hard drive from a boot CD so /proc, /sys, /dev, etc don't get filled up with things you might not want to transfer to the laptop. And remember to run grub after everything is copied over. I'm sure I've forgotten some important stuff, but I think you'll be able to figure it out. |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Sun Jan 27, 2008 4:44 am Post subject: |
|
|
is there any way i can make a livedvd out of my desktop system, to make things easier to copy over? |
|
Back to top |
|
|
chris.c.hogan Apprentice
Joined: 02 Oct 2005 Posts: 189
|
Posted: Sun Jan 27, 2008 6:16 am Post subject: |
|
|
Making a livedvd from the desktop system isn't needed. The livecd is only suggested so you are not copying a live (active) operating system. It's certainly possible to copy a live system. However, extra steps are needed. It's just easier to use a livecd. |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Sun Jan 27, 2008 6:20 am Post subject: |
|
|
ok, well how do i go about copying the files from my desktop to the laptop?
since my desktop is in raid configuration, it must be live to copy all the stuff...
I was thinking of just burning the whole thing to a dvd and copying the dvd to the harddrive while in a simple linux install on my laptop.
Would that work? |
|
Back to top |
|
|
chris.c.hogan Apprentice
Joined: 02 Oct 2005 Posts: 189
|
Posted: Sun Jan 27, 2008 7:42 am Post subject: |
|
|
Hardware or software RAID? I seem to recall Gentoo's install CDs support software RAID. It's been a while since I dug into the initrd on an install CD. I could be wrong.
Burning a DVD will work. Turn off everything but the shell and put it all in a tarball. Make sure to exclude /proc, /sys, and /dev. Then just follow the install manual on the laptop. Use your tarball instead of the stage tarball. I'm not sure it's needed, but I'd also use tar's --numeric-owner option.
How do I copy a live system? Connect both systems to a network switch. Boot the new system with a livecd. Start ssh on the new system. Use rsync to transfer the system.
On the old system:
Code: | rsync -az --exclude '/proc/' --exclude '/sys/' --numeric-ids --progress / newsystem:/ |
Replace newsystem with the ip address of the new system. Follow the install manual for things like grub. |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Sun Jan 27, 2008 10:48 pm Post subject: |
|
|
Okay, sounds fun ! thanks for your help...
I just don't feel like compiling KDE / OpenOffice and stuff for my laptop... took a few days on my desktop will take a week on my laptop
Again thank you for your help I appreciate it. |
|
Back to top |
|
|
StarDragon Guru
Joined: 19 Jun 2005 Posts: 390 Location: tEXas
|
Posted: Mon Jan 28, 2008 8:33 pm Post subject: Re: Copy Desktop Gentoo to my Laptop? |
|
|
sequalit wrote: | Both have same processor, |
How can this be? Usually laptops have mobile processors that allow for CPU frequency scaling, desktop processors don't have this ability.
You are better off just installing from scratch. I think you will get better performance that way. |
|
Back to top |
|
|
robdd Tux's lil' helper
Joined: 02 Jan 2005 Posts: 142 Location: Sydney Australia
|
Posted: Tue Jan 29, 2008 11:23 am Post subject: |
|
|
Hi sequalit - I've recently copied my laptop Gentoo installation onto a new desktop (both are x86-64 architecture, otherwise it wouldn't have worked). I use dump/restore, because dump knows about the ext2/ext3 filesystem and so doesn't try to back up the /proc directory and stuff - which happens if you naively try to use tar to back up the root partition. I think it's the quickest way to get a new box up and running, especially for me since I am still using slow old ADSL1. Once I have the individual partitions backed up I partition the target disk and restore the partition dumps onto that. Once you have a system that boots (obviously need to get grub into the MBR) you can then edit the kernel config to tailor for the new machine and re-compile. You'll need to emerge app-arch/dump first, and for partitioning the target system you'll need a live CD to boot off (unless you can mount the target disk on the source machine) - I have an old copy of Knoppix from a magazine that has dump/restore on it and usually just use that.
The only problem (and it may be a show-stopper) is what happens if the source disk is RAID ? I would go ahead and "suck it and see" because it should be very quick to try.
To dump each partition:
Code: |
dump -0 -v -f /work/dumps/root.dmp /
dump -0 -v -f /work/dumps/usr.dmp /usr
|
will do a level zero (i.e. full) dump of the partition. You'll need to find a partition with enough storage to hold the dump file, and it CAN'T be on the parition you're dumping. If you can mount the target disk on the same (source) machine you can even pipe the output of dump straight into restore, then go and have a cup of coffee. Otherwise using a USB drive to hold the dumps is easy (and you DO back up your filesystems regularly onto another drive, don't you ).
To restore is similarly easy:
Code: |
cd /mnt/new_root
restore -vrf /path_to_dump_file/root.dmp
mount -t ext3 /dev/whatever /mnt/new_root/usr
cd usr
restore -vrf /path_to_dump_file/usr.dmp
|
I like the "v" (verbose) switch on to see what's going on, but it runs faster without it.
Once you've got the new filesystems restored you'll need to get into the new /etc and edit fstab if you've moved partitons around. Apart from that you can boot off a grub floppy/CD, and then set up the new menu.conf and install grub. It *may* just work if on the new system you specify the "normal" un-RAIDed partition names, e.g. hdaX instead of mdX.
Please feel free to ask any questions about dump/restore, as I think it's a really easy way to copy systems around. But I prefer to use a partitioning of /, swap, /usr, and keep all my work & data files on /work, and use ext3 and *not* LVM. Once you start making things complicated it may not work so well - I'm a "keep it simple" person.
Regards, Rob _________________ Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Tue Jan 29, 2008 4:37 pm Post subject: |
|
|
Worked like a charm robdd, even with my desktop system being in a raid. THANKS!
Now I don't have to wait a week to have Gentoo running on my laptop *grins*
used the livecd and external harddrive with no problems at all.
Thank you again Robdd, you saved me a whole lot of time and headache |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Tue Jan 29, 2008 5:40 pm Post subject: Re: Copy Desktop Gentoo to my Laptop? |
|
|
StarDragon wrote: | sequalit wrote: | Both have same processor, |
How can this be? Usually laptops have mobile processors that allow for CPU frequency scaling, desktop processors don't have this ability.
You are better off just installing from scratch. I think you will get better performance that way. |
I agree.
Gentoo is a customized/hand-tailored Linux installation by definition. If you copy it to another platform/hardware it is not Gentoo any more. Gebuntu maybe.
distcc shortens compilation times drastically. |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Wed Jan 30, 2008 12:08 am Post subject: |
|
|
Isn't distcc for networked computers? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Jan 30, 2008 12:46 am Post subject: |
|
|
A NIC in both computers plus a crossover ethernet cable is all you need. |
|
Back to top |
|
|
chris.c.hogan Apprentice
Joined: 02 Oct 2005 Posts: 189
|
Posted: Wed Jan 30, 2008 8:05 am Post subject: Re: Copy Desktop Gentoo to my Laptop? |
|
|
Jaglover wrote: | StarDragon wrote: | sequalit wrote: | Both have same processor, |
How can this be? Usually laptops have mobile processors that allow for CPU frequency scaling, desktop processors don't have this ability.
You are better off just installing from scratch. I think you will get better performance that way. |
I agree.
Gentoo is a customized/hand-tailored Linux installation by definition. If you copy it to another platform/hardware it is not Gentoo any more. Gebuntu maybe.
distcc shortens compilation times drastically. |
If the make.conf file is identical on both machines, what is the point of recompiling. All you are doing is wasting time to produce the exact same files.
Some things should be reconfigured and recompiled or added:
Kernel: The laptop will have features that the desktop most likely lacked (CPU frequency scaling, PCMCIA, battery module for ACPI, etc.). Go though your kernel configuration and add any new hardware capabilities.
HAL: You might want to add pcmcia to your USE flags
PCMCIA (PC Card): Emerge sys-apps/pcmciautils.
Video: How much did the video hardware change? Do you need to emerge a different X video driver?
For 99% of the programs and applications, nothing will change unless you are changing your CHOST or march= settings.
robdd: Cool, yet another method. I hadn't considered dump/restore. Thanks for the info.
sequalit: Glad it worked out for you. |
|
Back to top |
|
|
jcat Veteran
Joined: 26 May 2006 Posts: 1337
|
Posted: Wed Jan 30, 2008 2:01 pm Post subject: Re: Copy Desktop Gentoo to my Laptop? |
|
|
StarDragon wrote: | sequalit wrote: | Both have same processor, |
How can this be? Usually laptops have mobile processors that allow for CPU frequency scaling, desktop processors don't have this ability.
|
Although it's the norm to have a scaling cpu in a laptop, it's just a computer, the manufacturer can use whatever they see fit. Same for Desktop, in fact you quite often get adjustable cpu's in desktops these days, and that makes cases of the the same cup more likely.
Cheers,
jcat |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Jan 30, 2008 2:06 pm Post subject: |
|
|
sequalit wrote: |
I just don't feel like compiling KDE / OpenOffice and stuff for my laptop... took a few days on my desktop will take a week on my laptop
|
Does this same processor mean they are both i686? |
|
Back to top |
|
|
drescherjm Advocate
Joined: 05 Jun 2004 Posts: 2790 Location: Pittsburgh, PA, USA
|
Posted: Wed Jan 30, 2008 2:53 pm Post subject: Re: Copy Desktop Gentoo to my Laptop? |
|
|
StarDragon wrote: | sequalit wrote: | Both have same processor, |
How can this be? Usually laptops have mobile processors that allow for CPU frequency scaling, desktop processors don't have this ability. |
This used to be true but all of the x86 (32 or 64 bit) processors that are currently produced by AMD and Intel have frequency scaling regardless if they are desktop or notebook cpus.
Quote: | For 99% of the programs and applications, nothing will change unless you are changing your CHOST or march= settings. |
The use flags will have an impact on the build but if they are the same on both systems there is no point of a total rebuild. _________________ John
My gentoo overlay
Instructons for overlay |
|
Back to top |
|
|
sequalit Tux's lil' helper
Joined: 11 Jan 2008 Posts: 79
|
Posted: Wed Jan 30, 2008 5:35 pm Post subject: |
|
|
Quote: | The use flags will have an impact on the build but if they are the same on both systems there is no point of a total rebuild.
|
/agree
No they are not the same, but If i compile everything for i686, then itl work on any i686 computer... which worked like a charm
I did have to redo the kernel to enable those settings, but most settings i had enabled without knowing, such as pcmcia lol.. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed Jan 30, 2008 5:40 pm Post subject: |
|
|
sequalit wrote: |
No they are not the same, but If i compile everything for i686, then itl work on any i686 computer... which worked like a charm
I did have to redo the kernel to enable those settings, but most settings i had enabled without knowing, such as pcmcia lol.. |
Like charm, with -march=i686? So your desktop runs also Gebuntu? |
|
Back to top |
|
|
|