[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: In-place upgrade from i386



Joerg Dorchain <joerg@dorchain.net> writes:

> Hello,
>
> I have a system with an intel core 2 dou CPU, which currently runs fine
> Debian-i386.
>
> I want to change it to amd64 with certain conditions:
>
> - Same package selection
> - Same debconf
> - Same config files
> - Same disk afterwards
>
> as on current i386 when it runs amd64.
>
> So far I managed to run an amd64 kernel.
>
> For the user space I though an
> apt-get -o APT::Architecture="amd64" {update|-f install}
> would do it, but stop immediately with 
> E: Internal Error, Could not perform immediate configuration (2) on
> libc6
>
> Any other ideas?
>
> Is an in-place debootstrap possible? Or can I hook the disk on another
> system and do a debboostrap there  without loosing the above mentioned
> information?
>
> TIA,
>
> Joerg

You can do an in-place upgarde with some hacks and I would rather you
won't even try.

- Create a copy of the libc6 and ld.so and add the dir to
  /etc/ld.so.conf. Worst case you have to run the ld with full path
  and pass the binary you need as argument. E.g.:
  /backup/ld-2.3.6.so /bin/ls
 
  Also add /lib32, /usr/lib32 to ld.so.conf and make them links to
  /emul/ia32-linux/lib and /emul/ia32-linux/usr/lib.

- Rename maintainer files in /var/lib/dpkg/info.
  You need to rename any package that contains a library, e.g. prefix
  them with ia32-. E.g. zlib1g -> ia32-zlib1g.

- Move libraries and docs.
  You need to move all libraries from /lib to /lib32 and /usr/lib to
  /usr/lib32. But dont't move subdirs.
  For /usr/share/doc you need to rename the directories to match the
  renaming done in the last step. Beware that some dirs are links.
  Also look out for diversions.

- Fix diversions and status file
  You need to change the package names in diversions and status files
  to match the names chosen above (ia32-zlib1g). This includes
  especially the Depends, Conflicts, Pre-Depends lines.
  Also change the Architecture field to amd64.

If you have done all this and you still have a running system then you
can start to upgrade.

Now install libc6 (the old 32bit one is now ia32-libc6), perl, dpkg,
apt in that order while forcing the arch to amd64. This is the big
test if you did everything right above.

Reinstall every not renamed package on your system (everything not
ia32-...). This causes each of them to be upgraded to the 64bit
version. If you upgarde from sarge to etch at the same time then
upgrade, dist-upgrade will do most of them automatically.

Now you should have a full 64bit system with some unused 32bit cruft
left behind. Purge all ia32-* packages to get rid of cruft.

Enjoy or despair, your choice.

MfG
        Goswin

PS: Doesn't reinstalling sound so much simpler?


Reply to: