You are not logged in.

#1 2009-02-02 16:00:43

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

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

So i successfully upgraded from i686 to x86_64 over the weekend; took me two tries but once i stopped making stupid mistakes it was actually pretty easy.  i'd like to document what i did (and some easy places to go wrong) here in this forum post, then maybe if i get the time, look into where and how to post a wiki entry.  [anyone who would like to put forth the effort is more than welcome to convert this to a wiki themselves]

My Scenario:
i had a working 686 install on a 250G drive with 2GB memory.  i bought a new 500G drive and 4GB memory to use in this ugrade.  i also had a 320G drive to store backup data for use in the transition.

The Steps:

first, backup /etc and /home/username to another drive that'll be accessible in your new system. 

cp -a /etc /home/username /backup_dir/

[sidenote]i used tar the first time but that was a pain.  when i finally went to restore, i got /etc/etc then i got /etc/* directly in / and then i had /home/username/home/username.  meh, my fault mostly but annoying nonetheless.  go with cp -a, it maintains the permissions and mod times and it's recursive by default including dot-files.  much easier if you've got the space.[/sidenote] 

second, create a list of installed packages to be reinstalled into the new system.

pacman -Qqe | grep -vx "$(pacman -Qqm)" > /backup_dir/pacman.lst
pacman -Qqm > /backup_dir/aur.lst

next, swap out your drives and install arch64 onto your new drive using whatever method you're comfortable with from the install cd.

note: with a clean out-of-the-box HDD i couldn't get the first [pata] boot live cd option to work, so i had to use legacy IDE.  this could be an isolated incident, i dunno; on my second attempt however (after the drive had already been formatted twice) i could use the first [recommended] option and these instructions continue from there.

now assuming all went well (i had to reformat/install a few times due to grub errors hmm), you should be rebooted into your new working 64bit system at this point.

the first thing i did was [-Syu then...] make a directory to mount my backup drive, add it's entry to fstab and mount it; if this were an ubuntu64 transition, i'd spell that out for you... wink

now, back up a few key /etc files that we don't want to modify during the restore (all of these are probably not needed, but on my second attempt at this i wasn't taking any chances...)

cp -a /etc/{fstab,pacman.conf,pacman.d,makepkg.conf} /backup_dir/

note: you _could_ just copy these files directly into /backup_dir/etc (overwriting your 686 backups) then they'll come over when you restore, but i like to separate steps sometimes to prevent errors, do whatever you feel comfortable with.

next, reinstall all of your packages.  thanks to the beauty that is pacman, this is a trivial (albeit timeconsuming) step.  aur.lst won't be used in this post but will come in handy later when you want to manually reinstall any foreign packages you had in your 32 bit system.  also, check the announcements forum about the klibc error(s), it will probably be required for you.

note: if you're comfortable editing pacman.conf and pacman.d/mirrorlist, do so now to maximize your download speed in the next step (don't forget to [re-]back them up to /backup_dir)

cat /backup_dir/pacman.lst | xargs pacman -S --noconfirm --needed

this will take forever.  go get dinner and come back to see how it went.

once that's all done we can restore /etc and /home then put back the files we didn't want modified

cp -a /backup_dir/etc /
cp -a /backup_dir/username /home/
cp -a /backup_dir/{fstab,pacman.conf,pacman.d,makepkg.conf} /etc/

now... gingerly... carefully... reboot.  hopefully, if you've been diligent, all should be well and it should look like your 686 system. 

go ahead and re install any packages you got from AUR at this point. 

Things to Note:
as i just did this yesterday, i'm still finding the little things that didn't get restored with this method, i'll list them below as i find them.

1. crontabs, dunno where they're stored but i had to recreate mine
2. firefox... error, "can't find GRE between version..."
fixed with:

sudo xulrunner --register-global

3. mySQL db's (my amarok db) is stored in /var/lib by default.  backup/restore it or recreate it after your upgrade.
4. some programs store config/theme files in /usr/share (slim, some kde icons...) it's nothing important but keep it in mind if you've modified things in there.
5. backing up /usr or /opt might be a good idea; backing up /var is _not_ a good idea as it contains all your 32 bit packages

good luck!
pat

Last edited by brisbin33 (2009-08-24 14:21:52)

Offline

#2 2009-02-02 17:00:48

meinhimmel
Member
Registered: 2007-07-12
Posts: 58

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

What applications have you noticed a benefit from 64bit in?

I'm using 64bit and have for a while, but I'm thinking about going back to i686 for Wine and Skype. :-/

Offline

#3 2009-02-02 17:03:55

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

meinhimmel wrote:

What applications have you noticed a benefit from 64bit in?

I'm using 64bit and have for a while, but I'm thinking about going back to i686 for Wine and Skype. :-/

i've only been using it a day or two; i think it might be overall a bit 'snappier' but that could be placebo effect. 

i don't use skype or wine so i doubt i'd switch back. 

i expect to see some improvements in ripping/converting media files though.  compiling aur packages seemed a bit quicker too.

Offline

#4 2009-02-02 17:38:49

Kilz
Member
Registered: 2008-03-01
Posts: 140

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

meinhimmel wrote:

What applications have you noticed a benefit from 64bit in?

I'm using 64bit and have for a while, but I'm thinking about going back to i686 for Wine and Skype. :-/

Wine is quite easy to install.
http://wiki.archlinux.org/index.php/Wine#x86_64
Skype is also listed on the wiki.
http://wiki.archlinux.org/index.php/Usi … _on_Arch64

Last edited by Kilz (2009-02-02 17:42:24)


I trust Microsoft about as far as I can comfortably spit a dead rat.
Cinnamon is a wonderful desktop
"Faith is the substance of things hoped for, the evidence of things not seen."

Offline

#5 2009-02-02 18:00:32

meinhimmel
Member
Registered: 2007-07-12
Posts: 58

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

Kilz wrote:
meinhimmel wrote:

What applications have you noticed a benefit from 64bit in?

I'm using 64bit and have for a while, but I'm thinking about going back to i686 for Wine and Skype. :-/

Wine is quite easy to install.
http://wiki.archlinux.org/index.php/Wine#x86_64
Skype is also listed on the wiki.
http://wiki.archlinux.org/index.php/Usi … _on_Arch64

I have it setup like that currently but I don't like having all the lib32 packages installed, and if there wasn't much of a difference I was thinking about downgrading.  I doubt I will though.  I have a very large music database, I rip a lot of movies, and I compile quite a bit of software.. So the negatives of downgrading probably outweigh the benefits.

Offline

#6 2009-02-02 22:06:07

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,563

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

Movie ripping? Xvid isn't very 64-bit optimized, but since x264 is better in every way (yes, even for extreme speed!) except for hardware compatibility with old devices... smile x264 gets about a 10% performance boost. I have heard databases are faster too. Compiling would actually be slower though, IMO, since (guessing) you're compiling for 64-bit, which means you're optimizing for more instruction sets (again, depends on your -march setting).

Offline

#7 2009-02-02 22:25:45

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

Ranguvar wrote:

Movie ripping? Xvid isn't very 64-bit optimized, but since x264 is better in every way (yes, even for extreme speed!) except for hardware compatibility with old devices... smile x264 gets about a 10% performance boost. I have heard databases are faster too. Compiling would actually be slower though, IMO, since (guessing) you're compiling for 64-bit, which means you're optimizing for more instruction sets (again, depends on your -march setting).

ah yes, i think i read you're 64-bit-compile-is-actually-slower part in another post of yours wink

i use both mySQL and x264 so hopefully i'll see some benefit.  either way i half did it just for somethin to do... and cuz i found 4 gigs of DDR2 800 RAM for cheap cheap!

Offline

#8 2009-02-03 23:01:49

userlander
Member
Registered: 2008-08-23
Posts: 413

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

I migrated this afternoon -- thanks for the wine tip Kilz, that's what I'm stuck on now. smile

Arch 64 definitely seems faster, but I'm going from IDE drives to a SATA drive, so I think that accounts for most of the increase. Can't wait to finish get everything installed (I love this part of the install where you add all your packages big_smile).

What I do is just mount the old drive and copy over (or edit) configs as I need them, renaming the new ones config.orig. That keeps the new install relatively "clean," just adding things as you go along. smile

Offline

#9 2009-02-04 01:23:40

Kilz
Member
Registered: 2008-03-01
Posts: 140

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

meinhimmel wrote:
Kilz wrote:
meinhimmel wrote:

What applications have you noticed a benefit from 64bit in?

I'm using 64bit and have for a while, but I'm thinking about going back to i686 for Wine and Skype. :-/

Wine is quite easy to install.
http://wiki.archlinux.org/index.php/Wine#x86_64
Skype is also listed on the wiki.
http://wiki.archlinux.org/index.php/Usi … _on_Arch64

I have it setup like that currently but I don't like having all the lib32 packages installed, and if there wasn't much of a difference I was thinking about downgrading.  I doubt I will though.  I have a very large music database, I rip a lot of movies, and I compile quite a bit of software.. So the negatives of downgrading probably outweigh the benefits.

While the choice is yours. I never did understand the choice some people make of going back to 32bit. Perhaps how I think about it is the difference.
With x86_64 there is a possibility to see performance improvements.
With i686 there is never the possibility of performance improvements.
It isnt like it was 3 or 4 years ago when you needed to run a handful of 32bit stuff. Now at least its only 1 or 2.  Installing and setup is about the same. Granted it may take longer to compile some things. But you win some , you loose some. I like the chance to win.


I trust Microsoft about as far as I can comfortably spit a dead rat.
Cinnamon is a wonderful desktop
"Faith is the substance of things hoped for, the evidence of things not seen."

Offline

#10 2009-02-07 00:04:25

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

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

Isn't it even easier to stay in your i686 system, change mirrorlist to x86_64 sources, reinstall all packages and that's it?
I'll try this today... I don't want to start from scratch... hope this works fine...


digiKam developer - www.digikam.org

Offline

#11 2009-02-07 01:09:38

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

TheGrudge wrote:

Isn't it even easier to stay in your i686 system, change mirrorlist to x86_64 sources, reinstall all packages and that's it?
I'll try this today... I don't want to start from scratch... hope this works fine...

eff me, would that really work?

Offline

#12 2009-02-07 01:40:37

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

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

brisbin33 wrote:
TheGrudge wrote:

Isn't it even easier to stay in your i686 system, change mirrorlist to x86_64 sources, reinstall all packages and that's it?
I'll try this today... I don't want to start from scratch... hope this works fine...

eff me, would that really work?

Whether or not it would, that comment just made my day.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#13 2009-02-07 01:46:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

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

TheGrudge wrote:

Isn't it even easier to stay in your i686 system, change mirrorlist to x86_64 sources, reinstall all packages and that's it?
I'll try this today... I don't want to start from scratch... hope this works fine...

It's not going to work. But, I'm afraid that you already know that.

Offline

#14 2009-02-07 08:41:29

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

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

No I haven't done it, was too busy right now. Was the question really this stupid? It still sounds logical to me.
Why wouldn't it work?


digiKam developer - www.digikam.org

Offline

#15 2009-02-08 15:03:32

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

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

Maybe I've been misunderstood: I have a Macbook Pro here, but with 32bit Archlinux. Now I thought when I reinstall all packages, but as the 64 bit version, this should be enough. Why is the thought so wrong?


digiKam developer - www.digikam.org

Offline

#16 2009-02-08 16:15:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

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

It's a good question, and on the surface it seems like that it should work. The problem is that you're going to be switching over run-time libraries from one architecture to the next as you upgrade things. Inevitably something that you're going to try to install will need a library that's still from the other architecture and you'll start to get wrong ELF class errors. At this point you're stuck if the libraries are system level libraries.

There was a time when I was playing with lib32 stuff on my 64 bit machine. I was making a package for lib32-glibc, and not thinking I ran pacman -U *.pkg.tar.gz. This installed both the lib32 program and the 32 bit glibc which was in the directory. I had a near total system failure close to instantly. Stuff that was running in memory was alright for about 30 seconds, but everything else that tried to call glibc libraries failed. I ended up having to go in with a live CD and force install the correct glibc. This is only one package, and I knew what it was. How does one start to fix things when you have a mix of libraries and you can't access the terminal anymore? Or pacman, or the network, or ...

Offline

#17 2009-02-09 11:45:14

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

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

Oh right, I haven't thought about ELF here :-( Sure this will not work...


digiKam developer - www.digikam.org

Offline

#18 2009-02-12 00:51:44

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,230
Website

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

skottish wrote:

It's a good question, and on the surface it seems like that it should work. The problem is that you're going to be switching over run-time libraries from one architecture to the next as you upgrade things. Inevitably something that you're going to try to install will need a library that's still from the other architecture and you'll start to get wrong ELF class errors. At this point you're stuck if the libraries are system level libraries.

Could you boot the 64-bit LiveCD and mount your existing installation to /mnt/sda1, then:

pacman -Sy
pacman -Qqe --dbpath /mnt/sda1/var/lib/pacman > /tmp/packages.txt
for PKG in `cat /tmp/packages.txt` ; do
   pacman -S --root /mnt/sda1 --logfile /mnt/sda1/var/log/pacman.log --noconfirm $PKG
done

Offline

#19 2009-02-12 00:55:49

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

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

Hey, that's pretty cool. Have you tried it?

Offline

#20 2009-02-12 02:49:20

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,230
Website

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

skottish wrote:

Hey, that's pretty cool. Have you tried it?

Not yet, haven't got a machine with a 64-bit processor and 32-bit Arch that I'm willing to sacrifice incase it doesn't work wink

I have a 64-bit machine at home that I can throw a scratch drive in and install 32-bit arch onto to test, but not sure when I'll get a chance (very busy with the bushfires down here at the moment. My fire brigade / home is only about 10km from the fires sad so we're sending a lot of crews at the moment)

Last edited by fukawi2 (2009-02-12 02:49:57)

Offline

#21 2009-02-12 03:23:23

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

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

Well, if there is something to add to this thread, is how beautiful Linux makes using a 64 bit OS. I mean in windows, more than half the applications you install are 32 bit, so why use 64 bit windows? But Linux is another story, and Arch better, I have all the applications I need, and if there are appas that are 32 bit only right now, they can be counted with a hand. Linux makes 64 bit enjoyable.


Follow me in: Identi.ca, Twitter, Google+

Offline

#22 2009-02-16 02:22:17

phydeaux
Member
Registered: 2005-06-13
Posts: 68

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

fukawi2 wrote:

Could you boot the 64-bit LiveCD and mount your existing installation to /mnt/sda1, then:

pacman -Sy
pacman -Qqe --dbpath /mnt/sda1/var/lib/pacman > /tmp/packages.txt
for PKG in `cat /tmp/packages.txt` ; do
   pacman -S --root /mnt/sda1 --logfile /mnt/sda1/var/log/pacman.log --noconfirm $PKG
done

I decided to give this a shot on my laptop this evening, mostly out of boredom.

I had to make a few tweaks to your commands to get it to reinstall the packages.  When you use --root with pacman it will look for the the log file and database relative to that root (unless it is specified in pacman.conf which it isn't atleast in the usb install image I used), so you need to specify the dbpath back to the installer's filesystem.  Alternatively you could do pacman -Syu --dbpath /mnt/var/lib/pacman and update the one in the existing install. Pacman will also freak out about existing files so giving it the -f option is needed too.

for PKG in `cat /tmp/packages.txt` ; do
   pacman -Sf --root /mnt/ --dbpath /mnt/var/lib/pacman --logfile /mnt/var/log/pacman.log --noconfirm $PKG
done

That will get it to reinstall everything.

I didn't bother to update my i686 install before I did this and ldconfig was yelling about some modules with the same soname but are a different type, older vesions that didn't get overwritten.  I'm thinking bringing the system up to date first would have prevented this, and it may have been the root of the problem I was having next.

After that I booted from the hard drive and it would hang with a few messages stating "runaway loop modprobe binfmt-464c".  Tried reinstalling grub and some other tricks I found with google but nothing got it going.  This probably had something to do with some 32bit leftovers some where, and ldconfig not running cleanly.  I wasn't about to go through and try to delete all of the offending modules, so I cut my losses and did a fresh install.  Good thing I had the sense to back up first.  Now I just have to wait for all of the packages to download again.

Andy

Last edited by phydeaux (2009-02-16 02:23:29)

Offline

#23 2009-02-21 11:04:13

Changaco
Member
Registered: 2008-09-01
Posts: 15
Website

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

What about getting the list of files that don't belong to a package in order to backup ?
Or do the opposite, delete all those files and then install x86_64 packages ?

Offline

#24 2009-02-21 20:28:58

TheGrudge
Member
Registered: 2006-06-15
Posts: 206
Website

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

I think about compiling my own kernel... the only option I want to change for now is the processor type. The default is "Pentium Pro", but I have a Intel Core2 Duo. Would it make any difference if I set this processor type?
When I compile this kernel with 64bit support
CONFIG_64BIT=y
CONFIG_X86_32=n
CONFIG_X86_64=y
CONFIG_X86=n
can I use the normal 32 bit apps that are installed? Or will this also not work?


digiKam developer - www.digikam.org

Offline

#25 2009-02-21 20:42:18

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,230
Website

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

Uhhh, that seems almost totally unrelated to the rest of the thread TheGrudge... I'd suggest you open a fresh thread...

Offline

Board footer

Powered by FluxBB