LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-27-2011, 06:39 AM   #1
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
Squeeze... I installed 32bit, it says amd64?


I am a little confused. I downloaded Debian squeeze 32bit. I installed that 32bit. I then installed Truecrypt 32bit (which doesn't work on a 64bit os as Truecrypt64 doesn't work on a 32bit os.)

However uname -r says

Quote:
2.6.32-5-amd64
It is not a 64bit, if it is a 64 bit did it somehow get upgraded from 32 to 64 but it didn't break any of the 32bit packages? Everything runs perfectly fine.

I am completely lost here.

Edit: Unless when I installed the Nvidia drivers it updated to the 64bit kernel automatically? But why didn't anything break?

Last edited by Amdx2_x64; 11-27-2011 at 06:41 AM.
 
Old 11-27-2011, 07:36 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Amdx2_x64 View Post
I am a little confused. I downloaded Debian squeeze 32bit. I installed that 32bit.
How sure are you about that?

Quote:
I then installed Truecrypt 32bit (which doesn't work on a 64bit os as Truecrypt64 doesn't work on a 32bit os.)
A 64bit app certainly doesn't work on a 32 bit OS. But most 32 bit x86 apps work on 64 bit x86 OS's. So is there something special about Truecrypt32 that makes it not work on a 64bit OS?

Quote:
However uname -r says
That is just a name. It would be possible to give that name to a 32bit kernel. It is very unlikely that anyone would. But you haven't given room for any likely explanations.

Quote:
if it is a 64 bit did it somehow get upgraded from 32 to 64 but it didn't break any of the 32bit packages? Everything runs perfectly fine.
I think upgrading 32 bit to 64 bit would be very difficult (without reinstalling the whole distribution). But if you could do such an upgrade, it wouldn't break your 32 bit packages.

Quote:
Edit: Unless when I installed the Nvidia drivers it updated to the 64bit kernel automatically?
No way. That one is flat out impossible.

I think you were just mistaken about what Debian you were installing.
 
Old 11-27-2011, 07:58 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Debian doesn't make mistakes like labeling a kernel as amd64 when it is 32-bits. Check your '/' directory, if /lib64 is present, you are most likely running 64 bits.

Since you have the 32-bit compatibility libs installed you should be running most 32-bits apps without a problem.

Upgrading from 32 to 64 bits is impossible AFAIK, only re-install.

jlinkels
 
1 members found this post helpful.
Old 11-27-2011, 08:14 AM   #4
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Nope. No /lib64.

Uname -r Says 2.6.32-5-amd64 though.

Look for yourself...

http://s10.postimage.org/62b14dfo9/ss1.png


Edit: I am NOT mistaken about what I installed. As far as it just being a name. Then what could have renamed it, for that matter how could it get renamed? This makes no sense.

Edit II: Also /boot shows config-2.6.32-5-amd64, same for the initrd.img, system.map, vmlinuz-2.6.32-5-amd64.

Last edited by Amdx2_x64; 11-27-2011 at 08:21 AM.
 
Old 11-27-2011, 08:29 AM   #5
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
This has to have something to do with Nvidia.


i nvidia-kernel-2.6.32-5-amd64 - NVIDIA binary kernel module for Linux 2.6.32-5-amd64
 
Old 11-27-2011, 08:31 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
uname -a gives more info than uname -r

A true AMD64 kernel should say x86_64 three times in the output of uname -a. A 32-bit kernel will not have x86_64 at all in that output.

I've seen many posts by experts that ought to know saying that it won't work to just drop a 64bit kernel and its associated module files into a 32bit install (a few critical files would be missing). But I've never tried it. If an expert really wanted to, I think it would be possible to create a package to install all the files needed to convert a 32bit Linux system into a 64bit Linux system leaving mostly 32bit packages. I'm actually a little surprised no one is doing that. But I've never heard of it.

When I have installed Nvidia drivers, that involved an obfuscated script from Nvidia that rebuilds the drivers based on the headers of installed kernel. So it didn't modify the kernel itself. If you installed a package that includes a new kernel as part of Nvidia drivers, that makes your idea that the Nvidia install did it a bit more plausible.

Within the theory of "Nvidia driver install did it" there seem to be two unlikely possibilities. That installed a 32-bit kernel that is misnamed AMD64 or that installed all the files needed to convert a 32bit Linux to 64bit Linux. Neither is a very believable theory. If it was the second, I'd sure like to get a long at that package and find out what files are needed to successfully install a 64bit kernel on a 32bit Linux.

Last edited by johnsfine; 11-27-2011 at 08:46 AM.
 
1 members found this post helpful.
Old 11-27-2011, 08:33 AM   #7
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
It only says this,

Quote:
ron@smokey:/$ uname -a
Linux smokey 2.6.32-5-amd64 #1 SMP Thu Nov 3 05:54:18 UTC 2011 x86_64 GNU/Linux
 
Old 11-27-2011, 08:39 AM   #8
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
I just checked the install dvd, just to make sure I didn't make a mistake. It is an i386.


Quote:
[installer]
arch=i386
default_desktop=gnome
i386/linux=install.386/vmlinuz
i386/initrd=install.386/initrd.gz
i386/gtk/linux=install.386/vmlinuz
i386/gtk/initrd=install.386/gtk/initrd.gz

[grub]
g2ldr=g2ldr
g2ldr.mbr=g2ldr.mbr
Johnsfine, I just read the bottom part of your reply. That is the thing. I never did anything, I wouldn't trust myself. However I did install Nvidia and I think that may have somehow did all this. But everything works perfectly, no issues at all.


Edit: Hows this for interesting. I uninstalled truecrypt32 and tried to install truecrypt64,

Quote:
root@smokey:/home/ron/Downloads# sh truecrypt-7.1-setup-x64
Warning: Tried to connect to session manager, None of the authentication protocols specified are supported
Ok. I am getting that same warning when I install truecrypt32. But the difference is truecrypt64 wouldn't work, truecrypt32 works fine.

Last edited by Amdx2_x64; 11-27-2011 at 08:55 AM.
 
Old 11-27-2011, 08:55 AM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
I don't know why it says x86_64 only once. But once is enough. That isn't part of the name. I'm pretty sure that indicates a 64bit kernel.

I don't know very much about the Ubuntu installer. But a Linux installer normally boots a copy of Linux from the CD and runs under that while installing a copy of Linux on the hard drive. The info you posted indicates the copy of Linux booted during installation is 32 bit. But that doesn't necessarily imply the copy it installed onto your hard drive was 32 bit.
 
Old 11-27-2011, 08:56 AM   #10
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by johnsfine View Post
I don't know why it says x86_64 only once. But once is enough. That isn't part of the name. I'm pretty sure that indicates a 64bit kernel.

I don't know very much about the Ubuntu installer. But a Linux installer normally boots a copy of Linux from the CD and runs under that while installing a copy of Linux on the hard drive. The info you posted indicates the copy of Linux booted during installation is 32 bit. But that doesn't necessarily imply the copy it installed onto your hard drive was 32 bit.
Wouldn't 64bit programs run on it then? This is the strangest problem I ever had with Linux.


Edit: Actually, so far, this isn't even really a problem since everything is running ok. I am just really curious as to why.

Last edited by Amdx2_x64; 11-27-2011 at 09:00 AM.
 
Old 11-27-2011, 09:03 AM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Amdx2_x64 View Post
Wouldn't 64bit programs run on it then? This is the strangest problem I ever had with Linux.
A Debian based system would need /lib and probably other directories populated with essential 64 bit files before 64bit programs would run. Those files conflict with 32 bit files already there, so you would need to have a /lib32 directory to hold 32 bit files whose names collide with 64 bit, and you would need the loader to be configured to look there (and all that is only the beginning).

But did you test? Do you know that 64bit programs don't run?

I just tried a test on a few systems that should get some insight into strange 32bit / 64bit mixes. Look at the last few lines of the output of
cat /proc/self/maps

If you have a 64 bit copy of cat, the last line should have some very long addresses, such as
Code:
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
With a 32 bit cat under a 64 bit kernel, everywhere I've tried the last few lines look something like:
Code:
09c3b000-09c5c000 rw-p 09c3b000 00:00 0                                  [heap]
f7f37000-f7f38000 rw-p f7f37000 00:00 0
f7f55000-f7f56000 rw-p f7f55000 00:00 0
ffd40000-ffd55000 rw-p 7ffffffea000 00:00 0                              [stack]
ffffe000-fffff000 r-xp ffffe000 00:00 0
The addresses are just 8 hex digits indicating a 32 bit copy of cat. But there is a rw (readwrite) section very near the end of the 4GB address space (which I marked in bold) indicating a 32 bit process under a 64 bit kernel.

Under a 32 bit kernel I get:
Code:
09ca9000-09cca000 rw-p 09ca9000 00:00 0
b7f8b000-b7f8d000 rw-p b7f8b000 00:00 0
bfe9e000-c0000000 rw-p bfe9e000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0
Note the end of the last rw segment c0000000 is much lower than it was for 32 bit cat in 64bit Linux.

Other differences are because these were run on three very different versions of Linux. But the end address of the last rw segment should be a strong indicator of the three possible combinations of sizes for cat itself and for the Linux kernel.

Last edited by johnsfine; 11-27-2011 at 09:23 AM.
 
1 members found this post helpful.
Old 11-27-2011, 09:07 AM   #12
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
lol, now I am seeing i686. And yes, I tried to install truecrypt64 and it acted like it installed but there was nothing there. I installed truecrypt32 and it worked fine. The only thing I can think of is that Nvidia did it. If so this is the very first time in 10+years that I have seen Nvidia do this, or anything do this for that matter.

Quote:
root@smokey:/boot# cat /proc/self/maps
08048000-08052000 r-xp 00000000 fe:01 2621506 /bin/cat
08052000-08053000 rw-p 0000a000 fe:01 2621506 /bin/cat
0849a000-084bb000 rw-p 00000000 00:00 0 [heap]
f746a000-f75df000 r--p 00000000 fe:01 7988768 /usr/lib/locale/locale-archive
f75df000-f75e0000 rw-p 00000000 00:00 0
f75e0000-f7720000 r-xp 00000000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
f7720000-f7722000 r--p 0013f000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
f7722000-f7723000 rw-p 00141000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
f7723000-f7726000 rw-p 00000000 00:00 0
f773d000-f773f000 rw-p 00000000 00:00 0
f773f000-f7740000 r-xp 00000000 00:00 0 [vdso]
f7740000-f775b000 r-xp 00000000 fe:01 4636697 /lib/ld-2.11.2.so
f775b000-f775c000 r--p 0001a000 fe:01 4636697 /lib/ld-2.11.2.so
f775c000-f775d000 rw-p 0001b000 fe:01 4636697 /lib/ld-2.11.2.so
ffc22000-ffc37000 rw-p 00000000 00:00 0 [stack]
Quote:
root@smokey:/boot# aptitude show nvidia-kernel-2.6.32-5-amd64
Package: nvidia-kernel-2.6.32-5-amd64
New: yes
State: installed
Automatically installed: no
Version: 195.36.31-6+2.6.32-39
Priority: optional
Section: non-free/kernel
Maintainer: Debian NVIDIA Maintainers <pkg-nvidia-devel@lists.alioth.debian.org>
Uncompressed Size: 13.4 M
Depends: nvidia-kernel-common (>= 20100522)
Recommends: linux-image-2.6.32-5-amd64
Provides: nvidia-kernel-195.36.31
Description: NVIDIA binary kernel module for Linux 2.6.32-5-amd64
This package provides the non-free NVIDIA binary kernel module built for the Debian Linux kernel package. This kernel module is required by the nvidia-glx X video driver, the non-free binary video
driver for NVIDIA graphics chipsets. This is the main NVIDIA driver release, which supports the latest chipsets; for older chipsets, see the NVIDIA legacy packages.

This package is built for linux-image-2.6.32-5-amd64.
Homepage: http://www.nvidia.com

Last edited by Amdx2_x64; 11-27-2011 at 09:13 AM.
 
Old 11-27-2011, 09:16 AM   #13
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Amdx2_x64 View Post
lol, now I am seeing i686.
Where? In the output of uname -a which you quoted earlier?

Quote:
ffc22000-ffc37000 rw-p 00000000 00:00 0 [stack]
I think that indicates a 32bit copy of cat running under a 64 bit Linux kernel.

You're making a very convincing case that you have done by accident something many people have asked how to do on purpose and been told "you can't". You seem to have installed a 64bit kernel package into a 32bit Linux and have everything still work.

Last edited by johnsfine; 11-27-2011 at 09:20 AM.
 
Old 11-27-2011, 09:17 AM   #14
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by johnsfine View Post
Where? In the output of uname -a which you quoted earlier?
No with the command you told me to run above,

Quote:
f75e0000-f7720000 r-xp 00000000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
f7720000-f7722000 r--p 0013f000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
f7722000-f7723000 rw-p 00141000 fe:01 4654445 /lib/i686/cmov/libc-2.11.2.so
 
Old 11-27-2011, 09:19 AM   #15
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
The only thing that makes sense is that nvidia, when I installed it, installed a 64bit kernel. I am just amazed that everything works well and I just noticed this now. I installed this a few of weeks ago (approx.) and that same day I set up Nvidia.

So basically I have a 64bit kernel that was dropped into a 32bit install but it all works beautifully. Got to love Debian, lol.


Edit: Unless someone has a better explanation other then Nvidia. If so, please share. I don't hate mysteries I just like to solve them, correctly solve them.

Edit II: I just went through re-reading the thread. I got back to the part that you wrote about Nvidia. I had to look around to find what I did. This is how I installed Nvidia,

Quote:
# apt-get install module-assistant nvidia-kernel-common
Run the following command:
# m-a auto-install nvidia-kernel${VERSION}-source

Last edited by Amdx2_x64; 11-27-2011 at 09:43 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] install 64bit (using 32bit) Debian squeeze. kaz2100 Debian 1 11-16-2009 07:09 PM
32bit programs on amd64 Mig21 Slackware 8 08-16-2009 04:55 PM
Gentoo AMD64 32Bit Emulation gr0sshirn Linux - Hardware 2 08-07-2006 11:35 AM
linux distro 32bit edition on Amd64 kpachopoulos Linux - General 2 12-30-2005 06:39 PM
how to compile 32bit on amd64 anarhistu Linux - Newbie 1 01-30-2005 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration