|
Debian on JS-20 blades
Looks like Debian's Etch supports JS20 installation directly. I haven't tried it yet as i dont have access to a JS20 now. See here for more info
If your looking for an article on Debootstrap see here
BTW: the below article was inspired from the method described here. Also this method is not for the faint hearted and for those expect this to be the only way to install debian on JS20. This is a WORKAROUND to install debian on JS20 till installing debian natively on JS20 becomes a norm.
JS-20 Blades by IBM are based on the Power
Architecture. The JS20 that were used here were donated to the
GrandChallenge team at NJIT
and served as the primary servers. The 2 JS20 blades had a
configuration consisting of dual power processors(970FX-2.2Ghz, 512KB
L1 cache),3 GB RAM and no video card! Why i mention video card,
because that brings us to a very interesting thingy about blades.
Blades in order to save on Power(real electricity) don't feature
either the video card or a dedicated power supply. To complement them
these blades reside in a box called as the Blade
center
By default the JS-20 come with no OS installed. The
possible OS that can be installed are Linux and AIX. As AIX is very
proprietary in nature and I was involved in a 'kind of'
non-commercial project, we opted out for Linux.
Which Flavor???
No doubt about that, Its Debian.
Why Debian???
Simple to maintain. Tell me about all the wasted time I had
installing and upgrading non-debian based Linux machines.
Very versatile programs, Debootstrap, Alien, Apt & Dpkg!
A Debian port to JS-20?
Debian has support for PowerPC machines(Old world and New World).
A common problem on non-x86 machine is insufficient support for the
firmware(or bios) on the machine. Apple G5 that have the same
processors as JS-20 do run Debian out of the Box but due to some
difference in firmware(IMHO:its the firmware) JS-20 did not boot the
Debian PowerPC port CD out of the box. A question arises! Is it
possible to really install Debian on JS-20??? Yes and read more on
howto.
Debian has a really nice tool called Debootstrap. It can
strap(convert) theoretically(IMHO), any 'chroot' obeying OS to
Debian. So armed with this knowledge, Its possible to first install a
'chroot' obeying OS on JS-20 and then convert to Debian.
So a rough method would be
Install a working Linux Distro
Debootstrap Debian on it
Known OS as of (Aug-1-05) these are some major Linux distros
supporting JS20, namely SUSE SLES 9.0, Redhat RHEL 9.0, Fedora Core 4
, Yellow Dog Linux and many more.See here for a detailed list.
Steps
console -T blade[n]
where 'n' is the blade number.
Note: you might want to try to use
different 'telnet' agents like Xterm or Putty or Telnet (that comes
with Windows). I had problems with all of them, so used the other one
whenever one of them just hanged. Many times like when choosing
options from Yast2 Putty seemed not to obey the backspace (I know
there must be some option somewhere in putty for setting the keymap
which i know not of). Anyways try one when one fails. Also SOL is
more forgiving than telnet so if it looks like hvc0 has hanged try
again using some other telnet client and press <Tabs>. Tabs is
more forgiving than most options(Space and enter 'selects stuffs').
Note: If you have a single Harddisk
make
/dev/hda1 Primary PPC PReP Boot
0.5MB
/dev/hda2 Primary Linux Swap
(depending upon server memory some GB's)
/dev/hda3 Primary Linux Ext3 (/debian
some size, make atleast 5GB, Harddisk space is cheap Dude)
/dev/hda5 Primary Linux Ext3 (/home
partition)
/dev/hda6 Primary Linux Ext3 (/ for
Suse)
And if you have an additional hard
disk, Do whatever you want with it.
Yaboot is slightly stupid, It
will(IMHO) try to load the first Linux Primary partition and fail as
it is /debian in our case). To get around this, change the boot
sequence through the management module and boot from the CD and when
the boot prompt of the CD shows use the following command to use the
CD's Kernel to mount and boot /dev/hda6 AKA / of SUSE.
When you are on the command prompt, again fire up YAST2. And
through YAST2 options install the following program( You might have
to search for the software in YAST2 first). The Software needed are
wget and perl. I suppose a minimal version does install perl but not
not wget. Once wget is installed we can install 'debootstrap'
program.
Now debootstrap is available only as a .deb package. And SUSE
default packages are in .rpm format. We need to convert .deb to
.rpm. So we will use 'alien'. You can get 'alien' here
alien.
Either Download it using wget or burn it to a cd. Dont burn it right
now, But wait till I tell.
Once alien is acquired(not through roswell), Get debootstrap
debootstrap
and either burn it or use wget through your blade, if you have a
network connection through the blades. Once this is done use the cd,
and copy both the programs to your blade. Alien in the gzip format
so Unzip it and as you should do for any software, read the README
and follow instructions.
Once the above stage is finished, use Alien to convert .deb
to .rpm via 'alien -r debootstrap_XXX_XXX.deb' XXX=version might
be different for everyone.
You will then get a rpm package for debootstrap which you can
install via 'rpm -ivh debootstrap_XXX.rpm' In case you get some
error like some .so not found, search on the net which library is
that .so(b) a part and install it via YAST2 as we did earlier for
perl and wget.
On installation debootstrap will be installed(in
/usr/sbin/debootstrap). Now you are ready to bootstrap debian. As
you remembered we allocated a partition /dev/hda3 and mounted it as
/debian. At this point we have 2 options, first debootstrap via the
net or via a special file called
basedebs.tar(basedebs.tar)
Using local basedebs.tar
debootstrap --arch powerpc
--unpack-tarball /path-to-downloaded/basedebs.tar woody /debian
--arch = powerpc in our case
/debian = place where we want to
install our stuff
Using Internet
debootstrap --arch powerpc woody
/debian
woody, or sarge or sid etc the name
depends on the scripts found here for debootstrap
/usr/lib/debootstrap/scripts/, So in your case you might want to
substitute the required script.
After some time and an occasional coffee, the /debian would
have wonderfully converted to a full fledged Linux directory
structure and ready to be customized. At this point chroot will come
into play. In a nutshell, chroot will 'pseudo mount' the given
directory as / and run whatever sh you want on that /. e.g. say you
are in /blah/blah2 and use 'chroot . /bin/bash' in it. It will
pseudo mount /blah/blah2 as / and run bash.
We will do the same for /debian and run 'chroot . /bin/bash'
. Now we are in debian mode!!!!wowey !!!. Now we will run our
favourite debian command (for me it is favourite) base-config and
start all configuration. Choose whatever we install and let debian
install all the packages(X & others). As you can see we needn't
need a network connection at all. But you surely should have network
connection at this point, as other than the freaking hvc0 terminal
we don't have anyway to connect to the blade(remember no video
cards)
Hmmm.. i always forget to mention this, somethings would fail
if you do an immediate base-config after chroot'ing'. You might want
to mount proc. Proc allows some really system specific stuff stored
in memory(like the name of our powerpc architecture) so that
base-config doesn't get confused.
mount -t proc proc /proc
Now you can modify /etc/fstab to
show the current harddisk status. You can copy your old fstab from
SUSE installation to your new Debian installation. Make sure that
you do it out of your chroot environment. ;-)
You might at this point want to
install some very essential tools like nano, module-init-utils,
ssh and mc. Use apt-get to do that.
apt-get install nano mc
module-init-utils ssh
and make sure it
has this lines
auto lo iface lo inet
loopback
auto eth0 iface eth0 inet dhcp
This makes sure than lo and eth0
are loaded at runtime so that we can remotely connect to our blades.
You might want to add eth1 if you have more network ports. You might
also want to set static ip in some circumstances, In that case refer
to the syntax of interfaces file.
We wont install a custom
kernel-image as to this date i am not able to get a debian
kernel-image working on JS20. So we will make SUSE kernel boot our
OS. For that exit the chroot environment using plain 'exit'
now copy the whole /boot to
/debian/boot (all files and subdirectories). Copy /etc/yaboot.conf
to /debian/etc/yaboot.conf
Initially we know that yaboot did
not boot on because of the non-presence of the yaboot.conf and
kernel on the first Linux partition. Now as we had bootstrapped the
whole system to the first Linux partition, and copied the kernel
(boot files) to the /debian we can now boot the system using the
SUSE kernel Debian system. But before that we will have to modify
the /debian/yaboot.conf and make sure that yaboot.conf has the
/dev/hda6 line changed to /dev/hda3 line that is the kernel and /
are on /dev/hda3 and not on /dev/hda6. eg.yaboot.conf file.
hvc0:1235:respawn:/sbin/getty
-L 9600 hvc0 vt100
This concludes the whole tutorial on how-to migrate JS-20 from SUSE 9.0 to Debian. Report to me at abhishek(at)ieee.org (substitute (at) with @) if you find any errors.
|