[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Migrating a server to Debian amd64? [SOLVED]



Thank God, the server at stake now runs a Debian Sarge amd64 base system, rebooted successfully at the first attempt (a very long minute of silence and then it came back -- ahh, sweet!!). Many thanks to the supportive Debian community!

I provide here a log of the effort in case someone later falls over this thread with a similar issue.

But one more question first:

I noticed that the Debian AMD64 Howto (https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html) refers to a debian-pure64 incarnation whereas the http://www.debian.org/ports/amd64/ page refers to a debian-amd64 one. Is there any difference and what? Thanks in advance to anyone willing to respond.


-- How I did it --

The system was running an gentoo 2005.0 amd64 so I was lucky in two aspects: (1) I had a system running a 64 bit kernel already; (2) there appeared to be a debootstrap packaged for gentoo (the_ nicest _surprise[tm] during the whole action, indeed).

1. Created a new partition (there where several Gigs free on the hard disk for such cases, but one can as well use the swap if big enough); formatted, mounted it at /mnt/sarge and executed debootstrap:

# debootstrap --arch amd64 sarge /mnt/sarge http://ftp.de.debian.org/debian-amd64/debian

this run for a couple of minutes and died with the following error:
 .
 .
 I: Retrieving libgcrypt11
 I: Validating libgcrypt11
 E: Couldn't download libgcrypt7

After some studying of /usr/sbin/debootstrap, I could find where the offending definitions were: /usr/lib/debootstrap/scripts/sarge. Removed libgcrypt7 and libgnutls10 from the 'base=' definition and now debootstrap could complete successfully. (This seems to need reporting and fixing... Where did the sarge script come from -- the gentoo package or the network?)

2. The next thing was to write an /etc/fstab; then configure /etc/apt/sources.list. The auto configuration failed due to mirror problems (I supposed it looked at the official mirrors where it could not find the amd64 port), so I had to write it by hand with some help:

eagle:~# cat /etc/apt/sources.list
deb http://ftp.de.debian.org/debian-amd64/debian sarge main contrib non-free
deb http://ftp.de.debian.org/debian-amd64/debian unstable main contrib non-free

# we do not have security until sarge is stable (expected on May 30th)
#deb http://ftp.de.debian.org/security sarge/updates main contrib non-free
# -- eof --

Plus this in the /etc/apt/apt.conf.d/99local:

eagle:~# cat /etc/apt/apt.conf.d/99local
// Next line is for ppl accessing the net via proxy:
//Acquire::http::proxy "http://proxy:8080";;
APT::Default-Release "testing";
// -- eof --

Then apt-get update run just fine! -- so far so good.

3. Next step - getting a ready-made kernel. I could not install any, due to mkinitrd complaining with this error:

/usr/sbin/mkinitrd: Cannot determine SCSI module

With 3ware 7xxx/8xxx-series PATA/SATA-RAID support built into the kernel, gentoo-amd64 does not have /proc/scsi/anything so I had to compile my own kernel. Using the gentoo kernel config as a base and using the following commands did the job:

# apt-get install kernel-tree-2.6.11 libc6-dev gcc kernel-package fakeroot ncurses-dev

# cd /usr/src/

# tar xjf kernel-source-2.6.11.tar.bz2

# cd kernel-source-2.6.11

>> copied {my-old-gentoo}/usr/src/linux/.config into the {chroot}/usr/src/kernel-source-2.6.11/

# make oldconfig    # replied 'n' to couple of unimportant questions...

# make menuconfig   # now, if you do this thing remotely like me, you *want* to compile
                    # your hard disk and file system support built into the kernel!

# make-kpkg --rootcmd fakeroot --added-patches debian kernel_package

(references: man pages, http://www.howtoforge.com/howto_linux_kernel_2.4_compile_debian/)

After the kernel build has ended, I had a .deb package of it in /usr/src waiting to be installed, which I did:

# dpkg -i /usr/src/kernel-image-2.6.11_10.00.Custom_amd64.deb

4. From now on, it took me three hours to setup and multi-check every aspect of the system boot to ensure a remote reboot to succeed. (If anyone does this and needs a check-list and advice, email me and I will send some to you at no charge :-) )

Hope this may appear useful to another noob like me some day.
(Any corrections/suggestions/comments more than welcome!)

Cheers,
Yassen



Reply to: