You are not logged in.

#51 2010-12-05 16:04:39

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

brisbin33 wrote:

(See post above)

When you run that first line (--asexplicit not required) pacman will bring in all the deps correctly.  No second line needed.

EDIT: overlooked something, I think you're right.

Last edited by Ramses de Norre (2010-12-05 16:05:09)

Offline

#52 2010-12-05 16:05:48

ava1ar
Member
From: NYC
Registered: 2009-10-20
Posts: 24

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

brisbin33 wrote:

When you run that first line (--asexplicit not required) pacman will bring in all the deps correctly.  No second line needed.

Actually original variant from post #34 will also work, since pacman will keep original install reason property for packages.

Offline

#53 2010-12-05 16:11:39

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

ava1ar wrote:
brisbin33 wrote:

When you run that first line (--asexplicit not required) pacman will bring in all the deps correctly.  No second line needed.

Actually original variant from post #34 will also work, since pacman will keep original install reason property for packages.

Oh cool, didn't know that.

Offline

#54 2010-12-05 21:00:38

stefano.facchini
Member
Registered: 2010-11-12
Posts: 24

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

ava1ar wrote:
stefano.facchini wrote:

Any idea? thank you!

Have you updated /etc/makepkg.conf after migration to 64-bit? CARCH and CHOST should have following values:

CARCH="x86_64"
CHOST="x86_64-unknown-linux-gnu"

You can fix this manually or just remove this file and reinstall pacman package.

Hope this helps.

I'm not using makepkg, just building from source without creating a package. Anyway, I solved the problem: before building I need to give the command

$ make distclean

to completely clean the configuration files. The usual

$ make clean

is not enough!

Offline

#55 2010-12-10 21:18:11

Demon
Member
From: Republic of Srpska, BA
Registered: 2008-03-02
Posts: 246

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

Just to add something: after migrating my system to x86_64 I had a lot of troubles: I couldn't get to log into my KDE account. I've spent hours to see what was the cause, and the solution was so simple: you just need to delete everything from /var/tmp! smile

Offline

#56 2011-03-22 10:53:29

slaveriq
Member
From: Copenhagen
Registered: 2008-05-25
Posts: 3
Website

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

ava1ar wrote:

Guys,

looks like I found a smooth way to perform conversion i686 to x86_64 system. I successfully tested it on virtual machine on my laptop (with more than 700 packages installed). Please find steps I did below:

1. Steps on i686 system before upgrade:
    a) Update you system to up-to-date state;
    b) If you are using custom kernel (not kernel26 from Arch repo) it is recommended to switch to kernel26 for migration process (you may revert back to your custom kernel after migration done);
    c) Remove i686 only packages (like skype, virtualbox-ose, etc) and custom packages (like ones from AUR). You may skip this, but later you will need extra effors than;
    d) Remove i686 only repositories from pacman.conf of any;
    e) Clear package cache and unused repositories data using

pacman -Scc

command;
    f) Switch you repositories from i686 to x86_64 packages (/etc/pacman.d/mirrorlist, custom repositories from pacman.conf, etc). For modifying mirrorlist yo may use following commands:

# mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.i686
# sed -e 's/i686/x86_64/' /etc/pacman.d/mirrorlist.i686 > /etc/pacman.d/mirrorlist

I also had to update kdemodmirrorlist as well (this is repositories from kdemod project).
    g) Perform full resync of package databeses using

# pacman -Syy

command.

2. OK, now you system is ready. Next steps will be executed using Arch live cd (or live usb) system:
    a) Boot from cd or usb with live Arch Linux system (I used usb stick with release 2009.08) and login as root
    b) Create folder in /media and mount root (/) of you system there:

# mkdir /media/i686
# mount /dev/sdaX /media/i686

(!) c) Perform upgrade of all installed packages on you main with --noscriptlet option (please be very accurate with pacman options here):

 # pacman --root /media/i686 --cache /media/i686/var/cache/pacman/pkg --noscriptlet -S `pacman --root /media/i686 -Qq`

Wait till installation finished.

       If you receive messages like

<package_name> package not found, searching for group...
error: '<package_name>': not found in sync db

you should either remove <package_name> using command

# pacman --root /media/i686 -Rd <package_name>

