You are not logged in.

#1 2008-01-14 10:45:49

ulmen
Member
From: Germany
Registered: 2008-01-12
Posts: 6

i686 -> x86_64 upgrade path

Hi,

I have a server here running the i686 version of arch. This arch installation survived several hardware changes, and of course eventually it got an 64-bit processor. There is clearly some appeal to run the x86_64 version now, but i'm not too sure how this could be done most effortless.

The goal would be to "upgrade" the installation to 64bit, which is of course not possible with some simple pacman -Su or something wink

Now i could life with migrating the setup by hand, but still i have to get arch64 on it. Using the installation cdrom is the least feasible option since there is no drive installed and not even a burner around. Bootstrapping from the running 32bit installation is also not possible, since you cannot run any 64bit-binary... i was dumb enough to try it.

Next thing i can think of is booting the installation iso from some sort of usb-media, but i would love to hear what you suggest. There have to be more people who usually keep their installation between hardware upgrades (linux makes this just too easy to not do it), but are eager to run 64bit at some point smile

What is your suggestion for the smoothes 32bit -> 64bit upgrade path?

If i manage to do it only from ssh, i'll buy you a beer whenever we happen to meet.

Bye,
Lothar

Last edited by ulmen (2008-01-15 18:48:44)

Offline

#2 2008-01-14 12:04:57

chicha
Member
From: Nice (France)
Registered: 2007-04-20
Posts: 254

Re: i686 -> x86_64 upgrade path

Hello ulmen,

I do not have any Tip for switching to x86_64 from i686, BUT I have something that can help you regarding your configuration :

http://wiki.archlinux.org/index.php/Ins … her_distro

This is the simplest way to install Arch without burning anything or using a third party storage media (USB, liveCD ...).
All you need is some space on your hardisk (an entire partition would be great) and configure pacman.static to use x86_64.
What is really great is that you have all the time you want to build your new Arch : you can connect/disconnect to your chrooted Arch whenever you want (even using SSH, as you seem to like it wink ). When you feel ready, you can boot from your new Arch system, and thats it !

I used it to switch from my previous distro to Arch, and I use it whenever I want to rebuild my Arch for various reasons (new harddrive is a good one).

I hope it helped !
Cheers,

Chicha

Offline

#3 2008-01-14 12:18:49

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: i686 -> x86_64 upgrade path

u can not upgrade from x86 to x86_64 without re-installing your OS. The good news is, most of the config files in your home directory are not 64 bit compliant, at least I do not think so.

To make it easy, I would back up everything I need in ~/ to copy back over when the base 64 bit OS was back in place.

Last edited by jacko (2008-01-14 12:19:18)

Offline

#4 2008-01-14 12:24:31

ulmen
Member
From: Germany
Registered: 2008-01-12
Posts: 6

Re: i686 -> x86_64 upgrade path

Thank you for your reply Chicha.

The process described on that wikipage is what i meant with "bootstrapping". And as said, it won't work because pacman, after extracting the contents of the packages, does try to excecute some of the binarys he just unpacked. I'm not sure if just ignoring it leaves the new installation in a sane state. I guess not.

In my case, first was "sh: /newarch/sbin/ldconfig: cannot execute binary file".
While you can run 32bit binarys in an x86_64 environment, it's not working the other way round. Sadly. (If it is, this would be one of the tips i'd love to hear)

BTW: if you already know about the power of bootstrapping, get to know the power of lvm wink 5 different root-volumes (with possibly 5 different distributions on them)? not a problem. add 5 more? dito. remove all you never used again? go for it.

Bye,
Lothar

Offline

#5 2008-01-14 12:27:11

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 402
Website

Re: i686 -> x86_64 upgrade path

Hi,

I have done the following:
1. Create a text file with every single package name in it from the i686 installation. You can create this file with a small bash script and pacman, something like "pacman -Qs ... | grep ... | sed ...... > [textfile]" (don't know the exactly syntax at the moment, I'm at work)
2. Install x86_64 on my computer. After installation I run pacman in a loop over the text file and install every single package.
3. Copy the whole home directory from the i686 installation over to the new home directory, which I have create before.
4. Copy specific config files into /etc. Not all config files are compatible (e.g. pacman.conf, because of different paths).

That was all. I had just need about 1 1/2 hour for all and x86_64 installation runs perfectly, like my i686 before.

Last edited by ise (2008-01-14 12:28:45)

Offline

#6 2008-01-14 13:00:04

chicha
Member
From: Nice (France)
Registered: 2007-04-20
Posts: 254

Re: i686 -> x86_64 upgrade path

ulmen wrote:

Thank you for your reply Chicha.
The process described on that wikipage is what i meant with "bootstrapping". And as said, it won't work because pacman, after extracting the contents of the packages, does try to excecute some of the binarys he just unpacked. I'm not sure if just ignoring it leaves the new installation in a sane state. I guess not.

