Re: Cloning a debian system
On Mon, Jul 14, 2003 at 10:07:00AM -0400, Andrew Perrin wrote: > My office machine will be replaced next month. I'd like to make the new > machine be pretty much like the old one. Given that I can't actually move > the primary hard drive over, what's the best way to get the package list > straight? Should I back up all of /etc, do a basic net install, then do an > apt-get update; apt-get upgrade? > Why mess with reinstalling everything? Just put both hard drives in the new box, boot off of knoppix (it makes it easier when copying the files), but you can just as easily boot off of your old drive in the new box (in the new box to speed up the copy) and copy everything over. Make sure you don't copy /proc though. ;) Then rerun the install for your favorite boot loader (gotta love grub!), or lilo works too. Once you boot up, change the modules loaded for your video, network, and sound. Change your X config to match your new video card and you're set. Really. I showed how easy it was to move a linux system between machines to a windows guy, and he was amazed. :) Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Cloning a debian system
On Mon, 14 Jul 2003 16:40:15 +0200, Shri Shrikumar wrote: > On Mon, 2003-07-14 at 15:07, Andrew Perrin wrote: >> My office machine will be replaced next month. I'd like to make the new >> machine be pretty much like the old one. Given that I can't actually move >> the primary hard drive over, what's the best way to get the package list >> straight? Should I back up all of /etc, do a basic net install, then do an >> apt-get update; apt-get upgrade? > > backup /etc, /home, /boot and perhaps some parts of /var > > dpkg --get-selections >> packages dpkg --get-selections only knows which packages are installed, but not which versions of them. This is no problem if you have only woody packages installed. However, if you use apt pining to mix woody and sarge, this won't work. My suggestion is to create a tarball of your whole system and extract it on your new one (boot it from a KNOPPIX CD). If this isn't possible, you can take the output from apt-show-versions and write a perl script to restore everything. > > and on the new machine > > cat packages | dpkg --set-selections > dselect update > dselect install > > restore /etc, /home, /boot and any parts of /var > > I might have missed bits but this should be the general procedure. > > HTH, > > > Shri -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Cloning a debian system
> > dpkg --get-selections >> packages > > > > and on the new machine > > > > cat packages | dpkg --set-selections > > Hooray for the useless invocation of cat! =) Why not this one? > > dpkg --get-selections | cat > packages? > > Personally, I like this: > > dpkg --get-selections | ssh new-machine dpkg --set-selections > Very interesting. For backing up purposes, can this be used to "restore" your machine to a prior state based on the "packages" file (down to reinstalling the same versions of the packages, and removing any new ones). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Cloning a debian system
* Shri Shrikumar ([EMAIL PROTECTED]) [030714 07:36]: > On Mon, 2003-07-14 at 15:07, Andrew Perrin wrote: > > My office machine will be replaced next month. I'd like to make the new > > machine be pretty much like the old one. Given that I can't actually move > > the primary hard drive over, what's the best way to get the package list > > straight? Should I back up all of /etc, do a basic net install, then do an > > apt-get update; apt-get upgrade? > > backup /etc, /home, /boot and perhaps some parts of /var > > dpkg --get-selections >> packages > > and on the new machine > > cat packages | dpkg --set-selections Hooray for the useless invocation of cat! =) Why not this one? dpkg --get-selections | cat > packages? Personally, I like this: dpkg --get-selections | ssh new-machine dpkg --set-selections Sorry to turn this into YAPSST (yet another pedantic shell syntax thread). good times, Vineet -- http://www.doorstop.net/ -- Microsoft has argued that open source is bad for business, but you have to ask, "Whose business? Theirs, or yours?"--Tim O'Reilly signature.asc Description: Digital signature
Re: Cloning a debian system
On Mon, 2003-07-14 at 15:07, Andrew Perrin wrote: > My office machine will be replaced next month. I'd like to make the new > machine be pretty much like the old one. Given that I can't actually move > the primary hard drive over, what's the best way to get the package list > straight? Should I back up all of /etc, do a basic net install, then do an > apt-get update; apt-get upgrade? backup /etc, /home, /boot and perhaps some parts of /var dpkg --get-selections >> packages and on the new machine cat packages | dpkg --set-selections dselect update dselect install restore /etc, /home, /boot and any parts of /var I might have missed bits but this should be the general procedure. HTH, Shri -- Shri Shrikumar U R Byte Solutions Tel: 0845 644 4745 I.T. Consultant Edinburgh, Scotland Mob: 0773 980 3499 Web: www.urbyte.com Email: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Cloning a debian system
My office machine will be replaced next month. I'd like to make the new machine be pretty much like the old one. Given that I can't actually move the primary hard drive over, what's the best way to get the package list straight? Should I back up all of /etc, do a basic net install, then do an apt-get update; apt-get upgrade? Thanks- Andy -- Andrew J Perrin - http://www.unc.edu/~aperrin Assistant Professor of Sociology, U of North Carolina, Chapel Hill [EMAIL PROTECTED] * andrew_perrin (at) unc.edu -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: "Cloning" a Debian system
On Thu, Sep 07, 2000 at 03:43:08PM +0200, Juli-Manel Merino Vidal wrote: > On Thu, Sep 07, 2000 at 01:50:30PM +0100, Etienne Grossmann wrote: > > > > > > > Hello, > > > > is there any way to install on a Debian system the same packages > > that are found on another Debian system? The machines are not strictly > > equal. > > Yes, you can. > Do in the "primary" machine: > > dpkg --get-selections > packages > > And then, in the cloned machine do: > > dpkg --set-selections < packages a more thorough version of this is like so: dpkg --get-selections \* > packages then dpkg --set-selections < packages that way if you removed some packages from the primary machine they will also get removed on the clone. -- Ethan Benson http://www.alaska.net/~erbenson/ pgpVgXrtvSnSl.pgp Description: PGP signature
Re: "Cloning" a Debian system
Go to www.debian.org and click on the Search link. It does work, sometimes.. -chris On Thu, 7 Sep 2000, Etienne Grossmann wrote: > Hello, > > > Something like apt-get selections... -chris > > thanks for the hint. I would have started by the mail archives, > but I didn't find out how to search them... > > Cheers, > > Etienne >
Re: "Cloning" a Debian system
Hello, > Something like apt-get selections... -chris thanks for the hint. I would have started by the mail archives, but I didn't find out how to search them... Cheers, Etienne
Re: "Cloning" a Debian system
Yes, there is. I don't remember the incantation but if you search through the archives on www.debian.org you'll be sure to find some posts about it. Something like apt-get selections... -chris On Thu, 7 Sep 2000, Etienne Grossmann wrote: > > > Hello, > > is there any way to install on a Debian system the same packages > that are found on another Debian system? The machines are not strictly > equal. > > Tia, > > Etienne > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null >
Re: "Cloning" a Debian system
On Thu, Sep 07, 2000 at 01:50:30PM +0100, Etienne Grossmann wrote: > > > Hello, > > is there any way to install on a Debian system the same packages > that are found on another Debian system? The machines are not strictly > equal. Yes, you can. Do in the "primary" machine: dpkg --get-selections > packages And then, in the cloned machine do: dpkg --set-selections < packages Bye! > > Tia, > > Etienne > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null -- Juli-Manel Merino Vidal Email: [EMAIL PROTECTED] Homepage: http://jmmv.cjb.net
"Cloning" a Debian system
Hello, is there any way to install on a Debian system the same packages that are found on another Debian system? The machines are not strictly equal. Tia, Etienne
Re: Cloning a Debian system
>» I have setup a small Debian Linux system as a router, is there an easy way >» to "clone" this? I.e. to create copies of it on similar machines. We need >» them in pairs for WAN links between segments (EN-PPP-EN). >» >» E.g. a small boot to an LRP* or recovery disk, and a tftp, or, ? >» >» Now we have to take disks to a system with a CDROM, or move a CDROM around, >» etc.. ich! -- I should have been more explicit; The target systems are small 486's with nothing but a NIC Ethernet card, floppy, and small Hard-disk. I got lots of replies about dd/backup/tar .. etc, but the point here is I want to do it over the network. Floppys are too small, and there is no other transportable media on the target. I was thinking of something like a boot/recovery disk to tftp the whole thing, or a boot disk with NFS, or with (rsh source "tar cvf / -" | tar xvf -), or... I can play with it, but thought someone might already have a proven solution. Dr. Gregory Guthrie [EMAIL PROTECTED] (515)472-1125Fax: -1103 Computer Science Department College of Science and Technology Maharishi University of Management (Maharishi International University 1971-1995) -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Cloning a Debian system
Here is a quick way I do it. lets say you put in a spare hard drive at /dev/hdc make the filesystems you want on /dev/hdc (at least on for the / partition) and leave room for the swap partition. now mount your filesystems together off of say /mnt now 'find / -xdev -print | cpio -p -admuV /mnt' The -xdev means find wont descend directories on other filesystems. so if you have /usr on another partition it wont copy it. you'll need to run 'find /usr -xdev -print | cpio -p -admuV /mnt' to copy it. The bonus here is it also wont copy /mnt... now that would make a mess :) also note the V in -admuV tells cpio to print one '.' per file copied take it out if you want. cd to /mnt/etc/ and fix the fstab file to your new setup and off you go. This may not be complete instructions but it should take you 99% there. I probably dont need to say this but: _always_ be careful doing anything as root and read the man pages to understand what you are doing. --Udjat On Tue, 13 Jan 1998, Gregory Guthrie wrote: » I have setup a small Debian Linux system as a router, is there an easy way » to "clone" this? I.e. to create copies of it on similar machines. Ee need » them in pairs for WAN links between segments (EN-PPP-EN). » » E.g. a small boot to an LRP* or recovery disk, and a tftp, or, ? » » Now we have to take disks to a system with a CDROM, or move a CDROM around, » etc.. ich! » » Thanks. » --- » *http://www.psychosis.com/linux-router/ » » Dr. Gregory Guthrie » [EMAIL PROTECTED] (515)472-1125Fax: -1103 » Computer Science Department »College of Science and Technology »Maharishi University of Management » (Maharishi International University 1971-1995) » » » » -- » TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to » [EMAIL PROTECTED] . » Trouble? e-mail to [EMAIL PROTECTED] . » » -- Microsoft is not the answer. Microsoft is the question. NO is the answer. ,, / ( "> ___ _(-}) B I T B U R N A C C E S SSystem Administrator .' ^^ http://www.bitburn.org/ mailto: [EMAIL PROTECTED] `-> -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Cloning a Debian system
On Tue, 13 Jan 1998, Gregory Guthrie wrote: > I have setup a small Debian Linux system as a router, is there an easy way > to "clone" this? I.e. to create copies of it on similar machines. Ee need > them in pairs for WAN links between segments (EN-PPP-EN). If you have all the packages installed on the machine on CD or someplace else handy, you can do dpkg --get-selections > somefile and later do dpkg --set-selections < somefile on the other machine, then run the "install" section of dselect to actually install them. Will -- | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] | | http://www.cis.udel.edu/~lowe/ | -- | So don't beg, and don't plead. | | You can't have the heart you make bleed. | |-- The Beautiful South, "Love is..." | -- -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Cloning a Debian system
I have setup a small Debian Linux system as a router, is there an easy way to "clone" this? I.e. to create copies of it on similar machines. Ee need them in pairs for WAN links between segments (EN-PPP-EN). E.g. a small boot to an LRP* or recovery disk, and a tftp, or, ? Now we have to take disks to a system with a CDROM, or move a CDROM around, etc.. ich! Thanks. --- *http://www.psychosis.com/linux-router/ Dr. Gregory Guthrie [EMAIL PROTECTED] (515)472-1125Fax: -1103 Computer Science Department College of Science and Technology Maharishi University of Management (Maharishi International University 1971-1995) -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .