My notebook Toshiba Satellite A25, and old version of Toshiba, but still capable to run a bunch of application. I really want to utilize it.

And finally Fedora releases its latest version, Fedora 7. As usual, I want to make a try to this powerful operating system, the LINUX Operating System.

Wow… wait a moment, after downloading the 2.8 GByte DVD ISO images, I cant burn it into a DVD media. First, I don’t have a DVD burner, the second one, although I can burn it some where else, but, my Notebook’s DVD combo has already broken.

Therefore I should try to use other approach. Fortunately, the Toshiba A25 support the network booting mechanism through PXE. And also I have a computer running Linux fedora 4 to be utilize as the booting server

My goal for this are:

  • To install the Fedora 7 on my Notebook but still keep the Win XP as my main working environment
  • To use the Windows XP boot loader, and not replacing it with one from Linux (such as GRUB or LILO)

PREPARING THE INSTALLATION ENVIRONMENT

Before starting the installation, first, we need to prepare the environment. A small network system, and isolated from main network to prevent the interference with the production system, since we use a DHCP server. A small network connected with UTP cross cable is an ideal environment.

PREPARING THE BOOT SERVER AND INSTALLATION SERVER

The first step for this installation is to prepare the boot and installation server. This server provide facility as a booting server and to store the installation source file. I use my old Linux box for this task. Following application are needed on this server:

  • http server to server the installation file. This server can be replaced by NFS server or FTP server
  • dhcp server: to provide the automatic IP assignment and as the starting point of PXE boot mechanism
  • tftp server: Trivial File Transfer Server, to host the kernel files and serve the PXE request mechanism

HTTP Server

Basicaly, this server provides a mechanism to transfer the installation source file to the installer. You may choose any method supported by Fedora7 distribution, such as NFS, FTP, HTTP, or local disc (fat, FAT32 and VFat. Unfortunately the NTFS isn’t support yet).

Next make the ISO DVD image accessible by the server, by mounting it as a directory in our linux box directory. For example we will mount our ISO DVD under /mnt/linuxdvd. Make a directory /mnt/linuxdvd, and from the directory where your dvd file located, issue following command:(remember to replace the filename with your ISO dvd file name.

mount -o loop linux_dvd_iso_file_name /mnt/linuxdvd

Now, the directory /mnt/linuxdvd will contain the Linux installation DVD. You should be able to see all installation file, and RPMs under this directory structure.

Finally make this directory browsable to the world from your HTTP server. The simplest way is to make symbolic link from the http document root directory to /mnt/linuxdvd directory. Make sure to check if it has already available through your http server. For example http://192.168.0.1/linuxdvd. This URL depend on your configuration. You may choose other method which is the easiest for you.

DHCPServer

To configure the DHCP server, modify the /etc/dhcpd.conf. Following are my configuration:

ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

allow booting;
allow bootp;

# — default gateway
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;

option nis-domain “balidev.com”;
option domain-name “balidev.com”;
option domain-name-servers 192.168.0.1;

option time-offset -18000; # Eastern Standard Time

range dynamic-bootp 192.168.0.128 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host ns {
next-server 192.168.0.1;
# change with your Server MAC Address
hardware ethernet 00:50:04:ba:e7:1d;
fixed-address 192.168.0.1;
}

}

host MyNewLinuxBox {
# change with your New linux box
hardware ethernet 00:08:0D:3C:2A:DD;
fixed-address 192.168.0.3;
option host-name “MyNewLinuxBox”;
filename “pxelinux.0″;
}

After modifying the file, restart the dhcp server

TFTP Server

The Fedora linux distribution has already include the TFTP server, and it may installed as part of xinetd super server. Although it can be started as standalone process, but starting it via xinetd is preferable. Find the configuration under /etc/xinetd.d/tftp. Modify the file to enable the tftp server by setting the “disable = no”, and set the “server_args = -s /tftpboot”. Your configuration file may look like below

service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

After modifying it, check the directory /tftpboot, and make sure it is exists and readable by the world.

During the PXE booting mechanism, the PXE boot room first will load the dhcp configuration, and from the the DHCP record, the PXE will load the pointed boot file “pxelinux.0″ through the “next-server 192.168.0.1″ as specified by the dhcp server configuration. This files will be transfered via tfp mechanism. This file then will be executed and it will load the configuration under pxelinux.cfg directory on your /tftpboot directory. From the configuration, it will the load the kernel images, loaded it into memory and transfer the boot process to the kernel image.

Next we will copying the PXE boot image. The file named “pxelinux.0″in your DHCP server. This files can be copied from your linux box under /usr/lib/syslinux. Copy it to /tftpboot directory and make sure it is readable from the world.

Create a directory named /tftpboot/pxeboot_install. We will copy the installation Linux kernel to this directory. Copy the kernel files from your source directory “/mnt/linuxdvd”. The file is located under directory “image/pxeboot”. Copy the initrd.img and vmlinuz file to the “/tftpboot/pxeboot_install” and make the directory and files readable to the world.

After copying the install kernel file, we will make a configuration file to give hint to the pxelinux.0 program the location of our kernel. make a file named 01-<your-new-linux-box-mac-address>. For example, my notebook mac address is 00:08:0d:3c:2a:dd then i will make a file named 01-00-08-0d-3c-2a-dd. Put this file under /tftpboot/pxelinux.cfg directory, and make it readable from the world. The content of this file is:

prompt 1
default linux
timeout 100

label linux
kernel pxeboot_install/vmlinuz
append initrd=pxeboot_install/initrd.img ramdisk_size=9216 noapic acpi=off

Now restart the tftp service by restarting the xinetd service.

Up to this step, our boot server is ready. We ready to test our server. To boot from this server, modify the boot priority on your new linux box BIOS setting. Use the PXE boot first, instead of harddrive or cdrom.Boot your box, if everything OK, your box will boot from network and the installation program will begin.

INSTALLATION PROCEDURE

Follow the installation step by step.  Remember our goal is to install the Fedora 7 but still use the XP boot loader as our main boot loader. To achive this goal, remember to install the GRUB linux boot loader BUT DO NOT  install it on your MBR, install it under your partition boot record on which the /boot directory located. This configuration can be modified by check the option “advance boot configuration” when the installation step confirm you about installing boot loader.

If you follow this option, then after the installation is completed, your computer will boot still using Windows XP, and your new linux installation will disappear.  And there is now way to boot your computer using your latest linux installation.

Don’t worry, following procedure is used to activate your linux boot  partition. Before you proceed with this procedure, use must make sure that during the installation, you have installed the GRUB on the boot record of your /boot partition. I assume that your linux partition is /dev/sda3.

What you need is just to take the boot record image of your linux partition. Use the windows version of dd unix command.  You may find it under http://www.chrysocome.net/dd or from the cygwin installation. Wich one you prefer.

Get the first sector of your boot record of the linux partition, save it into a file, put it on your c:\ drive. Give a name such as boot.linux.

Now add a configuration under c:\boot.ini file of your winxp. Add a line c:\boot.linux=”Fedora Core 7″ on this file. your boot ini may look like below.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect
c:\boot.linux=”Fedora Core 7″

Restart your computer, and your linux installation will be available for you.

Note: Some  problem may occured if your bios doesn’t support LBA32

INSTALLATION GAME

Ok, thats all, but i have some thing interesting for you. After reading and perform above step, I believe you have already understand on how to boot your linux server from the network.

Now the game is: DO NOT use the windows version of dd to get your copy of boot record, instead, boot your computer from network using your kernel and initrd.img that has already installed on your /boot directory under your linux partition.  Following tool is useful to extract the files of your linux partition from Windows environement. http://www.fs-driver.org/

After booting, take the partition boot record, perform the boot.ini configuration, and your linux is ready for you.

C U on my next articles