either ignore this package during upgrade. To do this just modify

`pacman --root /media/i686 -Qq`

part of the above command as

 `pacman --root /media/i686 -Qq | grep -v <package_name>`

You can have any number of ignored packages by adding new grep -v statements to the command end;

3. Now you binaries are updated and we need to do configuration of installed packages.
    a) Mount virtual filesystems

# mount --bind /proc /media/i686/proc
# mount --bind /sys /media/i686/sys
# mount --bind /dev /media/i686/dev
# mount --bind /dev/pts /media/i686/dev/pts
# mount --bind /dev/shm /media/i686/dev/shm

b) Perfrom chroot to host root:

# chroot /media/i686

(!) c) Mount /boot partition (if it is on separate partition on you system - look at /etc/fstab):

# mount /boot

d) Perform upgrade of all packages (yeah, again smile):

# pacman -S `pacman -Qq`

You will also need to ignore custom packages like in step 2c

4. OK, our system is ready now, rebooting to the main system:
    a) Unmount /boot partition

# umount /boot

b) Exit from chroot:

# exit

c) Unmount virtual filesystems:

# umount /media/i686/proc
# umount /media/i686/sys
# umount /media/i686/dev
# umount /media/i686/dev/pts
# umount /media/i686/dev/shm

d) Unmount main system root partition:

# umount /media/i686

e) Reboot

5. Profit!

This perfectly works for my test and live systems, but if you have some issues/comments, please let me know - I will try to help. In any case, I think this will be usefull as a proof of high flexibility of Arch Linux and pacman.

Thanks  it worked great but had a problem with Chromium/kwallet causing chromium to chrash when using basic auth. Solved it by removing my saved passwords.

Also to remove all aur packages:
pacman -Rdc `pacman -Qqm`

Offline

#57 2011-05-01 13:12:34

n17ikh
Member
Registered: 2008-09-15
Posts: 11

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

Another report of success following the directions in post #34. Thanks, ava1ar!

Offline

#58 2011-05-01 14:25:16

ava1ar
Member
From: NYC
Registered: 2009-10-20
Posts: 24

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

n17ikh wrote:

Another report of success following the directions in post #34. Thanks, ava1ar!

You are welcome, n17ikh! Glad to hear that my instructions are still working OK smile

Offline

#59 2011-12-31 06:39:08

archlinuxsagi
Member
Registered: 2008-09-12
Posts: 259

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

ava1ar. I am having issues with your upgrade method and I am still troubleshooting why is it happening.
I also add --debug to pacman to view pacman errors or warning.

