Friday, November 24, 2006

Installing Ubuntu - no strings attached

I have a farily old laptop. An old HP Omnibook 6100 with no more than 1Ghz and even less RAM. The thing was that I bought it used, so things weren't exactly tiptop shape. The cd for example, was barely managing it. BIOS didn't support usb-device boot. Now 2 years after that barely justified purchase, the cd has gone to wherever cd:s go when they're not responding anymore. CD heaven, CD hell or just CD gone for ever. On this computer I had installed Windows XP, a good choice at the time since I didn't know better. Safe to say it went slow. I needed a reinstallation, but the cd didn't work and my windows had decided that was not orignal anymore. Kept complaining that I had been fooled and that my OS wasn't honestly bought. So I decided to install ubuntu on it, since everything goes so, so, so slow on windows. Searching the net, the google way I finally found the solution. A Ubuntu installation that didn't require more than 10Megs and an internetconnection. Could this be true?
Oh yes it is, and here is how is was done.

1. First make sure you aquire some unallocated space on your harddrive. I did this when I had XP installed so I used Partition Magic to create some, or a lot in my case since I was planning on removing the windows partition after a successfull installation.

2. Next I downloaded the Ubuntu kernel at

http://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-i386/
current/images/netboot/ubuntu-installer/i386/

Here I downloaded the files : linux and initrd.gz.
I placed these two files in my root, in a directory named boot ( c:\boot )

Next step was to download the grub, so I could boot the installation.
http://sourceforge.net/projects/grub4dos/
The only files we need from this package is "menu.lst" and "gldr"
So extract the package and place "menu.lst" in c:\boot\grub\
and "grldr" in c:\

Next we edit "menu.lst" so it'll find our ubuntu. Open file in your favourite texteditor and add the following at the bottom.

title Ubuntu Installer (hd0,0)
kernel (hd0,0)/boot/linux vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd (hd0,0)/boot/initrd.gz

Now edit c:\boot.ini, if you don't know where it is, simply open the commandshell ( RUN > cmd ) and enter this :
/> attrib -a -r -s -h c:\boot.ini
Open boot.ini in a texteditor and add the following at the bottom:
C:\grldr="Start GRUB"

3. Reboot, choose "Start Grub", scroll down to Ubuntu installation and live happily ever after.

This is the way all operating systems should work!

References :
http://ubuntuforums.org/showthread.php?t=28948
http://marc.herbert.free.fr/linux/win2linstall.html

Tuesday, November 21, 2006

Creating a RIS server

It's been a long day, but finally I managed to get the Remote Installation Service working! So I thought I would try to document the steps needed here for future usage, and because I didn't find any reliant tutorial on the net.

As I sit here now, my laptop next to me is now installing Windows XP. It took some doing but never the less, it was a success. Now the ironi of this is that I'm only installing XP so I can get rid of a GRUB gone haywire, so I can reinstall Ubuntu. My laptop is a bit old now, the cd has gone bad, no usbboot available. In other words, no removeable media is going to do it. PXEBoot was sort of my last option, otherwise I probably would have given up a long time ago I'm sad to say.

Enough backstory, let get to it!

Step 1. Making sure you ready to RIS ( Remote Installation Service )
What you need:
- Windows Server 2003
- DNS (Domain Name Server)configured and ready
- AD (Active Directory) active
- DHCP (Dynamic Host Configuration Protocol scope authorized - An NTFS partition other than your systempartition.

When installing Server 2003, make sure to save some unallocated diskspace or create a partition other than your systemdrive. Remote Installs need to be installed on a ntfs partition other than the one on which the server is operating on. Depending on how many OS versions you need, make sure the partition is big enough.
I hadn't partitioned my Server drive so I used Acronis Partition Expert to create another partition. Partition magic is usually a good choice, but sadly it doesn't support Server 2003. I only used 900MB for the partition which is a bit low, 2-3GB leaves room for the future.

First of make sure that everything is working correctly. Try to connect to the domain from an xpclient and make sure distributed ipadress is logical to your dhcp-scoope. I myself had some trouble with this in the early stages. I wanted to use my router as dhcp distributor, but that didn't go over at all. In the end I set up my clients and server on a seperate networksegment to avoid conflicts.
Easiest way to set up this services is using "dcpromo" (runs from "run prompt"), it's a wizard that sets up AD for you, and if you haven't installed DNS, this guide does it for you. Really the easiest way to install it, if you're a n00bie with DNS.
But it doesn't do it all for you. You still need to configure an reverse lookup zone. In the DNS management console (msc), rightclick on reverse lookup zone and create a new primary zone. Here you define the subnet on which your dns operates. eg for example if you're dhcp scoope is 192.168.0.2 to 192.168.0.254, your subnet would be 192.168.0 .
Not really sure if this is necessary for the RIS server, but it can't hurt can it?
Next you need to make sure your TCP/IP configuration is correct.
Go to your network connection and check properties on the TCP/IP protocol.
Your default gateway should be the same IP as the DNS server. Same goes for primary dns. So put the DNS IP here, or the loopback address should also work (127.0.0.1).
Another pain is the windows firewall. If your clients can't connect to the Active Directory Server, check that the firewall is turned off. Another good reason to do this on a separate networksegment. You could apply a group policy on the DNS to allow traffic for AD and FRS(File Replication Service), but that's a whole other story. I've seen good guides for this on the net, so go fish.
Also make sure there is a user in the AD you can use when installing from PXEBoot, not sure how much privileges he'll need but I made him a member of Domain Admins and Remote Users, just in case.

Step 2. - Installing RIS

Allright! You're domain is functioning perfect! Time to install Remote Installation Service.
You'll find it in "Control Panels >Add or Remove Programs >Add components > Remote Installation Service"
You'll probably need Server 2003 installation disc at this point.
When it's installed and ready. Run Remote Installation Service from Administrators Tools. Here you will configure where you want to put the remoteInstallation files, eg your second ntfs partition. You'll also be prompted to insert an installation CD for the OS you want to remote install.

Step 3. Why doesn't it work?
After you've rebooted, you're good to go.
Or so they say.
I had used a swedish installation cd for my XP, which caused some problems. Sure enough, the client PXEbooted and started the installation screens. (FYI :\remoteInstall\OSChooser\Welcome.osc) But when it came to choosing language it got grumpy and crashed. What I did was that I copied all the files in \remoteInstall\OSChooser\Swedish to \English (which I created in the samefolder) . This made the installation go a bit further but then it started to complain about User Privileges and OS images.

So I renamed \remoteinstalls\Setup\Swedish to English and what do you know?
Not it works perfectly.
Now I only need to install the grub and get my ubuntu flying again!

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...