Re: Cloning a debian system

2003-07-15 Thread Mike Fedyk
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

2003-07-14 Thread Shri Shrikumar
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


Re: Cloning a debian system

2003-07-14 Thread Vineet Kumar
* 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

2003-07-14 Thread Marino Fernandez

  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

2003-07-14 Thread Wolfgang Fischer
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 your Debian system

2001-05-08 Thread Tom Pfeifer
There is a HOWTO written up on the general subject of copying a Linux
installation, and that's what got me started. You can find it here:

http://www.linuxdoc.org/HOWTO/mini/Hard-Disk-Upgrade/index.html

Tom


Viktor Lakics wrote:
 
 I got a crazy idea: if you want to make 100 % sure that you do not
 brake your production system, why don't you have an exact copy of
 that system before you do an upgrade (or just use that system for
 trying out things, which you cannot afford on your system).
 
 I got a spare 2 Gig partition on my system, and I want to give it a
 try. I just do not know how to start this? O.K. I could probably do
 it with hard disk image program, but then what configuration files
 do I have to edit (exept /etc/fstab) after my root partition moves
 from /dev/hda8 to /dev/hda7...
 
 Anyone have done it already? All comments and possible ways to do it
 are welcome!
 
 Thanks in advance. -- Viktor



Cloning your Debian system

2001-05-07 Thread Viktor Lakics
I got a crazy idea: if you want to make 100 % sure that you do not
brake your production system, why don't you have an exact copy of
that system before you do an upgrade (or just use that system for
trying out things, which you cannot afford on your system).

I got a spare 2 Gig partition on my system, and I want to give it a
try. I just do not know how to start this? O.K. I could probably do
it with hard disk image program, but then what configuration files
do I have to edit (exept /etc/fstab) after my root partition moves
from /dev/hda8 to /dev/hda7...

Anyone have done it already? All comments and possible ways to do it
are welcome!

Thanks in advance. -- Viktor 





Re: Cloning your Debian system

2001-05-07 Thread Rob Mahurin
Hello, Viktor.  I'm a little mystified as to why you CC'd this to me,
but here goes.

On Mon, May 07, 2001 at 10:00:54PM +0100, Viktor Lakics wrote:
 I got a crazy idea: if you want to make 100 % sure that you do not
 brake your production system, why don't you have an exact copy of
 that system before you do an upgrade (or just use that system for
 trying out things, which you cannot afford on your system).
 
 I got a spare 2 Gig partition on my system, and I want to give it a
 try. I just do not know how to start this? O.K. I could probably do
 it with hard disk image program, but then what configuration files
 do I have to edit (exept /etc/fstab) after my root partition moves
 from /dev/hda8 to /dev/hda7...
 
 Anyone have done it already? All comments and possible ways to do it
 are welcome!

I would you rsync(1) to copy the relevant parts of the system over
(say, to $HOME/system2) and chroot(8) to switch to the subsystem.

Rob

-- 
Comparing information and knowledge is like asking whether the fatness of a
pig is more or less green than the designated hitter rule.
-- David Guaspari



Re: Cloning your Debian system

2001-05-07 Thread Alvin Oga

hi ya viktor...

for changing root partitions
- change /etc/fstab  to the new root ( hda7 ) you wanna boot
- rerun lilo   
- make sure you can boot the old system ( hda8 ) into
single user mode just in case...
- reboot your box...

for copying exact images..
- using dd is sorta okay...your assuming there is nto disk
defects on hda  vs on hdb

( the paranoid guy(me) speaking )
if the production machine is live on the net...
- make a 2nd machine to play with and test the new gadgets...
- or at least get a 2nd disk drive...

- dont touch anything that works...unless you know what changed
  after tweeeking it ...

no such thing as 100% sure...you will find something wrong later...

c ya
alvin


On Mon, 7 May 2001, Viktor Lakics wrote:

 I got a crazy idea: if you want to make 100 % sure that you do not
 brake your production system, why don't you have an exact copy of
 that system before you do an upgrade (or just use that system for
 trying out things, which you cannot afford on your system).
 
 I got a spare 2 Gig partition on my system, and I want to give it a
 try. I just do not know how to start this? O.K. I could probably do
 it with hard disk image program, but then what configuration files
 do I have to edit (exept /etc/fstab) after my root partition moves
 from /dev/hda8 to /dev/hda7...
 
 Anyone have done it already? All comments and possible ways to do it
 are welcome!



Cloning a Debian system

2000-09-07 Thread Etienne Grossmann


  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

2000-09-07 Thread Juli-Manel Merino Vidal
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



Re: Cloning a Debian system

2000-09-07 Thread Krzys Majewski
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

2000-09-07 Thread Etienne Grossmann
  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

2000-09-07 Thread Krzys Majewski
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

2000-09-07 Thread Ethan Benson
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


Cloning a Debian system

1998-01-14 Thread Gregory Guthrie
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] .


Re: Cloning a Debian system

1998-01-14 Thread Will Lowe
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] .


Re: Cloning a Debian system

1998-01-14 Thread Udjat -Capt'n Squibb


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

1998-01-14 Thread Gregory Guthrie
» 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] .