Below is pacman output:
pacman --root /media/mg64test/ --cache /media/mg64test/var/cache/pacman/pkg --noscriptlet -S `pacman --root /media/mg64test -Qq` --debug --config /media/mg64test/etc/pacman.conf
debug: config: attempting to read file /media/mg64test/etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: Architecture: x86_64
debug: config: new section 'core'
debug: registering sync database 'core'
debug: config file /media/mg64test/etc/pacman.conf, line 65: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'core': ftp://ftp.oss.eznetsols.org/linux/archl … /os/x86_64
debug: adding new server URL to database 'core': http://mirrors.cat.pdx.edu/archlinux/core/os/x86_64
debug: setlibpaths() called
debug: option 'root' = /media/mg64test/
debug: option 'dbpath' = /media/mg64test/var/lib/pacman/
debug: option 'lockfile' = /media/mg64test/var/lib/pacman/db.lck
debug: option 'logfile' = /media/mg64test/var/log/pacman.log
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: config file /media/mg64test/etc/pacman.conf, line 69: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'extra': ftp://ftp.oss.eznetsols.org/linux/archl … /os/x86_64
debug: adding new server URL to database 'extra': http://mirrors.cat.pdx.edu/archlinux/extra/os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: config file /media/mg64test/etc/pacman.conf, line 73: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: adding new server URL to database 'community': ftp://ftp.oss.eznetsols.org/linux/archl … /os/x86_64
debug: adding new server URL to database 'community': http://mirrors.cat.pdx.edu/archlinux/co … /os/x86_64
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /media/mg64test/etc/pacman.conf
debug: registering local database
debug: loading package cache for repository 'local'
debug: database path for tree local set to /media/mg64test/var/lib/pacman/local/
debug: loading package cache for repository 'core'
debug: database path for tree core set to /media/mg64test/var/lib/pacman/sync/core/
debug: warning: pkgcache is NULL for db 'core'
debug: warning: failed to get 'pacman' from NULL pkgcache
debug: loading package cache for repository 'extra'
debug: database path for tree extra set to /media/mg64test/var/lib/pacman/sync/extra/
debug: warning: pkgcache is NULL for db 'extra'
debug: warning: failed to get 'pacman' from NULL pkgcache
debug: loading package cache for repository 'community'
debug: database path for tree community set to /media/mg64test/var/lib/pacman/sync/community/
debug: warning: pkgcache is NULL for db 'community'
debug: warning: failed to get 'pacman' from NULL pkgcache
debug: 'pacman' not found in sync db => no upgrade
debug: warning: pkgcache is NULL for db 'core'
debug: warning: failed to get 'abs' from NULL pkgcache
debug: warning: pkgcache is NULL for db 'extra'
debug: warning: failed to get 'abs' from NULL pkgcache
debug: warning: pkgcache is NULL for db 'community'
debug: warning: failed to get 'abs' from NULL pkgcache
debug: warning: pkgcache is NULL for db 'core'
debug: warning: pkgcache is NULL for db 'extra'
debug: warning: pkgcache is NULL for db 'community'
debug: abs package not found, searching for group...
debug: loading group cache for repository 'core'
debug: warning: pkgcache is NULL for db 'core'
debug: loading group cache for repository 'extra'
debug: warning: pkgcache is NULL for db 'extra'
debug: loading group cache for repository 'community'
debug: warning: pkgcache is NULL for db 'community'
error: 'abs': could not find or read package
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: freeing group cache for repository 'core'
debug: unregistering database 'extra'
debug: freeing package cache for repository 'extra'
debug: freeing group cache for repository 'extra'
debug: unregistering database 'community'
debug: freeing package cache for repository 'community'
debug: freeing group cache for repository 'community'

Last edited by archlinuxsagi (2011-12-31 12:24:15)

Offline

#60 2011-12-31 12:23:45

archlinuxsagi
Member
Registered: 2008-09-12
Posts: 259

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

archlinuxsagi wrote:

ava1ar. I am using issues with your upgrade method and I am still troubleshooting why is it happening.
I also add --debug to pacman to view pacman errors or warning.
....

I fixed the issue by using the 64 bit ISO. I guess the host must be a 64 bit OS.

Offline

#61 2011-12-31 14:48:09

ava1ar
Member
From: NYC
Registered: 2009-10-20
Posts: 24

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

archlinuxsagi wrote:

I fixed the issue by using the 64 bit ISO. I guess the host must be a 64 bit OS.

Correct, you should use x64 system to perform described actions.

Offline

#62 2012-07-10 20:58:43

TimorLee
Member
Registered: 2012-07-05
Posts: 48

Re: i686 --> x86_64 upgrade - steps i took to keep packages/settings/data

So, I also succesfully migrated to 64-bit today. No loss od data, that was caused by migration, so a general: YEAH!

I tried the Method 1 from the wiki, but somehow it didn't update the dependencies (nor the Kernel for that matter),
So upon restart most everything was broken. From there I followed Method 2, and voilà! Everything now works, exception: Wine stuff and some games.
I got most games working again following the wiki article, but still have to reinstall some native games like ut1999 and freespace 2. Limbo also doesn't want to run anymore. Anybody know how to tell Playonlinux to use WINEARCH=win32 for its prefixes?

Only problem I now have: I only have 1. resolution to choose (my native one) and can't change the scaling method in nvidia-settings anymore. The thingy where you could select that doesn't exist anymore. Adding resolutions with xrandr doesn't work either. Anyone with similiar issues? The guys at #archlinux said that it is a problem with nvidia's not-yet fully implemented meta-modes, but I don't know what thats about... I also tried using Xorg.conf to tell the nvidia driver what to do, but it seemed to ignore the file.

tl;dr: Use Wiki Method 2, Works well.

Offline

Board footer

Powered by FluxBB