Debian AMD64
6 October 2006

Status

The pure 64-bit Debian port is ready and installed (though not official).
Monitors could be switched from TwinView to Xinerama -- cf. nVidia

Software and guides
Commands
  • redefine OpenOffice printers (from steen@sigillo, using run command)
    • ssh clit sudo dchroot -c ia32 -d /usr/lib/openoffice/program/spadmin
  • LOGNAME=root chroot /mnt/debroot (to enter debian)
  • dpkg -s libxrender1 (just show)
  • just reconfigure exim4-config  (mail transport agent)
  • to increase the size of the kernel ring buffer, configure the kernel in the "kernel hacking" section, "kernel log buffer size" option.
Running applications
  • redefine OpenOffice printers (from steen@sigillo, using run command)
    • ssh clit sudo dchroot -c ia32 -d /usr/lib/openoffice/program/spadmin
  • oowriter: as user steen, ssh clit oowriter
    • /mnt/share and /mnt/ssa must both be mounted (/home is on /share)
  • anvil: as user root, ./chroot and cd, then ./anvil
    • it may be possible to access for non-root users; see /usr/local/bin/anvil
Pinning
Prefer sarge:

In /etc/apt/preferences
Package: *
Pin: release o=Debian-amd64,a=testing,v=3.1
Pin-Priority: 1001

Prefer sid:

In /etc/apt/preferences
Package: *
Pin: release o=Debian-amd64,a=unstable,v=3.2
Pin-Priority: 1001

Not sure what this one was for:

In /etc/apt/preferences
Package: *
Pin: release l=jgoerzen
Pin-Priority: 1500
Installation history

7 November 2006: 3DM2

Installed 3ware-3dm2-binary from unofficial and ran http://localhost:888 -- works! Shows the 3Ware RAID. Configured it to send e-mail when there's an event of some kind. You can configure it to be accessible remotely.

Also installed 3ware-cli-binary, the command-line binary (not tested).

For instructions, see 3ware section under Harddrives.

3 October 2006: DVD

Installed the SONY DW-Q58A 8X Slim DVD+/-RW Drive:
hdc: SONY DVD RW DW-Q58A, ATAPI CD/DVD-ROM drive
hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
Looks good -- why only 33? I may have installed the sound cable incorrectly.

21 March 2006: saa7134

I discovered to my shock that the LifeView FlyVideo-3000FM cards fit in the PCI-X slot! The picture comes through fine and closed captioning works. Modules  unload and reload fine:

modprobe saa7134 video_nr=2 vbi_nr=2 dsp_nr=2 mixer_nr=2 radio_nr=2 card=2 \
    tuner=43 oss=1

saa7133[0]: registered device video2 [v4l2]
saa7133[0]: registered device vbi2
saa7133[0]: registered device radio2
saa7133[0]: registered device dsp2
saa7133[0]: registered device mixer2

aumix -d /dev/mixer2 -1 R
sox -w -r 32000 -t ossdsp /dev/dsp2 -t .wav test.wav (works!)

zvbi-ntsc-cc -d /dev/vbi2 -cp (works!)
Sound is not working -- this fails:
/etc/init.d/alsa unload

xdtv -c /dev/video2 -C /dev/vbi2 -v 0 -mixer_dev /dev/mixer2 -audio_dev /dev/audio2 -mixer_tvchan line1
This is how the sound reports -- note the second mixer, with recording correctly set to line1:
# dump-mixers
/dev/mixer = Audigy2 (SigmaTel STAC9750,51)
  vol        ( 0) :  mono          85
  bass       ( 1) :  stereo        70/70
  treble     ( 2) :  stereo        100/100
  synth      ( 3) :  stereo        100/100
  pcm        ( 4) :  stereo        39/39
  speaker    ( 5) :  mono          0
  line       ( 6) :  stereo        65/65
  mic        ( 7) :  stereo        0/0
  cd         ( 8) :  stereo        84/84
  pcm2       (10) :  stereo        71/71
  line1      (14) :  stereo        29/29
  dig1       (17) :  stereo        0/0
  phin       (20) :  mono          29
  phout      (21) :  mono          29
/dev/mixer2 = TV audio (saa7133[0])
  line1      (14) :  mono    rec*  50
  line2      (15) :  mono    rec   50
  video      (22) :  mono    rec   100
# amixer controls | grep Capture
# amixer -c 0 cset numid=19 100%,100% unmute cap
Not really worth fiddling with. I've determined I can capture audio, video, and text from the card in a PCI-X slot, and moved the card back to Chianti.

11 March 2006: sound in chroot

The npr-grabber.sh script stopped working because mplayer32 didn't find a sound card. I installed module-init-tools and alsa-base (and udev, but it didn't run when it detected a chroot environment), and it worked again. I also made some changes to /usr/local/bin/mplayer32 that may have made a difference -- put it in its own script and added some ARGS stuff from the amd64 howto.

4 March 2006: biarch

There's a new package in Debian, libc6-i386, which contains this line in the changelog:
Build a 32-bit libc on amd64, using the new multiarch directories.
But Kurt Roeckx says it's just biarch. I uninstalled:
ia32-libs ia32-libs-dev lib32gcc1 lib32stdc++6 lib32z1 lib32z1-dev nvidia-glx-ia32
Not sure why I had nvidia-glx-ia32.  The /emul/ia32 is in the fakeroot package -- this may be going away, but for now I'll leave it. I installed libc6-i386, which dragged along libc6.

This doesn't do much -- it's some minor fix and not true biarch. In particular, it changes nothing for OOo.

4 March 2006: analog tv working, with sound

To turn on the cx88 analog card, run the cx script; to turn it off, run cx-off.

Alsamixergui now need these components on and up for television and normal playback:

    * Master
    * PCM is not needed
    * Line (the first of the three Line components -- this is the volume control on the TV card)
    * Analog Mix (the first of two)
    * Audigy Analog Output Jack (unmute)

There are a couple of others I will need, but I don't know which they are on the new driver. They used to be these:

    * EMU10K1 PCM (both)
    * Front

IEC958 Optical Raw must be off (muted). For TV recording, you also need the second Analog Mix turned on.

Since Master regulates the volume, you can leave the others on max. The default settings are in the file /var/lib/alsa/asound.state, but you can store and restore different profiles like this:

    * alsactl store -f /var/lib/alsa/asound.state.cx88
    * alsactl restore -f /var/lib/alsa/asound.state.cx88

This works and is a good insurance against the default being messed up.

18 February 2006 -- mixer controls rediscovered, culprit ld10k1

First, I figured out why lspci was only giving numbers: the symlink from /usr/share/misc to /var/lib/pciutils/pci.ids was broken, a consequence of my moving the /usr directory to /share.

I learning I can do this:
lspci -vs 01:03.0
I'm still missing most of my mixer controls, including PCM -- possibly because the card is in a PCI-X slot.
# alsactl --version
alsactl version 1.0.10
In /etc/modutils/asla-base I added
options snd-emu10k1  extin="0x3fff" extout="0x7fff"
and ran update-modules.
# cat /proc/asound/cards
0 [Audigy2        ]: Audigy2 - Audigy 2 Value [SB0400]
   Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) at 0x9c00, irq 22
# cat /proc/asound/devices
  4: [0- 0]: hardware dependent
  9: [0- 1]: raw midi
  8: [0- 0]: raw midi
 19: [0- 3]: digital audio playback
 18: [0- 2]: digital audio playback
 26: [0- 2]: digital audio capture
 25: [0- 1]: digital audio capture
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
  0: [0- 0]: ctl
  1:       : sequencer
 33:       : timer
So the PCM device is here and I can set the volume:
amixer -c 0 cset numid=130 50% 50% 50%
numid=130,iface=PCM,name='EMU10K1 PCM Volume'
How to tell the mixers where it is? I discovered the configuration file is
/usr/share/alsa/cards/EMU10K1.conf
-- it seems to have the structure of ~/.asoundrc so the latter is likely not needed, unless you need to change this default configuration.

On the alsa-users list, Peter Zubaj suggested the problem might be ld10k1 -- the  emu10k1 effect loader, which I discovered I had running from sysv. I stopped it and used this to unload all alsa modules (for the first time and to my amazement):
/etc/init.d/alsa unload
Every single sound module was instantly unloaded (put into alsa-off). Wow. It takes years to learn elementary things.  When I reloaded the modules (put into alsa-on), the mixer controls were back and the problem solved. Peter wrote,
When ld10k1 loads it wil clear dsp and dsp mixer (because it doesn't know how
to extract it). You can use init_audigy script to load dsp again (this script
is for audigy 1, but should work for your card too).
Since I'm not using ld10k1 for anything, I leave this for information only.


Update 24 November 2005: sound card

There's a new set of programs for configuring the Audigy2 sound card -- ld10k1, qlo10k1, and  liblo10k1-0. The ld10k1 is a "emu10k1/2 patch loader daemon" for the card -- not sure what it does, but I think it might remap channels to mixer controls? Or it's used for remote audio transport? Can't tell from the man page.

According to the alsa-tools cvs, the ld10k1 tool was added to alsa tools (which I also installed) by Peter Zubaj, apparently to reproduce the functionality of kX under Windows:
The ld10k1 API provides a very thin layer between the DSP microcode and the ALSA mixer API, creating standard ALSA mixer objects on the fly for the control GPRs.  ld10k1 currently just loads the DSP patches.  The kX driver OTOH provides a pretty thin C++ wrapper around the DSP patches, which lets them have custom GUIs, load, unload, and generate microcode on the fly and control everything with midi.  It can query the kernel
part of the driver what hardware is available and load specific patches accordingly.
A screenshot shows the detailed routings the program appears to be able to manipulate -- quite fancy stuff. However, Peter has already stopped working on the code. Others may be picking it up -- see mailing list.

Later I found out this was a bad idea and uninstalled the package -- see above.

Update 21 November 2005: reboot working!

Reboot hasn't worked on this machine in ages, if ever, which means you cannot upgrade the kernel remotely.  In an attempt to make pcHDTV-3000 work, I installed udev, which failed to load most things. Simultaneously, a couple of other things were causing minor problems, and I reinstalled hotplug. You need to be very careful with Clitunno/Trevi, as the machine doesn't have a CD player or floppy drive and is a pain to recover if something goes wrong. It's also in some ways a sensitive machine -- the RAID could fail, or it could refuse to boot. It's best left alone. In any case, I recklessly deleted all the sysv entries (/etc/rc0 through 6) to clean up, and then had to reconfigure and reinstall the packages affected, and run ksysv. This did clean up sysv, and the system now reboots! It may have been something as simple as allowing reboot to switch to runlevel 6. The booting process is now clean again, which is a major relief; there were too many things threatening to go wrong. The 2.6.14 kernel, however, appears to be rock solid; the problem is sid. As for the pcHDTV card, you need help, and there's no hurry.

Recovery after a power outage has also been spotty; the cleaned-up sysv may help there too.

Update 28 October 2005: tv recording on kernel 2.6.14

The bttv card AVerMedia TVCapture 98 with an external patch cable to a SoundBlaster Audigy2 Value 24-bit has been recording fine with kernel 2.6.9-ac6 patched with the emu10k1 from Alsa 1.0.8 in December 2004.  After installing vanilla 2.6.14, I can play music and watch TV, but recording audio fails.  I get this curious behavior:
  • Record "Simpsons" under 2.6.9-ac6 (sound records fine)
  • Boot into 2.6.14
  • Play the recorded "Simpsons" while recording "Friends"
  • Both soundtracks can be heard clearly
  • The "Friends" recording gets the "Simpsons" soundtrack
How can I record audio from a bttv card using the emu10k1 driver?

lspci -nv:
  • 0000:03:04.0 is the bttv card
  • 0000:01:03.0 is the sound card
# dump-mixers
/dev/mixer0 = Audigy2 (SigmaTel STAC9750,51)
  vol        ( 0) :  mono          100
  bass       ( 1) :  stereo        50/50
  treble     ( 2) :  stereo        50/50
  synth      ( 3) :  stereo        90/90
  pcm        ( 4) :  stereo        87/87
  speaker    ( 5) :  mono          0
  line       ( 6) :  stereo        87/87
  mic        ( 7) :  stereo        0/0
  cd         ( 8) :  stereo        84/84
  pcm2       (10) :  stereo        0/0
  line1      (14) :  stereo        100/100
  dig1       (17) :  stereo        0/0
  phin       (20) :  mono          0
  phout      (21) :  mono          0

# amixer controls | grep Capture
numid=8,iface=MIXER,name='PCM Capture Volume'
numid=9,iface=MIXER,name='Synth Capture Volume'
numid=17,iface=MIXER,name='Line2 Capture Volume'
numid=11,iface=MIXER,name='Mic Capture Volume'
numid=21,iface=MIXER,name='Aux2 Capture Volume'
numid=15,iface=MIXER,name='IEC958 Optical Capture Volume'
numid=19,iface=MIXER,name='Analog Mix Capture Volume'
numid=13,iface=MIXER,name='Audigy CD Capture Volume'
numid=32,iface=PCM,name='Captured FX8010 Outputs',device=2

Check the settings of promising candidate 19, Analog Mix Capture Volume:

# amixer -c 0 cget numid=19
numid=19,iface=MIXER,name='Analog Mix Capture Volume'
  ; type=INTEGER,access=rw---,values=2,min=0,max=100,step=0
  : values=0,0

Turn it on:

# amixer -c 0 cset numid=19 80%,80% unmute cap
numid=19,iface=MIXER,name='Analog Mix Capture Volume'
  ; type=INTEGER,access=rw---,values=2,min=0,max=100,step=0
  : values=80,80

So the story in brief is that what used to be channel 18 is now channel 19 -- this works, but put the volume to 100%.

Update 6 October 2005: BIOS settings
6 October 2005

After the BIOS reset, the system appears to be in a normal state.  The boot log is unchanged except for one possibly important difference: the word "AUTO" inserted at the beginning of the boot string. This might be what it takes for reboot to work?

