edit · history · print

Intro.Install History

Hide minor edits - Show changes to markup

September 14, 2006, at 01:47 PM EST by pjd -
Added lines 25-26:

note for Macintosh users - this has been tested with a trial copy of build 1884 of Parallels for Mac, and with the appropriate substitutions (CD/ROM has to be primary slave to boot, so pass a kernel command line option; use IDE drive instead of SCSI) it seems to work.

September 14, 2006, at 12:25 PM EST by pjd -
Added lines 22-24:

note - if you have SElinux enabled (e.g. if you're running CentOS 4.3) you won't be able to install VMWare. Remove the selinux policies first:

  rpm -e selinux-policy-targeted
September 09, 2006, at 07:25 PM EST by 71.192.247.76 -
Changed line 94 from:
  grub> setup (hd1)
to:
  grub> setup (hd0)
September 08, 2006, at 04:07 PM EST by pjd -
Changed line 84 from:
 $ make all
to:
 $ make 
September 08, 2006, at 01:48 PM EST by pjd -
Changed line 25 from:

cmpsci577a.iso

to:

cmpsci577a.iso.bin (the .bin prefix is to make our webserver serve it as binary - you may need to rename it to cmpsci577a.iso)

September 08, 2006, at 01:46 PM EST by pjd -
Added lines 24-25:
  1. Get the installation ISO image
    cmpsci577a.iso
September 08, 2006, at 01:08 PM EST by pjd -
Changed lines 18-21 from:

guest operating system: other 2.6.x linux kernel
networking: host-only
disk: 2GB is more than enough, and will be easier to copy for saves and restores.

to:

guest operating system: "other 2.6.x linux kernel"
networking: "host-only"
disk: 2GB is more than enough. I use 1.25G in the example below.

Changed line 42 from:

@] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

to:

@] Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

September 08, 2006, at 01:07 PM EST by pjd -
Changed lines 3-4 from:

