I believe Markus Benning has updated the HOWTO to reflect my previous comment. Or whoever has done it, thank you. But I think some people have still difficulty in following the steps; thus I have updated my local copy of chroot install "only". I have attached my local HOWTO for reference. I used it repeatedly to install to different disks, and partitions many times. I hope people allow me for some errors. The following is my commnet on the chroot install section of the current published HOWTO. 1. Don't you think it's nice to everybody if we make the step explicit? (Orig.)Make sure you are running a 64bit kernel. (Prop.)Make sure you are running a 64bit kernel. uname -m 2. Don't you think it's good practice not to use confusing name for debian directory, and mount point? (Orig.) debian directory: /pure64 mount point: /pure64 (Prop.) debian directory: /debian-pure64 mount point: /mnt/hard 3. I think the following is simply wrong. (Orig.)cp /etc/hostname /etc/resolv.conf /etc/network/interfaces /mnt/etc (Prop.)cp /etc/hostname /etc/resolv.conf /mnt/etc cp /etc/network/interfaces /mnt/etc/network/ 4. Unless you use only compiled in modules, you need to updated /etc/modules file to refelect your module settings; otherwise some of your needed modules prevent you from ordinary functioning. No hardware dection is performed; therefore we need to do this editting. 5. I have omitted some steps before entering chroot environment, and after exiting the environment. Please include them. I should do editing by myself, but I am lazy, and I do not know howto. Thank you for you people's effort. Toshikazu Aiyama __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/Title: The Debian GNU/Linux AMD64 HOW-TO
Copyright © 2003 Kevin Rosenberg
Copyright © 2003 Nate Iverson
Copyright © 2003 Goswin von Brederlow
Copyright © 2004, 2005 Frederik Schueler
Copyright © 2004 Hugo Mills
Copyright © 2004 Markus Benning
This manual is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
A copy of the GNU General Public License is available as /usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the World Wide Web at the GNU web site. You can also obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Table of Contents
Abstract
The purpose of this document is to provide a convenient resource for developers of the AMD64 port of Debian GNU/Linux. Eventually, it may serve as a reference for end users with AMD64 systems. The AMD64 port was originally developed with AMD Opteron processors, but people are now using Athlon64, Athlon64 FX and Intel EM64T "Nocona" processors as well.
This version of the document has been nearly completely rewritten to be more comprehensive and to match once more with the current development direction of the debian-AMD64 port.
Last Modified: $Id: debian-amd64-howto.xml,v 1.44 2005/02/14 22:12:28 fschueler-guest Exp $
The debian "pure64" port for AMD64 and EM64T based systems is, as the name states, thoroughly 64bit.
This port is actually considered beta.
More than 97% of all source packages in unstable have been ported. Pure64 is installable using a pre-release of the Debian-Installer.
This is confusing, because the name has changed over time. The initial name for the architecture was x86-64. However, around the time of the Opteron launch, AMD stated the name x86-64 ceased to exist and was replaced by the name AMD64. AMD acknowledge that the name x86_64 still exists and is what is reported by the 64-bit Linux kernel for this platform. In a message from AMD's Marc Miller [1], he recommends using the name AMD64 in places where i386 or i686 might be used and use x86_64 in places where x86 may be used.
The debian-amd64 project on Alioth is used to distribute all needed files and documentation concerning the port. The biarch and pure64 archives reside there, the latter till it becomes an official port and moves to the official archive on ftp.debian.org. At present, you can find nearly all the files concerning the project here: http://alioth.debian.org/projects/debian-amd64/.
there are two ways of getting help beyond this HOWTO:
The IRC channel #debian-amd64 on irc.debian.org
You can find #debian-amd64 IRC logs on Kevin Rosenberg's http://irc-logs.b9.com/ server.
Current daily-builds of the Debian-Installer for amd64 can be found at http://debian-amd64.alioth.debian.org/debian-installer/.
The current netinst iso for amd64 can be found at http://debian-amd64.alioth.debian.org/install-images/
The Debian-Installer documentation for all architectures is to be found at http://d-i.alioth.debian.org/manual/; if you have trouble writing the iso images to cd-rw, see this url: http://www.debian.org/CD/faq/
All general D-I bugs are tracked in the Bug Tracking System. There is a TODO for the D-I too - be sure to check these documents before reporting a known bug. The amd64 D-I might not be an official one, but it is based on the very same code, so most bugs you find are likely to be the same ones you would encounter using the linux-2.6 based installer for i386.
Keep in mind that the amd64 port is still not in the official archives, but the installer is already configured to work as if it was. Thus, you have to point it to alioth or a mirror when it comes to downloading packages: Choose http as protocol. Then scroll up to the first option, which will let you enter the information. Enter the host as "debian.inode.at" or "debian-amd64.alioth.debian.org" or "bach.hpc2n.umu.se" or "bytekeeper.as28747.net" (see the mirror list for more). Enter the directory as "/pure64" on the next screen. Enter the proxy, if any, on the next screen. Choose unstable as the distribution. There are no stable or testing distributions available so far.
There are two more distributions of the amd64 port:
Debian From Scratch (DFS) i386 images provide amd64 kernels on the bootable ISO. Using these kernels and the tools contained on the CD, a DFS CD can install or repair a pure64 installation. DFS tools are available from http://people.debian.org/~jgoerzen/dfs/.
Before you start bootstrapping the pure64 port into a chroot, make sure you are already running a 64bit kernel, or boot from DI/DFS in order to accomplish the following steps.
You can download a pre-compiled, UP monolithic 2.6.6 kernel at http://people.debian.org/~jgoerzen/vmlinuz-2.6.6-amd64 (thanks to John Goerzen for this contribution). It can also be found on the DFS ISO.
Alternatively, you can go the hard way and cross-compile your own 64bit kernel. Please see the relevant section at the bottom of this document on how to accomplish this.
The folloing procedure assumes that you want to create a chroot environment at a separate partition /dev/sda5 mounted as /mnt/hard, /dev/hdd1 as swap area, and that /pure64 sid packages are populated in it.
$ uname -m
Create a directory to install the pure64 chroot into. If you want the chroot partition to be bootable as well, format a spare partition or add a new hard disk for the root of your new pure64 install. Then mount it somewhere, like /mnt/hard. Also create a swap space.
# mkfs.ext3 /dev/sda5 # mkdir /mnt/hard # mount /dev/sda5 /mnt/hard # mkswap /dev/hdd1
you can use cdebootstrap(preferred approach) or debootstrap:
# cdebootstrap --arch amd64 sid /mnt/hard/ \ http://debian-amd64.alioth.debian.org/debian-pure64/
or
# debootstrap --arch amd64 sid /mnt/hard/ \ http://debian-amd64.alioth.debian.org/debian-pure64/
You might want to use a mirror other than alioth; see the sources.list section below.
# cp /etc/hostname /etc/resolv.conf /etc/fstab /mnt/hard/etc/ # cp /etc/network/interfaces /mnt/hard/etc/network/and edit the fstab. Also edit /etc/modules to include a NIC module or other modules of the new kernel. The editing of modules files is required because no hardware detection has been performed.
# mount -t proc proc /mnt/hard/proc # chroot /mnt/hard /bin/bash # mount -aand then
# base-configfrom within it.
# apt-get install kernel-image-2.6-amd64-k8 liloNext, exit the chroot environment, and reboot:
# exit # umount /mnt/hard/proc # umount /mnt/hard # shutdown -r nowto enjoy booting from a completely new partition.
The primary pure64 archive is on alioth, and there are some mirrors available. Alioth is rather slow from Europe, so you may want to use one of the mirrors if you live there.
This is a complete list of publically accessible mirrors for your sources.list - you might want to check which one is fastest for you, and use that.
pure64 mirrors:
deb http://debian-amd64.alioth.debian.org/pure64 sid main contrib non-free deb-src http://debian-amd64.alioth.debian.org/pure64 sid main contrib non-free deb http://bach.hpc2n.umu.se/pure64 sid main contrib non-free deb-src http://bach.hpc2n.umu.se/pure64 sid main contrib non-free deb http://bytekeeper.as28747.net/amd64/alioth/pure64 sid main contrib non-free deb-src http://bytekeeper.as28747.net/amd64/alioth/pure64 sid main contrib non-free deb http://debian.inode.at/debian-amd64/pure64 sid main contrib non-free deb-src http://debian.inode.at/debian-amd64/pure64 sid main contrib non-free deb http://ftp.de.debian.org/debian-amd64/pure64 sid main contrib non-free deb-src http://ftp.de.debian.org/debian-amd64/pure64 sid main contrib non-free deb http://ftp.kaist.ac.kr/pub/debian-amd64/pure64 sid main contrib non-free deb-src http://ftp.kaist.ac.kr/pub/debian-amd64/pure64 sid main contrib non-free deb http://mirror.phy.bnl.gov/debian-amd64 sid main contrib non-free deb-src http://mirror.phy.bnl.gov/debian-amd64 sid main contrib non-free deb ftp://ftp.caliu.info/pub/distribucions/debian-amd64/pure64 sid main contrib non-free deb-src ftp://ftp.caliu.info/pub/distribucions/debian-amd64/pure64 sid main contrib non-free deb http://mirror.switch.ch/ftp/mirror/debian-amd64/pure64 sid main contrib non-free deb-src http://mirror.switch.ch/ftp/mirror/debian-amd64/pure64 sid main contrib non-free
gcc-3.4 mirrors:
deb http://debian-amd64.alioth.debian.org/gcc-3.4 sid main contrib non-free deb-src http://debian-amd64.alioth.debian.org/gcc-3.4 sid main contrib non-free deb http://bach.hpc2n.umu.se/gcc-3.4 sid main contrib non-free deb-src http://bach.hpc2n.umu.se/gcc-3.4 sid main contrib non-free deb http://bytekeeper.as28747.net/amd64/alioth/gcc-3.4 sid main contrib non-free deb-src http://bytekeeper.as28747.net/amd64/alioth/gcc-3.4 sid main contrib non-free deb http://debian.inode.at/debian-amd64/gcc-3.4 sid main contrib non-free deb-src http://debian.inode.at/debian-amd64/gcc-3.4 sid main contrib non-free deb ftp://ftp.caliu.info/pub/distribucions/debian-amd64/gcc-3.4 sid main contrib non-free deb-src ftp://ftp.caliu.info/pub/distribucions/debian-amd64/gcc-3.4 sid main contrib non-free
Non-US binary packages are not available, because the main development server (alioth) is located in the US. Building those packages from source works, though.
Until console-data is fixed, you need to select the keymap from the full list, not from the arch list as is usual. To get the debconf question again, run:
dpkg-reconfigure -plow console-data
and select the appropriate keymap from the list. Or simply install the boot-time keymap by hand:
install-keymap de-latin1-nodeadkeys
or whatever keymap you are used to.
The current amd64 port of debian is a pure 64bit port. This means you can't run binary only programs which are compiled for IA32 or applications which haven't been ported to AMD64 yet (e.g. OpenOffice.org). This is because you can't mix 32bit applications and 64bit libraries. You would also need the 32bit versions of the libraries to run a 32bit application.
This chapter explains how you can run 32bit applications in your 64bit system using the IA32 libs from a IA32 chroot and running IA32 applications inside this chroot, in a way which is mostly transparent to the user.
There is already a minimal set of IA32 libraries packaged for use in a 64bit Debian system. Simply do an 'apt-get install ia32-libs' and you will be able to run most 32bit binaries within your system.
First you need to install a IA32 base system into a chroot. You can do this with the debootstrap command:
debootstrap --arch i386 sid /var/chroot/sid-ia32 ftp://ftp.debian.org/debian
To install a few more libraries you can change into this chroot and install/update packages with apt-get:
chroot /var/chroot/sid-ia32 apt-get install libx11-6
To use the 32bit libraries in your 64bit system you have to add the library path of your chroot into your /etc/ld.so.conf:
/usr/X11R6/lib # chroot i386 system libs /var/chroot/sid-ia32/lib /var/chroot/sid-ia32/usr/lib /var/chroot/sid-ia32/usr/X11R6/lib /var/chroot/sid-ia32/usr/local/lib
You also need a link to your 32bit linker in the /lib path. Change in to directory /lib and create a link to the 32bit linker library of your chroot: (The name of the 64bit linker is ld-linux-x86-64.so.2)
cd /lib ln -s /var/chroot/sid-ia32/lib/ld-2.3.2.so ld-linux.so.2
Now run ldconfig to update your linker's cache.
Now you should be able to run ia32 binaries with the libs from your chroot within your 64bit system. Having the libs in a separate chroot makes it easy for you to update or install the 32bit libraries with apt-get.
To run an application inside the chroot you will need some parts of your 64bit system tree inside the chroot. This can be achieved with a bind mount. In this example we will bind /tmp to the chroot for the X11 sockets which are in /tmp, and bind /home to access the home directories from within the chroot. You may also want to mount the /proc and /sys filesystems within the chroot. Edit your fstab and add the required paths:
# ia32 chroot /home /var/chroot/sid-ia32/home none bind 0 0 /tmp /var/chroot/sid-ia32/tmp none bind 0 0 proc /var/chroot/sid-ia32/proc proc defaults 0 0
Then mount them:
mount /var/chroot/sid-ia32/home mount /var/chroot/sid-ia32/tmp mount /var/chroot/sid-ia32/proc
You will also need to set up the relevant users in the chroot. Copy your /etc/passwd, /etc/shadow and /etc/group files to the chroot, or add the users manually to the passwd/shadow of your chroot. It is also possible to hard link the files when they are on the same partition. Just make sure the user exists also in the chroot.
At this point you should be able to run applications within the chroot. Change to your chroot (you must be root to do this):
chroot /var/chroot/sid-ia32
Change to the user under which you want to run the program:
su - zumsel
Set your $DISPLAY:
export DISPLAY=:0
And run something:
openoffice
Of course you must have installed the package inside the chroot for this to work.
There is also an easier way to run applications inside the chroot with the dchroot. Leave the chroot and install the dchroot package. dchroot allows users to change into chroots and run commands inside them. You must add your chroot to /etc/dchroot.conf to allow users to change into it:
# ia32 chroot ia32 /var/chroot/sid-ia32
Now you should be able to run commands inside the chroot as normal user:
dchroot -c ia32 -d openoffice
This will run openoffice in the ia32 chroot you specified in /etc/dchroot.conf. The option -d preserves the user's environment so you don't have to set DISPLAY or such things manually.
You can make things slightly simpler even than this. Write a small shell script like the following, and place it in your PATH: eg. /usr/local/bin/do_dchroot
#!/bin/sh exec dchroot -c ia32 -d "$(basename $0)" "$@"
Make it executable:
chmod 755 /usr/local/bin/do_dchroot
Now create a symlink to this script from each command you want to run inside the chroot to this shell script:
cd /usr/local/bin ln -s do_dchroot openoffice ln -s do_dchroot oowriter ln -s do_dchroot oocalc
Now you can execute openoffice by simply typing openoffice or oowriter.
You can also pass filenames on the command line to openoffice since the paths are the same inside the chroot.
While architectures like sparc64 or powerpc64, which provide lib for default 32bit libraries and lib64 for extra 64bit libraries, default to executing 32bit applications, amd64 defaults to 64bit binaries because of the performance benefits it offers in 64bit mode. Thus, not wanting to rewrite virtually every binary-arch package's creation rules to install libs in lib64 not lib, and wanting to find a solution for all multiarch capable platforms debian supports, various people are working on so-called multiarch support.
All relevant information concerning multiarch is assembled on http://people.debian.org/~taggart/multiarch/.
No. IA64 is Intel's designation for their Itanium architecture. Intel's name for their AMD64-compatible architecture is EM64T (Extended Memory 64 Technology). IA64 systems are a completely different architecture.
After the Technical Committee arbitrated the dispute on the port's name between some developers, the port itself is still the subject of some discussion, which can be found in the archives of debian-devel. Please help to improve the port, rather than taking part in flamewars. The thread starts here: http://lists.debian.org/debian-devel/2004/07/threads.html.
The first planned official Debian release of 64bit userland for AMD64 will be Etch (Sarge+1).
An unofficial Sarge release is being worked at, and is planned to be released as soon as the official Sarge is out.
Until AMD64 becomes an officially supported architecture, things are a bit different here:
There will not be any official stable release based on sarge, since Debian security support is one of the most important qualities of debian/stable, and is not given for unofficial ports.
An official Debian/stable for amd64 will be available with the next major release after Sarge.
Considering the ports are classified "beta" by the porters and so far only the unstable distribution is available, pure64 and gcc-3.4 are not recommended for "mission critical production systems".
The unofficial Sarge distribution is still work in progress.
There are undiscovered/unreported 64bit related problems in approximately 200 packages, which result either in the package not building at all or simply segfaulting on startup. The latter problem is exhibited by a dozen of binaries; the vast majority of packages with known 64bit problems do not build at all.
In short:
For servers, it is roughly as stable as i386 sid is.
For workstations, you still need a 32bit chroot for Openoffice.org, MPlayer with win32 codecs or mozilla with flash plugin, to name the most common. But nonetheless a growing number of people use these ports on their desktop system, and are really happy with it.
No. You need to reinstall on a newly formatted partition or disk, by either running cdebootstrap / debootstrap from your running installation or using the Debian-Installer.
Make sure the following points apply:
The Debian Kernel Team maintains a 64bit kernel package for both i386 and amd64, featuring different kernel flavours for AMD64 and EM64T systems as well as UP and SMP flavours.
Note: The debian kernels are 64bit, need an initrd, and have IA32 emulation enabled by default.
If you want to compile the kernel yourself, the latest 2.6 kernel is recommended. You need at least Linux 2.6.5 to build a kernel with IA32 emulation using the toolchain from pure64. Linux 2.4 series kernels are considered deprecated.
The NVidia drivers for amd64 are known to work with linux 2.6.5 and newer kernels. The official debian nvidia-graphics-driver packages support amd64, everything works the same way as you might be used to with i386. It is not reccomended to install using the NVidia driver installer, because it is based on a different directory layout than the debian amd64 port.
Installing the NVidia drivers is documented in /usr/share/doc/nvidia-kernel-source/README.Debian
Since the documentation is i386 centristic, these are the short instructions for amd64:
CC=gcc-3.4 make-kpkg --append-to-version -10-amd64-k8 modules_imageagain, replace -10-amd64-k8 with the flavour of your kernel.
Old ati radeon cards up to the 9200 model are mostly supported by the free GLX drivers in XFree86.
For newer cards, ATI has released its fglrx drivers for amd64. See the mailing list archive starting at Jan. 2005 for informations. There are no official debian packages available.
Most wavelan cards with native linux support do work in a 64bit kernel too. If your card is not supported by Linux directly, you might need to setup ndiswrapper. See the corresponding Documentation of that package.
No. If you really need to access such webpages, install mozilla and flashplugin-nonfree in your 386 chroot and use the 32bit browser to access the sites.
You need the any-any patch found here: http://ftp.cvut.cz/vmware/
You are welcome to set up a public mirror, these are the rsync URIs:
rsync://bach.hpc2n.umu.se/pub/pure64/
rsync://debian.inode.at/debian-amd64/pure64/
rsync://debian-amd64.alioth.debian.org/debian-amd64/