[conspire] Re: Quick Question about Debian install. . .

Rick Moen rick at linuxmafia.com
Tue Mar 18 17:00:22 PST 2003

Quoting Scott Rieger (digicamman at attbi.com):

> Just wanted to know if you build a Debian package on one disk in
> system "A" and them move that disk to system "B" will that mess up the
> Debian database or only affect the hardware and CPU kernel info?

I suspect you may mean "install" when you say "build", above.  (Literally 
speaking, to build a Debian package is to compile it.)  However, I'm
left a _little_ uncertain what you're asking about.  More about that,

Ordinarily, you would install package on a second system the same way
you would on the first system.  That is, you would not try to copy or move
_installed_ software from the first system to the second, but rather
would install the same package names onto the second system in the same
approximate manner you did the first one.

> If I start to build the system I was telling you about, just wanted to know 
> if it could be potable to another system with better hardware?

Reading _this_ question, I _think_ I understand what you're asking
about.  You're saying something like:  "I'm planning to build a Debian
system using my old PPro and antique Trident video card today.  Later
on, can I extract my hard drive from the P233, put it into a new
Athlon-oriented system with ATI Radeon video, and expect everything to

The answer is "Yes, but...."  I can think of four gotchas.

1.  On i386 installs (as opposed to PowerPC, Alpha, SPARC, etc.), Debian
defaults to installing prebuilt kernels that are completely generic and
will work on any i386 or up including 386, 486, Pentium, Pentium MMX,
Pentium Pro, PII, PIII, P4, K6, Athlon, Duron, etc.  _However_, there
are alternate prebuilt kernel images available from Debian mirrors that
have better CPU optimisation.  Let's say you installed one with P6
optimisation, to better work with your PPro.  That kernel probably
wouldn't boot on your Athlon.

The fix would be to pull down from the Debian mirrors a
K7/Athlon-optimised prebuilt kernel just before transplanting your hard
drive (or put back the generic i386-optimised one).

2.  XFree86 setup.  X11 probably wouldn't work, at first.  You'd
probably have to re-run "dpkg-reconfigure xserver-xfree86" to set it up
for the ATI Radeon.  I could be wrong.

3.  Boot-up.  A valid LILO or GRUB setup for one motherboard may not
work after transplanting the hard drive to a different motherboard,
because of difference in the way they assign cylinder, head, and sector
numbers to hard drives.  Therefore, you might have to re-do LILO/GRUB
from a maintenance floppy, after moving the hard drive.

4.  Your /etc/modules and /etc/modules.conf files would probably be
totally wrong, because they'd have references to hardware drivers that
were needed only on your old system, and lack ones needed for your new
one.  Fixing this might be a bit of a pain.  (Likewise, symlinks in /dev
such as mouse, cdrom, and modem might need to be re-pointed.)

To answer your question generally, Debian packages on i386 architecture
don't otherwise install themselves in non-portable ways.

But another way around the problem you mention would be to first do a
minimal Debian install on the new hardware, and then make Debian's
apt-get tool reinstall the same package _names_ as you had before,
having written out to a file the installed-packages list while the old
system was running, prior to shutting it down.  Quoting my
http://linuxmafia.com/debian/tips file:

Writing out your current installed packages:

     # dpkg --get-selections >selections.txt

And get their current versions (not strictly needed):

     # COLUMNS=150 dpkg -l > packages.txt

To reconstruct the system, install the Debian Base System, then:

     # dpkg --set-selections <selections.txt
     # apt-get -u dist-upgrade

P.S.:  Please feel free to post questions like this to CABAL's mailing
list, conspire at linuxmafia.com .  You'd have to join the list, via
http://linuxmafia.com/cgi-bin/mailman/listinfo/conspire .  I've taken
the liberty of cc'ing it for this reply.

Cheers,      "Transported to a surreal landscape, a young girl kills the first
Rick Moen     woman she meets, and then teams up with three complete strangers
rick at linuxmafia.com       to kill again."  -- Rick Polito's That TV Guy column,
              describing the movie _The Wizard of Oz_

More information about the conspire mailing list