In our class we will be using the free version of VMWare Server as a development environment, running a modified version of the CRUX linux distribution. (http://www.crux.nu). The following directions will walk you through (a) installing VMWare, (b) installing the linux distribution, and (c) compiling and booting a new kernel.

to:

Debugging kernel code requires a dedicated computer, as bugs may result in the system crashing or worse. (such as corrupted or overwritten file systems) Rather than dedicating a physical machine, we will be using the free version of VMWare Server as our test platform in this class.

We will run a stripped-down Linux distribution, CRUX Linux (http://www.crux.nu), on the virtual machine, for two reasons: (a) it takes less disk space, and (b) it boots quickly - this is something we are going to be doing a lot of, either after installing a new kernel, or after crashing.

The following directions walk you through (a) installing VMWare, (b) installing the linux distribution, and (c) compiling and booting a new kernel.

Added lines 11-12:

Install VMWare

Added lines 21-23:

Install Linux

Added lines 73-75:

Compile and install the kernel

September 08, 2006, at 12:49 PM EST by pjd -
Added lines 1-6:

(:title Installing your system :)

In our class we will be using the free version of VMWare Server as a development environment, running a modified version of the CRUX linux distribution. (http://www.crux.nu). The following directions will walk you through (a) installing VMWare, (b) installing the linux distribution, and (c) compiling and booting a new kernel.


Changed line 16 from:

Configure the CD/ROM device to use cmpsci577a.iso, boot, and log in as root.

to:

Configure the CD/ROM device to use cmpsci577a.iso, boot, and log in as root. (if you're installing off a physical CD, then configure it to use the real CD/ROM drive)

September 08, 2006, at 12:39 PM EST by pjd -
Changed lines 14-24 from:
                                  cfdisk 2.12r

                              Disk Drive: /dev/sda
                        Size: 1342177280 bytes, 1342 MB
              Heads: 255   Sectors per Track: 63   Cylinders: 163

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1                    Primary   Linux swap / Solaris             254.99 
    sda2        Boot        Primary   Linux                           1085.74
to:
                               cfdisk 2.12r

                          Disk Drive: /dev/sda
                     Size: 1342177280 bytes, 1342 MB
           Heads: 255   Sectors per Track: 63   Cylinders: 163

  Name        Flags      Part Type  FS Type      [Label]    Size (MB)

  sda1                    Primary   Linux swap              254.99 
  sda2        Boot        Primary   Linux                   1085.74
September 08, 2006, at 12:37 PM EST by pjd -
Changed line 13 from:

[-- @@ [=

to:

[@

Changed line 27 from:

=] @@ --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

to:

@] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

September 08, 2006, at 12:36 PM EST by pjd -
Changed line 13 from:

[-- [=

to:

[-- @@ [=

Changed line 27 from:

=] --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

to:

=] @@ --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

September 08, 2006, at 12:35 PM EST by pjd -
Changed line 13 from:

[-- @@

to:

[-- [=

Changed line 27 from:

@@ --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

to:

=] --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

September 08, 2006, at 12:34 PM EST by pjd -
Changed line 13 from:

[-[@

to:

[-- @@

Changed line 27 from:

@]-] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

to:

@@ --] (note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".

September 08, 2006, at 12:29 PM EST by pjd -
Added lines 1-78:
  1. Get the free version of VMWare Server here
    Register and get a license key. You may also want the following documentation:
    VMware Server Administration Guide pdf
    VMware Server Virtual Machine Guide pdf
  2. Create a new virtual machine
    guest operating system: other 2.6.x linux kernel
    networking: host-only
    disk: 2GB is more than enough, and will be easier to copy for saves and restores.
  3. Boot the installation CD
    Configure the CD/ROM device to use cmpsci577a.iso, boot, and log in as root.
  4. Partition the disk
    If you used the default configuration, your virtual disk is /dev/sda. (If you configured the virtual disk as an IDE drive, it will be /dev/hda) Use fdisk or cfdisk to partition the disk, creating two partitions:
                                  cfdisk 2.12r

                              Disk Drive: /dev/sda
                        Size: 1342177280 bytes, 1342 MB
              Heads: 255   Sectors per Track: 63   Cylinders: 163

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1                    Primary   Linux swap / Solaris             254.99 
    sda2        Boot        Primary   Linux                           1085.74

     [Bootable]  [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]
     [  Quit  ]  [  Type  ]  [ Units  ]  [ Write  ]
(note - this is a 1.25GB virtual disk) Be sure to (a) set the "Boot" flag on /dev/sda2 so you can boot from it, and (b) set the type of /dev/sda1 to "swap".
  1. create and mount filesystem, swap:
  mkfs.ext3 /dev/sda2
  mount /dev/sda2 /mnt
  mkswap /dev/sda1
  swapon /dev/sda1
  1. Run 'setup'
    It will prompt you for the directory to install into (/mnt), the operation to perform (install), and then ask you to select packages. The default list of packages should be OK - it consists of only the required packages plus GDB.
  2. "chroot" into the new installation
 $ mount --bind /dev /mnt/dev
 $ mount --bind /tmp /mnt/tmp
 $ mount -t proc proc /mnt/proc
 $ mount -t sysfs none /mnt/sys
 $ chroot /mnt /bin/bash
  1. edit /etc/fstab
    It needs to contain the following two lines:
  /dev/sda2  /   ext3    defaults        1 1
  /dev/sda1  swap swap   defaults        0 0
  1. edit /etc/rc.conf
    The hostname doesn't really matter, but you probably want to edit the SERVICES line so it reads:
  SERVICES=(net sshd)
You can add other services, but you probably don't need them.
  1. Edit /etc/rc.d/net and /etc/hosts
    Actually, you don't need to edit them, as by default it should be set up to use DHCP on eth0
  2. Configure, compile, and install a new kernel
    Note that there are two initial kernel configuration files in the directory /usr/src/linux-2.6.16.6. The easiest way to configure the kernel is to copy one of them to .config and then 'make oldconfig' to set up the configuration. The "small" configuration is recommended - it compiles quickly, and contains all the devices needed for VMWare Server.
 $ cd /usr/src/linux-2.6.15.6
 $ cp linux-2.6.15.6-small.config .config
 $ make oldconfig
 $ make all
 $ make modules_install
 $ cp arch/i386/boot/bzImage /boot/vmlinuz
 $ cp System.map /boot/System.map
  1. Install the boot loader
    Edit /boot/grub/menu.lst if necessary - by default it should boot /boot/vmlinuz with /dev/sda2 as the root partition. Then run grub:
  $ grub
  grub> root (hd0,1)
  grub> setup (hd1)
  grub> quit
NOTE - the standard CRUX instructions describe using LILO, an older linux boot loader, instead of Grub. In my experience this results in a virtual machine that will not boot.

Now you are done - you should be able to disconnect the CD/ROM (menu VM->CD/ROM->disconnect) and reboot into your newly installed virtual machine.

edit · history · print
Page last modified on September 14, 2006, at 01:47 PM EST