Oups, indeed I did not see that ! And for sure the installation will not be in a sane state because of post install script failure.

ulmen wrote:

In my case, first was "sh: /newarch/sbin/ldconfig: cannot execute binary file".
While you can run 32bit binarys in an x86_64 environment, it's not working the other way round. Sadly. (If it is, this would be one of the tips i'd love to hear)

I have one tip which allows to run x86_64 binaries within i686 environment : Qemu User space emulator.
But unfortunatly it is on development status : http://fabrice.bellard.free.fr/qemu/status.html.
In any case there might be a solution using emulation tools. I am going to look in this direction. I'll tell you if I find something : I am also interested in this problem !


ulmen wrote:

BTW: if you already know about the power of bootstrapping, get to know the power of lvm wink 5 different root-volumes (with possibly 5 different distributions on them)? not a problem. add 5 more? dito. remove all you never used again? go for it.

I already use LVM intensively wink

Offline

#7 2008-01-14 13:44:11

ulmen
Member
From: Germany
Registered: 2008-01-12
Posts: 6

Re: i686 -> x86_64 upgrade path

chicha wrote:

I have one tip which allows to run x86_64 binaries within i686 environment : Qemu User space emulator.
But unfortunatly it is on development status : http://fabrice.bellard.free.fr/qemu/status.html.
In any case there might be a solution using emulation tools. I am going to look in this direction. I'll tell you if I find something : I am also interested in this problem !

This sounds like a promising approach.

I thought about using qemu to generate a full-featured master-image to simply copy to the box afterwards, but this is much more elegant.

Quite some uniqe feature,if ever implemented in some official way wink pacman --sync --archupgrade (or whatever)

Please keep me informed, this gives me hope for an awesome upgrade path cool

Offline

#8 2008-01-14 13:57:20

chicha
Member
From: Nice (France)
Registered: 2007-04-20
Posts: 254

Re: i686 -> x86_64 upgrade path

ulmen wrote:

I thought about using qemu to generate a full-featured master-image to simply copy to the box afterwards

With Qemu you can use a host partition instead of a file image (if your host is a Linux system which is your case) : http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC20
I hightly recommand you first do some tests with the -snapshot option, so that you do not delete anything.

This sounds not too much inelegant wink , but for sure the direct User Space emulation sounds better !

Personally I find safer to install Arch within a file image. The thing is how to move things out the file image to an existing partition ? I do not know ! That is why I will go for using a real harddisk or partition with Qemu (and backup things if any on the related harddisk).

Offline

#9 2008-01-14 14:21:26

ulmen
Member
From: Germany
Registered: 2008-01-12
Posts: 6

Re: i686 -> x86_64 upgrade path

chicha wrote:

The thing is how to move things out the file image to an existing partition ?

qcow images should be mountable with dm-userspace. Never used this though.

You can always get the files you need out of qemu over the (virtual) network, nc or ssh and some pipes work good. Theese kind of images (i keep them as tar.bz2 around) require some work afterwards, but are universal and not bound to any partitioning, filesystem or anything.

I might do this just to get the case closed (and having an 64bit "master" shouldn't hurt for the future), but still the userspace emulation upgrade would be superior.

Offline

#10 2008-01-15 14:11:57

chicha
Member
From: Nice (France)
Registered: 2007-04-20
Posts: 254

Re: i686 -> x86_64 upgrade path

ulmen wrote:

qcow images should be mountable with dm-userspace. Never used this though.

I did not know that ! Nevertheless the documentation is hard to find about how to do this sad
I found a lot of things around dev mailing list such this one, but no simple howto !
Also I wonder whether dm-userspace is able to manage Qemu's new qcow2 format or not ?

Anyway you can use the 'raw' format for your disk image (or convert your qcow one to raw with qemu-img convert). The 'raw' image is mountable as a loopback device smile
You will have to use an offset value as a mount option (usually 32256 for the first partition). See here (or your favorite search engine) for more info : http://darkdust.net/writings/diskimagesminihowto

I think we are very close to a clean solution until Qemu manages x86_64 in User Space Emulation mode smile

Tell us as soon you have succeed migrating from i686 to x86_64 and which method you used.
This may intereset a lot of people here, and why not writing a little howto for Arch's Wiki ? We will see ...

Cheers,
Chicha

Offline

#11 2011-10-27 12:51:45

rossmcd
Member
From: Zambia
Registered: 2011-04-13
Posts: 25

Re: i686 -> x86_64 upgrade path

Offline

#12 2011-10-27 12:52:37

rossmcd
Member
From: Zambia
Registered: 2011-04-13
Posts: 25

Re: i686 -> x86_64 upgrade path

Oops, I only realised how old this is now.

Offline

#13 2011-10-27 14:46:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,144

Re: i686 -> x86_64 upgrade path

rossmcd wrote:

Oops, I only realised how old this is now.

It happens to all of us smile  Closing, just in case.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB