Moving from Lilo to Grub

Is a pain in the ass, or at least it was for me. I have been a die hard lilo fan for a fair while but I wanted to try Xen which meant I needed to use Grub. The biggest problem I had was not realizing that if your grub.conf file is missing then you need to boot manually from the grub command line. The command line is actually quite simple once you know the steps to boot your machine (If you get a VFS error you probably don’t have your file system built into your kernel, try again).
Not knowing how the hell

title blah
root (hd0,0)
kernel /vmlinuz-nnnnnn root=/dev/sda2

the bits in bold above related to each other I created 4 entries in
/boot/grub/grub.conf
and tried each in turn until I realized that
root (hd0,0) is the partition my /boot/*files* are on
and
root=/dev/sda2
is the actual root file system. Would it not have been simpler doing

title blah
boot (hd0,0)
kernel /vmlinuz-nnnnnn root=/dev/sda2

Software Raid

I created identical partition tables on my two SATA disks or rather I made the/dev/sdb identical to /dev/sda because my current root file system resides in /dev/sda2 and /boot/ is on /dev/sda1
/dev/sda1 == 200MB /boot/
/deb/sda2 == 2GB /
/deb/sda2
/dev/sdb1
/deb/sdb2
/deb/sdb3
I then ran the following command.

mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda3 dev/sdb3

To make sure everything is running properly:

cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
md0 : active raid1 sdb3[1] sda3[0]
196996992 blocks [2/2] [UU]
[==>..................]  resync = 10.3% (20347136/196996992) finish=46.4min speed=63318K/sec
unused devices: 

The next step is that when the resync is finished is to use lvm and set myself up some areas to work in.

isd200_get_inquiry_data

If you are compiling a Linux kernel and it fails complaining about
isd200_get_inquiry_data
ide_fix_friveid
Make sure that
CONFIG_USB_STORAGE_ISD200=n
when
CONFIG_USB_STORAGE=y

pxe Linux Install

I recently purchased a Dual Opteron HP Proliant and decided today to install Debian on it. The first problem is that there is no CD/DVD in it. I know I could have just ripped one out of another PC but I decided to do things a bit differently.
Basically I wanted to install Debian on the machine and the simplest way to do this if we are not allowed to use a CD is to use PXE and some ingenuity.
These are a rough set of steps I followed
apt-get install tftp-hpa and tftpd-hpa
You will also need a dhcp server and a resolver
apt-get install dnsmasq dhcpd
mkdir /tftpboot
grab The debian net insall bits
cp netboot.tar.gz /tftpboot/
cd /tftpboot/
tar -zxvf netboot.tar.gz
chown -R nobody:nogroup /tftpboot/*
edit /etc/xinetd.conf and add the following
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}
/etc/init.d/xinetd restart
add the following to /etc/dhcp3/dhcpd.conf
host box2 {
hardware ethernet 00:00:1a:19:4e:7c;
filename “pxelinux.0”;
fixed-address 192.168.1.10;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.20 192.168.1.30;
}
add the following to /etc/dnsmasq.conf
interface=eth1
dhcp-host=00:00:1A:19:4E:7C,box2
For those using an iptables firewall
iptables -A OUTPUT -p udp -o eth1 -j ACCEPT
iptables -A INPUT -p udp -i eth1 -j ACCEPT
iptables -A INPUT -p udp -i eth1 –dport 67:68 –sport 67:68 -j ACCEPT
iptables-A INPUT -p udp -i eth1 –dport 67:68 –sport 67:68 -j ACCEPT
iptables-A OUTPUT -p udp -o eth1 –dport 53 -j ACCEPT
iptables-A INPUT -p udp -i eth1 –sport 53 -j ACCEPT
Set the client machine to use network boot and restart it and hey presto a Debian installer. I chose linux26 at this point because I am using SATA disks with an Adaptec 1210SA controller.

ssh Notes

I had an odd problem using ssh that stumped me for a bit.
Using ssh -vvv user@host
Cutting out all the fluf we see that normally (when using a public key) we get something like the following
……………………
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug3: no such identity: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug3: no such identity: /home/user/.ssh/id_rsa
debug1: Offering public key: /home/user/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-dss blen 433
debug2: input_userauth_pk_ok:
debug3: sign_and_send_pubkey
debug1: read PEM private key done: type DSA
…………………..
I noticed that I had changed the perms on the users directory from
drwxr-xr-x 33 user user 2048 Aug 14 18:57 user
To
drwxrwxr-x 33 user user 2048 Aug 14 18:57 user
This meant that I lost access using public keys. The verbose output with this error is as follows.
………….
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug3: no such identity: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug3: no such identity: /home/user/.ssh/id_rsa
debug1: Offering public key: /home/user/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
……………..
Removing group writable permissions from the users home directory solved the problem.

Subversion Notes

Notes to self about subversion.
To get the permssions right read the following.
RedBook
What follows is probably a butchers job.
#!/bin/sh
REPO=/usr/local/subversion
if [ -d $REPO ]; then
echo “Repository already exists”
exit 1;
fi
mkdir $REPO
chown svn:svn $REPO
chmod +s $REPO
chmod g+w $REPO
svnadmin create –fs-type fsfs $REPO
cd $REPO
chmod g+w db
chmod g+w db/transactions
chmod g+w db/write-lock
chmod g+w db/revs/
chmod g+w db/revs/*
chmod g+w db/revprops
chmod g+w db/revprops/*

Layered Technologies

I have just been combing through the logs because I have been getting hit quite hard recently and was wondering who by and I noticed the strangest thing.
I noticed the following IP address was cropping up under different referrers.
216.32.75.122
I also found the following blog entry about Layered Tech supporting referrer spam
So far I have noticed them masquerading as the following referrers.

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyTotalSearch; SV1)" 1 www.uklug.co.uk
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" 0 www.uklug.co.uk
Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)" 0 www.uklug.co.uk
Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)" 0 www.uklug.co.uk
Mozilla/5.0 (compatible; BecomeBot/2.3; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)" 0 www.uklug.co.uk
aipbot/1.0 (aipbot; http://www.aipbot.com; aipbot@aipbot.com)" 0 www.uklug.co.uk

Mathematics

I’m doing a Mathematics degree with the Open University and I am in my first two of the 4 required level 3 subjects.
I have not really had as much time as I would like to devote to Maths, so, for the most part, I have been reading the material and finishing the course work with as little paper and pen as possible. This system of doing things was working fine up until a few weeks ago when I started to run into trouble with M381 (Number Theory and Mathematical Logic).
The questions in this course have demanded a rigour that has not really been set out in previous courses. When asked “Prove the Following” I was completely baffled and had no idea where to start. This might sound odd for those people who are up to speed with their Math but for me it was an eye opener. For those maths teachers out there you may recognise that I have become a calculator and not a thinker (my own fault) which is fine for doing sums but pretty useless for real Mathematics.
Anyway. Not to be outdone I decided that the only way to get up to speed was to subject myself to more Maths, specifically, more thinking about Maths. I went looking for a text that would have the rigour I was looking for and having searched high and low one text that seemed to appeal was A Course of Pure Mathematics by G. H Hardy
I have been trying to get to grips with this book over the last few weeks and so far I have made the following observations.
The book states in the preface:

This book has been designed primarily for the use of first year students at the Universities whose abilities reach or approach something like what is usually described as “Scholarship Standard”

I am “meant” to be covering 3rd year level material in my degree and a lot of the material in this book appears new to me. This begs the question[s].

  • Have I forgot what I learned previously?
  • Have I not understood the material in previous courses?
  • Has the standard slipped since Hardy’s time?

There are more questions I could ask but these questions alone scared me into checking Google groups for more information and I found the following article on Littlewood which made me think that perhaps the required standard was higher in those days.
Having thought about this for a while I decided that “standards being higher” was a weak excuse at best, and that I should really not be casting historical aspersions when I’m hardly capable of judging a decent book from a bad one due to my lack of mathematical maturity. This left me in a bit of a dilemma.

  • I want to get better at Maths.
  • I have only so many hours in the day (I have bills to pay).
  • I need to teach myself.

The criteria above mean I need to pick an area of mathematics in which I will continually find myself in, regardless of what maths I am doing. From what I could gather there are a few areas that seem to crop up all over the place. Two of these subjects are Calculus and Analysis (I know they are similar subjects), they seem to find their way into everything to some degree or another.
To this end I have decide to spend some of my spare time doing problems from calculus and analysis books. I have also bought Polya’s “How to solve it and am about half way through it” and so far it has been an interesting read.
I have ordered Spivaks Calculus book. I would also like a few other books to read around the area a bit. Again the source I went to for information on this was sci.math. The books I intend to investigate are as follows.

  • Calculus: T. M. Apostol
  • Calculus: Spivak (on order)
  • Calculus Answer book: Spivak (Answer book) (on order)
  • Introduction to Calculus: Courant, John
  • Mathematical Analysis: T. M. Apostol
  • Real Anlysis: Royden
  • Principles of Mathematical Analysis: Rudin (Baby)

I don’t intend to purchase all of the above books although it would be nice to have them. The above list seems to be the most popular recommendations on sci.math (particularly Spivak, it has an answer book so I ordered it). I intend to have a look at each of them and decide which ones would be best suited for me.
I have also heard good things about:
What is Mathematics: Courant Robbins Stewart
which I have been meaning to buy for a long time. Current books I own are:

  • A Course of Pure Mathematics: Hardy
  • Differential and Integral Calculus: Courant Vol 1 (Old Blackie edition).
  • Calculus Made Easy: Silvanus P Thompson and Martin Gardner
  • An Introduction To the Theory of Numbers: Niven and Zuckerman
  • An Introduction To the Theory of Numbers: Hardy and Wright
  • Fundamentals of Number Theory: William J. LeVeque
  • Advanced Mathematics (A pure Course): Perkins and Perkins
  • Engineering Mathematics: K. A. Stroud 4th Ed
  • How to solve it: Polya
  • Fermats Lat Theorem: Simon Singh
  • A concise History of Mathematics: Dirk J. Struik
  • Introductory Logic and Sets for Computer Scientists: Nimal Nissanke
  • A History of Mthematics: Victor J. Katz

Why blog

When asked why he wanted to climb Mount Everest the climber George Mallory answered,

Because its there

This was a fantastic answer and I wish I had an original one liner to answer the original question. My paltry answer is:
I blog because I blog.