Install 64-bit kernel in 32-bit Ubuntu

16,709

The error indicates that Ubuntu does not provide a package named "linux-image-amd64".

I surmise this is due to the fact that the guide from where you picked the shell commands has been written for a Debian installation. Indeed, if you search on debian.org for this package, you'll get a positive result. This is not the case if you enter this package name on http://packages.ubuntu.com/

The last command should be

sudo apt-get install linux-image-generic:amd64

or (if you really care about latency)

sudo apt-get install linux-image-lowlatency:amd64

Please note that the 32-bit kernel will be removed. Also, some 64-bit userspace libraries will be installed. To see what apt-get will do to your system without actually touching your system, run apt-get with these options

sudo apt-get -Vs install linux-image-generic:amd64

If you want to retain your 32-bit kernel as a fallback, install a different kernel image, e.g. for your 14.04 (codename: trusty) try:

sudo apt-get install linux-generic-lts-trusty:amd64

sudo apt-get install linux-generic-lts-utopic:amd64
Share:
16,709

Related videos on Youtube

Ben
Author by

Ben

Updated on September 18, 2022

Comments

  • Ben
    Ben almost 2 years

    I want to use an application that is only available in 64-bit, but my Ubuntu installation is 32-bit. The application is proprietary, so I can't even recompile it for 32-bit.

    I've read that I should be able to run a 64-bit application in 32-bit Ubuntu, if my kernel is 64-bit. From what I've read, this should work fairly smoothing with "MultiArch" support, which I should have in my version (14.04). But I can't figure out how to install the 64-bit kernel.

    My processor seems to support 64-bit, because "lm" appears in the output of grep flags /proc/cpuinfo

    I've seen a few questions already about upgrading the entire system to 64-bit, but those all tend to boil down to "just do a fresh install". I want to avoid doing a fresh install, if I can: I've got a lot of configuration I don't want to find and repeat, and I've read that on my old hardware with my relatively small amount of RAM, a full 64-bit system will probably use enough extra memory that it will get bogged down.

    I've noticed that old kernel versions stick around until I remove them, so if I can install a 64-bit kernel, I assume I can boot into the 32-bit kernel again if things go wrong.

    I found a guide to upgrading a Debian system that starts with installing the 64-bit kernel[1], but the instructions therein don't work for me:

    $ sudo dpkg --add-architecture amd64
    $ sudo apt-get update
    $ sudo apt-get install linux-image-amd64:amd64
    

    The first two commands seem to complete OK, but the install command gives:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package linux-image-amd64
    

    Am I doing something wrong? Missing a step? Should I just do a full install after all?


    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.1 LTS
    Release:        14.04
    Codename:       trusty
    

    [1] http://www.ewan.cc/?q=node/90

    • xangua
      xangua over 9 years
      Just install Ubuntu 64bit, avoid troubles.
    • Ben
      Ben over 9 years
      Why would booting with a different kernel cause an automatic package re-install? I thought I would be able to run a 32-bit system on top of the 64-bit kernel, so there shouldn't be anything to reinstall. I know it's not the usual case but I haven't seen any specific reasons it wouldn't work. I'll re-install all of Ubuntu if I must, but that just sounds like a painful and time consuming process to get everything back to how it was before.
  • Ben
    Ben over 9 years
    Yikes, thanks for that warning! Does that mean my comment, "I assume I can boot into the 32-bit kernel again if things go wrong" is not correct? I should probably download a 64-bit Live CD image to make sure it functions first, I suppose.
  • proski
    proski over 9 years
    I used 32-bit Ubuntu 14.04 and 14.10 with a self-compiled 64-bit kernel without any problems. The userspace remains fully compatible with 32-bit kernels. Nothing is uninstalled except the 32-bit kernel. thermald is replaced with a 64-bit variant, but it's an optional package that appeared in 14.04. I would not worry too much about it. You should be able to install a 32-bit kernel in parallel with the 64-bit kernel. Perhaps some dpkg cajoling would be needed. Or just self-compile it.
  • Ben
    Ben over 9 years
    Down-voter: do you mind commenting? I'd like to know of any problems with the answer before I try it, since I'm sure something like this could break my system for days if done incorrectly.
  • Ben
    Ben almost 9 years
    Thanks a million for the edits, Daniel! I felt a whole lot safer with the ability to provide a fallback, and with the command to preview the changes. The one that worked was sudo apt-get install linux-image-generic-lts-utopic:amd64; previewing the other options showed the 32-bit image would have been removed. Now I'm happily running a 64-bit kernel, with no need to mess with reconfiguring my system, and have successfully installed the application I wanted. Total success!
  • Ben
    Ben almost 9 years
    A follow-up: the system is still working fine except for not having 3D acceleration after Ubuntu pushed a bad update to the proprietary driver. I was unable to install the 64-bit driver direct from ATI because of not having the 64-bit version of some system tools (which also would not install), and the 32-bit drivers prevent booting, so I assume that's a consequence of this nonstandard setup. So now I wait for a better driver from the Ubuntu repositories.
  • Tino
    Tino over 7 years
    @Ben: Perhaps you can install the 64 bit counterpart of your OS in a chroot, see grml-debootstrap, such that the AMD installer can find everything. (I never tested this from an 32 bitOS, though.) Alternatively Ubuntu runs fine from USB as well, so you can install it with 64 bit onto some USB drive, 16 GB is enough (and cheap). Sadly Ubuntu, unlike Debian, does not allow us to have the very same kernel installed in 32 and 64 bit at once, such that there is an easy switch back and forth.
  • Ben
    Ben over 7 years
    Well if I'm ever in that situation again I may look into that. In the past few months however I upgraded to 16.04 so everything is 64-bit at this point and I don't need to juggle the differing architectures anymore. :-)