The nVidia driver is still working fine, though I'm not getting GLX.  Sound is working fine, so are the new KDE and televison applications.

Update 20 September 2005


After several power failures, the system failed to come back online. Tim said it got stuck in the boot process and pressed F2 to load a default CMOS, which worked (but may need attention later).

I did a full upgrade, including xorg and KDE 3.4.

Update 4 June 2005

I installed udev to allow hotplug of USB devices.

Update 1 March 2005

In Raid tests I discover that Linux software RAID, also known as MD (multiple devices) is way better (faster) than 3ware's own hardware RAID! Wow. The testers have nearly the same card, 8506-8 (I have 8506-12). So you should find out if you can run the new drives (when you get them) with software RAID. They are of course hooked up to the 3ware escalade card, but the card can presumably be instructed to treat each drive individually, and then software RAID ties them together.  See RAID (local).

Update 19 February 2005: TV capture and sound card

Just catching up on the updates. During the Xmas break 2004, I learned that you can get PCI-X sound cards, and bought a SoundBlaster Audigy2 Value 24-bit that fit in one of the PCI-X slots (see Sound).

That freed up the 32-bit PCI slot, which I then resumed using for the TV card. I wrote a two-part capture script, /ssa/TV/scripts/cron-jobs/channel and channel-timestamp, and programmed the jobs using cron. I also installed freeguide, a Java application, to view the schedules. With minor tweaks -- I needed to leave 15 seconds for the card to switch channels -- this system has operated flawlessly since 6 January, and provided me with teaching materials and my students with project material.  I'm using mencoder to capture, which is good but could likely be better -- I get a slow drift in synchronization, and the quality is not the greatest.

I just discovered the sync problem is solved in playback by adding the -sync 30 parameter.  I also added this to the kplayer configuration, under Advanced. On testing xine-engined kaffeine, however, I find the sync problem is gone there too -- maybe it was a player artifact?

Mencoder is still not using mmx for some reason, though it says "Compiled for x86 CPU with extensions: MMX SSE." As more and more people are starting to use amd64 and mplayer, xvid, transcode, mythtv, and other projects are gradually being ported and optimized.

Update 24 November 2004: BIOS Flash and VMware update

I flashed the BIOS with version 2.02 08.00.08, dated 10/14/03, ID 0ABCF007. I had to set up the boot sequence in the CMOS to use a floppy driver, plug in a floppy device -- it was very hard to find where to do that -- and make the disks in WinXP, but everything went well. I made several changes to the BIOS, mainly the following:
  • disabling onboard SATA RAID
  • disabling onboard Promise RAID
  • disabling SCSI (I don't thing I even have it)
  • enabling power management (you may want to revert this)
The major selling point of the BIOS update was that I wouldn't have to have a PS/2 keyboard attached. However, when I remove it, my USB keyboard doesn't get detected fast enough to enter the CMOS, and it may not get activated in time for the boot menu. So I leave the old keyboard plugged in -- then everything works fine on the USB keyboard too.

When I enabled ACPI in the kernel and then typed "reboot", the machine halted. So that's not right either...  Reboot still works fine in Windows, however, so it may be an ACPI problem rather than a BIOS problem.

I updated VMware to use the chroot version of lib32, so that's now working. 

The machine is now incredibly useful -- it runs a superfast Linux remotely that I use for most large applications; it runs all my storage needs; it runs VMware for remote WinXP within Linux; and it runs dual-screen Linux locally with anvil video analysis software; finally it runs a kickass WinXP gaming platform with 1140fps glxgears and great sound on dual monitors. All in one machine, generally extremely stable -- though I've had it freeze hard mysteriously twice. Short of that it's an incredible workhorse; you're really getting value for the extra expense of solid hardware.

It's also nice that it doesn't do everything -- for instance, cyberspace is serving tikiwiki and some of my web stuff (not much), and keeping all my software on /vc; while spello is now a samba server, Tord's backup, teeclub storage -- several things. Gubbio is doing MythTV -- god forbid doing that on clitunno. So clitunno tested that capture and live compression works; after the demo, I ripped out all that and put the fast gaming card with a sound card instead. The big new thing is the video card -- getting a powerful dual screen is an unexpected bonus.

Now it's worth noting that support for that card became official only a few days ago -- so there was no downside waiting. There are a few things that still haven't been ported to amd64, such as xvid, transcode, and mjpegtools, but the tv grabbing went extremely well, showing that bttv and ffmpeg have been fully ported.

Since you solved the problem -- and elegantly so -- the problem of turning the dual opteron server into a gaming platform, you don't need to buy another computer now.  What you still need to do is verify that your laptop's CD drive works, and also DHCP in the classrooms.  You may need to send it off to repairs. But at least you now have another dual-screen video analysis and gaming machine!

Update 23 November 2004: installed video and audio cards

While most PCI cards won't fit in a PCI-X slot, video cards do, and work fine.  I therefore installed a fast GeForce FX-5500 PCI card in one of the PCI-X slots, and the old SoundBlaster Live! card in the PCI slot; both work great! It turns out the GeForce is dual head, so I attached both flatscreen monitors. This will be great for video analysis and game capture. I inaugurated the setup by capturing The Sims Online live. Everything is working.

For switching from TwinView to Xinerama, see nVidia -- this would be a good idea.

When installing the video drivers in WinXP I discovered that I can use Spello's DVD player through Samba for installing direct from a CD, so we should be able to do this with games too.

November 2004: moving to chroot, installing anvil

To make the Java Media Framework run on Clitunno, I switched over to the chroot, installing java 1.4.2 and JMF and Firefox (with Java plugin), and OpenOffice -- and then uninstalling OpenOffice from the main root:
ia32-libs-openoffice.org openoffice.org openoffice.org-amd64 openoffice.org-debian-files openoffice.org-help-en openoffice.org-hyphenation-en-us openoffice.org-l10n-en
Basically I made things work. I can now run Anvil on the local machine as a non-root user, and similarly OpenOffice and Firefox. I haven't moved vmware yet, so that won't be working.

To run Anvil as a non-root user, just type anvil in konsole (I couldn't make it work from an icon). It's not useful to run it remotely, as the video can't handle it. To run X11 apps as root, try issuing this as root:
xauth merge /home/<your login>/.Xauthority
This will add your credentials to root credentials and user steen will be able to run as root (not tested).

I need a soundcard, a video card, and a large monitor.

Update 10 November 2004: nVidia drivers

Harald Dunkel <harald.dunkel@t-online.de> wrote in a personal mail:
Hi folks,

You can find a modified version of Randall's official nvidia-graphics-drivers here:

http://people.debian.org/~rdonald/nvidia/temp/

He hasn't announced it yet, but I would guess it is OK to do a download and test.

To try it, download

    nvidia-graphics-drivers_1.0.6629-2.diff.gz
    nvidia-graphics-drivers_1.0.6629-2.dsc
    nvidia-graphics-drivers_1.0.6629.orig.tar.gz

into an empty directory. Next

    dpkg-source -x nvidia-graphics-drivers_1.0.6629-2.dsc
    cd nvidia-graphics-drivers-1.0.6629
    fakeroot debian/rules version-change
    fakeroot dpkg-buildpackage -b
    cd ..

Then install the *.deb packages and rebuild new kernel packages using something like

    cd /usr/src
    tar xpfz ./nvidia-kernel-source.tar.gz
    cd linux-2.6.9
    make-kpkg clean
    fakeroot make-kpkg --revision 2 --initrd --us --uc kernel_image modules

I had sent Randall some *.deb files for amd64, but they did not show up on his package pool yet.

Good luck

Harri
Update 9 November 2004 -- how to install a IA32 chroot system

[I first installed the full chroot but realized I didn't need it and kept using /emul after all. Here are the notes from the installation -- this was all undone afterwards.]

I followed the instructions on alioth. I contemplated running sarge, but decided to stick with sid. I issued
debootstrap --arch i386 sid /var/chroot/sid-ia32 ftp://ftp.debian.org/debian
and eventually got "Base system installed successfully."

I edited /etc/ld.so.conf, removing the existing lines for the /emul solution:
/emul/ia32-linux/lib
/emul/ia32-linux/usr/lib
/emul/ia32-linux/usr/X11R6/lib
and adding these new lines:
/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
I then added a link to the 32bit linker in the /lib path:
cd /lib
ln -s /var/chroot/sid-ia32/lib/ld-2.3.2.so ld-linux.so.2
The file ld-linux.so.2 was already a symlink (ld-linux.so.2 -> /emul/ia32-linux/lib/ld-linux.so.2), so I deleted the old symlink and created the new one.  I ran ldconfig.

I then copied over /etc/passwd, shadow, and group, as well as apt/sources.list.

To install applications in the 32-bit chroot, issue
chroot /var/chroot/sid-ia32
and proceed as usual. I ran update and installed wajig.

Now, OpenOffice and vmware would need to be reinstalled for the chroot version -- any others?

To install packages, copy them to /var/chroot/sid-ia32/root/debs or use wajig.

To run 32-bit applications, leave chroot and install dchroot. Edit /etc/dchroot.conf by adding:
# ia32 chroot
ia32    /var/chroot/sid-ia32
Let's say you want to run wma2wav (after installing it in chroot), issue
dchroot -c ia32 -d wma2wav
That segfaulted. Since converting wma to wav files had been the reason I wanted a chroot, I reverted to the /emul setup and verified that ooWriter is working again.

Update 23 October 2004 -- running 32-bit apps in pure64

If there are more applications you'd like to run in 32-bit mode (firefox, for instance, so that you can use the 32-bit plugins), you can install them using dchroot. This is documented in the Debian amd64 howto --  here is the quick version:
 apt-get install dchroot
Add the following to /etc/dchroot.conf:
ia32 /emul/ia32-linux
If /home, /tmp and /proc are mounted in the chroot using 'bind' mounts then both local files and the X11 display and process listing will be available from within the chroot. This is easily set up with the following.

In /etc/fstab:
            /proc  /emul/ia32-linux/proc  none  bind  0  0 
/home /emul/ia32-linux/home none bind 0 0
/tmp /emul/ia32-linux/tmp none bind 0 0
With this in place it is trivially easy to apt install into the chroot.
sudo dchroot apt-get update
sudo dchroot apt-get install packagefoo
And to run it is also easy. (The -d is needed when $DISPLAY is needed.)
dchroot -d firefox
A script such as the following will generically run in the chroot. I called it 'ia32-exec' and link it to program names that I always want to run in the 32-bit space such as firefox and openoffice.
#!/bin/sh
exec dchroot -c ia32 -d $(basename $0) "$@"
Then use it with symlinked program names like this:
ln -sf ia32-exec /usr/local/bin/openoffice
These instructions were contributed to the Debian-amd64 list by Bob Proulx on 23 October 2004.

Update 22 October 2004

Finally figured out how to install Openoffice.org:
  • echo "deb http://debian-amd64.alioth.debian.org/openoffice.org ./" >> /etc/apt/sources.list
  • just install ia32-libs-openoffice.org
  • just install libstlport4.6
  • just install openoffice.org-debian-files=1.1.2-2+1.0.1
  • dpkg -X /mnt/vm/debian/pool/main/z/zlib/zlib1g_1.2.2-1_i386.deb /emul/ia32-linux
  • ldconfig
Update 22 September 2004

The kernel should from now on be compiled with gcc 3.4; I changed the symlink. However, later people said that once amd64 becomes official, it will be using gcc-3.3.

Update 20 September 2004

There's a customer advisory from 3ware warning about a firmware problem on 8506. The problem arises only if the controller card is running in 66MHz mode, which mine probably isn't. Firware version 1.05.00.063 has the fix, and in the bootup menu, I read
Escalade 8506-12
BIOS        BE7X 1.08.00.048
Firmware FE7S 1.05.00.065
So my firmware has the fix and more. For command-line tools, see RAID.

To set up a new RAID configuration, press Alt-3.

Update 13 September 2004

I decide to start over, now that the port is available. After reformatting /dev/hda5 and mounting it on /deb, I follow instructions and issue:
cdebootstrap --arch amd64 sid /deb/ http://debian-amd64.alioth.debian.org/pure64/
Well, neither cdebootstrap nor debootstrap exists on my SuSE 9.0 system, so I'd have to build it.
http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.2.44.tar.gz
Debootstrap instructions
Cross-install instructions
I got debootstrap_0.2.44_amd64.deb in /root/work and issued
ar -xf debootstrap
-- this pulled the package into four files.  Then install them with this:
cd /
zcat < /root/work/data.tar.gz | tar xv
Wow! Installed in /usr/sbin/debootstrap. May not work of course. I issued,
/usr/sbin/debootstrap --arch amd64 sid /mnt/deb http://bach.hpc2n.umu.se/pure64
I got errors on these:
Errors were encountered while processing:
 console-data
 console-common
 base-config
Then I issued,
LOGNAME=root chroot /mnt/deb
and added the stuff below to sources.list, copied over /etc/resolv.conf, filled in /etc/network/interfaces, and edited /etc/hostname. On installing wajig (yeah!), I was prompted for keyboard, selected from full list, and then issued "export LC_ALL=C" and "just reinstall console-data", problem solved. So I now have a Debian installation, bare-boned, but should be ready for a switch-over.

On installing the new 2.6.8 kernel, lots of errors -- and eventually realized I had forgotten to install module-init-tools. Everything else was working well, but I now have a monolithic kernel almost without modules, as I worked my way around this problem. Then the broadcomm module, built from bcm5700-source, oopsed repeatedly. Lots of people have this problem, but the tg3 driver in the kernel should work better, so I recompiled.

This time I included some new ACPI material (I haven't been able to nail down what exactly the problem is), which caused an oops on boot.

So this looks like it works -- I'm off SuSE and on Debian. Note that if you have the i2c sensors compiled and loaded, you should see displays of temperatures on booting.

I ended up installing the vanilla kernel with 2.6.9-rc2 patches, as it was unclear if the tg3 firmware was needed. In the end I think not; it's fine to stick with the Debian kernel.  Looks nice and stable.

The storage server is now moved over to Debian, and everything tested is working -- the RAID volumes mount and can be mounted on other machines, and X-windows works fine remotely (not fully tested locally).

Abandoned paths

I tried another avenue: downloading the netboot image:
wget http://www.be.kernel.org/amd64/alioth/install-images/sid-amd64-netboot.iso (in seconds, and updated)
wget http://debian-amd64.alioth.debian.org/install-images/sid-amd64-netboot.iso (wait for ever)
I created a directory called /root/loop and issued:
mount -o loop -t iso9660 sid-amd64-netboot.iso loop
Worked! But how do you play it? No idea. I surely don't have to burn an image and install from it?

Here's a note on the installer:
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 choose 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". 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. Testing will become available within the next few weeks, as soon as the scripts on alioth are ready.
Update 6 May 2004

I see note that the location of pure64 packages is now
deb http://debian-amd64.alioth.debian.org/pure64/ sid main
I keep the machine mostly off, so this is not yet updated. For updated instructions, see
http://lists.debian.org/debian-amd64/2004/debian-amd64-200402/msg00216.html
http://lists.debian.org/debian-amd64/2004/03/msg00003.html
http://lists.debian.org/debian-amd64/2004/03/msg00006.html
Basically you can start with the tarball from John's site, or do a chroot as described here:
http://lists.debian.org/debian-amd64/2004/04/msg00111.html
 -- or can you build on what you already have in place. You also need to build a 64bit kernel:
https://alioth.debian.org/docman/view.php/1314/21/debian-amd64-howto.html#id2429788
Here's a report:
I did a 64bit installation into a chroot like that a couple of days ago, but using cdebootstrap, but otherwise like all the other steps described in the e-mail. I had to compile some packages for my own to get all dependencies met after the installation, but that is not a big problem, since most of the packages are building out of the box, and the two which did not just lacked a -lresolv at the link line (maybe a bug?).

cdebootstrap -a amd64 sid /chroot/sid-amd64/ ftp://bytekeeper.as28747.net/amd64/jgoerzen/amd64

Little things I had to do by hand was create /etc/hosts /etc/hostname /etc/resolv.conv (all copied from the host installation). Sometimes during the update I remember also binaries like /bin/mkdir disappearing, but copying from the host system and updating them later solved the problem.
On 1 March 2004 I got ssh working, thanks to rebuilt packages from Alex Perry, so the debian chroot is now running sshd. Alex also built a kernel, but this is for his emachines M6805 laptop -- I don't understand yet what is required to build a kernel and will stay away from it until I do. I also updated libxrender1, but I don't think I can run x-windows from chroot. There are still a lot of packages missing before this is a full installation.

On 22 February 2004 I read this from John Goerzen <jgoerzen@complete.org> on the Debian-AMD64 mailing list:
You may download a pure 64-bit environment from:

http://people.debian.org/~jgoerzen/amd64_pure_test.tar.bz2

(approx. 87MB compressed.)

After downloading, run:

mkdir amd64_pure_test/{tmp,root,proc}
mount -t proc none amd64_pure_test/proc
LOGNAME=root chroot amd64_pure_test
vi /etc/apt/sources.list -- change the references to
http://debian/ to http://ftp.debian.org/ or your local mirror
(and yes, binary-i386 is right; it only gets Arch: all packages from
there)
apt-get update
apt-get -u dist-upgrade

It comes preset to use my repository for amd64 debs and (with the minor
mod above) the official archive for arch: all debs.

The environment contains everything you need to build programs, and in
fact is enough to run the autobuilder.
Following these instructions, I installed Debian AMD64 in /mnt/debroot, aka /deb. I first moved the untarred packages up one level, so that they're straight on the root of the partition -- in the future, I'll be able to refer to it more simply in lilo.

Then I issued:
cd /mnt
md debroot/{tmp,root,proc}
mount -t proc none debroot/proc
LOGNAME=root chroot debroot
At this point I got a bash-2.05b prompt! I'm in Debian I guess!
cd /etc/apt
vi sources.list (edited as instructed)
Then I had to do some other things not on the list:
mkdir -p archives/partial (otherwise apt-get update wouldn't run)
vi /etc/network/interfaces
I added this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 128.97.184.92
        netmask 255.255.255.0
        broadcast 128.97.184.255
        gateway 128.97.184.1

auto eth1
iface eth1 inet static
        address 128.97.184.152
All the modules are still loaded in this chroot environment.
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:81:52:B9:B9
          inet addr:128.97.184.92  Bcast:128.97.184.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:81ff:fe52:b9b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:418412 errors:0 dropped:0 overruns:0 frame:0
          TX packets:131996 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:160602951 (153.1 MiB)  TX bytes:51165584 (48.7 MiB)
          Interrupt:24 Memory:fc9a0000-fc9b0000

eth1      Link encap:Ethernet  HWaddr 00:E0:81:52:B9:BA
          inet addr:128.97.184.152  Bcast:128.97.184.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:81ff:fe52:b9ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:281379 errors:0 dropped:0 overruns:0 frame:0
          TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:50319403 (47.9 MiB)  TX bytes:11440 (11.1 KiB)
          Interrupt:25 Memory:fc9d0000-fc9e0000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:99103 errors:0 dropped:0 overruns:0 frame:0
          TX packets:99103 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47807693 (45.5 MiB)  TX bytes:47807693 (45.5 MiB)
Looks promising. I ping sigillo and it works! I then modify /etc/resolv.conf:
search sscnet.ucla.edu
nameserver 164.67.128.3
nameserver 164.67.128.2
nameserver 164.67.128.1
At that point I was ready:
apt-get update
I issue
cat /var/lib/dpkg/available | more
and see lots of Arch: all and then some AMD64 packages.
cat /var/lib/dpkg/available | grep amd64.deb
gets me all of the latter. I install nano and dpkg, both with perl warnings about missing locale settings. You have the locale package -- how is it reconfigured? I issued this on sigillo:
just -s -t reconfigure locales
and got the right command:
dpkg-reconfigure 'locales'
in the locales-english package. I get this:
Choose which locales to generate.  The selection will be saved to `/etc/locale.gen', which you
can also edit manually (you need to run `locale-gen' afterwards).
You could chose 98. en_US ISO-8859-1 or 100. en_US.UTF-8 UTF-8. On sigillo I have the latter, so I select that and say set as default. I then issued:
LC_CTYPE=en_US.UTF-8
When I now type "locale" I get a clean entry. See this guide for more.

ssh messes up -- see details here -- I didn't bother to fix it myself, as it should be in the repositories soon.

I copy over /etc/hosts (cut and paste), and I'm set -- aside from the fact that ssh isn't working!

I copy over ~/.bashrc in the same way and get a nice prompt and aliases. Then when I asked for man to get manuals, it suggested groff, and groff in turn dragged in these:
defoma fontconfig groff groff-base libfontconfig1 libfreetype6 libice6 libnewt0.51 libpopt0 libsm6 libx11-6 libxaw7 libxext6 libxft1 libxi6 libxmu6 libxmuu1 libxp6 libxpm4 libxrandr2 libxrender1 libxt6 libxtrap6 libxtst6 man-db ttf-bitstream-vera whiptail xfree86-common xlibs xlibs-data
X-windows! I took them and they installed without a whimper! Including font-related stuff galore. Wow! I then got
sysutils debianutils module-init-tools libvorbisfile3 libvorbis-dev memstat sharutils libjpeg62 gcc-3.3 libdvdread3 divxcomp jpeginfo kernel-kbuild-2.6-1 libc6-dev nfs-common liba52-0.7.4 bzip2 libglib1.2 libmpeg3-1 ncurses-bin perl-base cpp-3.3 ogmtools tcl8.4-dev  apt libaudiofile-dev libmagic1 libpam-modules fping base-files libfam0c102 portmap libvorbisenc2 hdparm e2fslibse2fsprogs at checkinstall deborphan installwatch
Again, completely clean! Now if I only had wajig...

Finally I run apt-get -u dist-upgrade (I should have done this at the beginning), and run into a problem described on the mailing list: the symlink from lib to lib64 disappears, so nothing works. I exit chroot, reestablish the link, and it's fine again.

More packages -- picked from what wajig needs:
apt-move dash dpkg-repack gconf2 gkdebconf gksu libatk1.0-0 libdps1 libgconf2-4 libgcrypt1 libgksu0 libgnutls7 libgtk2.0-0 libgtk2.0-common libidl0 liblzo1 libncursesw5 liborbit2 libpango1.0-0 libpango1.0-common libtasn1-0 libxcursor1 libxft2 libxml2 libxv1 lynxreportbug wget xbase-clients xlibmesa-gl xlibmesa-glu xterm
The machine seems really fast.

Now what is missing to be able to boot into this?
  • I copied over fstab and changed / to /dev/hda5, placing /dev/hda1 on /mnt/suseroot.
  • I left /boot as /dev/hda3, so I may not need grub -- just edit /boot/grub/menu.lst
    • I edited /boot/grub/menu.lst by changing root=/dev/hda1 to root=/dev/hda5
    • That's very simple -- but you need to create an initrd! Why do the RAID arrays need this?
  • Make a kernel
There may be other stuff, but this is looking good. The initrd for the RAID5 could be a problem.


 

 

CogWeb