The man who did not know he had an amd64
Par jd le mardi, novembre 7 2006, 21:13 - Naquadah Network - Lien permanent
On sunday, I was looking around at the /proc/cpuinfo on one of my last server. I saw that this Pentium 4 had a lot more of cpu flags that the one on my workstation. I discovered the nx flags and its purpose some days before, but I did not know what the lm flags was for...
Oh my god, that's the 64 bits support. This box is an amd64 and it was installed as an i386. That's like using a knife to kill a kitten when you have an axe!
So, even if the box was 800 km away from me, I decided to reinstall it from scratch, with the help of a serial cable connected on it.
That was so easy. I just love Debian for such things.
- Step one: recompile linux-2.6-2.6.18 with support for 64 bits processors, that was easy, Goswin Brederlow made a patch I used and adapted in #379090.
- Step two: scratch your swap and debootstrap an amd64 sarge in it. Copy blindly your /lib/modules/2.6.18-1-amd64 inside.
- Step three: reboot with your 64 bits kernel on your brand new 64 bits Debian system and launch sshd.
- Step four: ask everyone on IRC WHY THE HELL you get sshd killed with a fucking kernel backtrace on your serial console each time you try to ssh to your box
- Step five: listen everyone advices and dist-upgrade to etch
- Step six: backup all the old data and scratch all your partitions, because you want LVM now. And migrating to 64 bits and LVM at the same time is more dangerous, so more exciting, so more fun.
- Step seven: move your brand new amd64 etch into your old root partition. Believe in you and that you did not forget anything to backup.
- Step eight: create your logical volumes and move your stuff in here, like /var, /usr and then blindly reboot. Thanks god you have a serial console.
- Step nine: apt-get install everything back and upgrade your old sarge conffiles to etch.
- Step ten: wonder why slapd is segfaulting again and again, and then yell after this fucking Berkeley DB files that are not architecture independant. Flame yourself because you don't have a LDIF backup of your LDAP tree.
- Step eleven: install a i386 sarge with LDAP to slapcat your old LDAP tree and restore it.
- Step twelve: Take a break. Have a Kit^Wbeer.
In the end, I'm happy, even if everyone is wondering why I killed a server during 10 hours just because it's better.
Commentaires
Hi,
Just wondering how what you think is a Pentium 4 can be and amd64? I have just checked my cpuinfo and discovered the same thing on my main machine!
lm means "long mode", ie. 64 bits instructions support, am I right? But how do you know it is amd64 (which I would have considered to be only for AMD processors), and not IA64?
I think I have understood that amd64 is also for EM64T processors. EM64T processors are the newer 64bits architecture from Intel, thus I can guess that any recent processor is amd64 and not EM64T...
I am quite lost with that.
What are the improvements in such cases? Do you think it is really worth "reinstalling" a desktop machine?
Cheers, Julien
Hello Julien !
You're right, lm means 'long mode', so you're machine is an amd64 too! Welcome to my life!
IA64 are Itanium processors, not Pentium, and are real 64 bits processor AFAIK.
If you have 'lm' flag, it means that you have support fort 64 bits instructions, like AMD processors have.
"amd64" arch is the name of the arch, but it also support em64t processor like we have. Take a look on: http://www.debian.org/ports/amd64/
I am not sure which improvement it can gives to you on a desktop machine, especially that you may have problem with something like proprietary Flash player (it does not exists for other arch than i386). Anyway such limitation can be bypassed by using a i386 chroot (32 bit code (i386) is executable with amd64 architecture).
If you want to know why it's better take a look : http://en.wikipedia.org/wiki/X86-64 or http://fr.wikipedia.org/wiki/AMD64 (french)
Cheers.
Hi,
Thanks for your detailed explanations!
It is a really strange feeling...
Cheers, Julien
Fil des commentaires de ce billet