tar -cvf nsprague_hw1.tar
nsprague_hw1/
Email your .tar file to me as an attachment by 5:00 PM on the due date.
These tutorials sometimes assume that certain files will be present in your home directory, and that devices, such as printers, can be accessed from your account. When these assumptions are not correct, make do with what you have. Once you have completed the tutorials, complete the following exercises. You'll probably need to spend some time investigating the man pages for several commands to figure these out. For each of these exercises, you should find a one-line answer. If you need to use multiple commands then you should link them together using redirection rather than creating intermediate files.
du and sort commands.
.txt for those
that contain the the string "unix".
/home/nsprague/TUTORIAL into your
home directory.
emacs by typing emacs
TUTORIAL at the command prompt. This tutorial is a pared down
version of the one that comes with the emacs editor. If you want to
use the longer version, you can access it by starting emacs and
running M-x help-with-tutorial.
vimtutor at the
command prompt.
qsort routine included in the standard C library to
handle the sorting. Your program should include at least three files:
a main.c file that will handle reading the user input and
calling the necessary functions, a .h file that will provide the
declarations for your helper functions(s), and a .c file that will
provide the definitions of your helper function(s).
You should make sure that the user provides the correct number of input values, but other than that don't worry too much about error checking the input. Your code should be well organized and commented.
sudo apt-get install libglade2-dev emacs
> mkdir /var/scratch/myname/Then copy the disk image into your directory:
> cp /var/scratch/comp430-shared/comp430_machine_disk.vdi /var/scratch/mynameThis is necessary because your home directory is located on a networked file system that is actually stored on our server max. Storing giant disk images on that server will stretch our resources.
comp430_kernel.iso that I
provided on the DVD, and copy it from there. (On tron that image is
located in /var/scratch/var/scratch/comp430-shared . The
file you are looking for is linux-2.6.24.3.tar.bz2
- Untar the archive in your home directory: tar -xf linux-2.6.24.3.tar.bz2
- At this point compiling the kernel is as easy as:
tron: > cd linux-2.6.24.3/
tron: > make defconfig
tron: > make
- That should result in a kernel that will run under VirtualBox,
but the default configuration does not include support for the network
device that VirtualBox emulates. If you want networking, you need to
enable "AMD PCnet32 PCI support" (PCNET32). This can be enabled by
running
make gconfig and checking Device Drivers ->
Network device support -> Ethernet (10 or 100Mbit) -> EISA, VLB, PCI
and on board controllers -> AMD PCnet32 PCI support.
- Once you have compiled your kernel (this should take 10-20
minutes), you need to do some work to make it possible to boot it. The
following steps should do the trick:
tron: > sudo make modules_install
tron: > sudo make install
tron: > sudo update-initramfs -c -k 2.6.24.3
The last step is to tell the boot loader, grub where to
find your new kernel. This is done by editing the
file /boot/grub/menu.lst. You should find a section that
looks something like:
Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=6eff0e61-e2f9-43c4-a1bf-cc453217b318 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
Make a copy of that, and update it to refer to the kernel you just
compiled.
- Restart your machine and select your Kernel from the start menu
during boot. What could go wrong?
- NOTE: These instructions are somewhat specific to Ubuntu. There
are many tutorials on compiling a Linux kernel on the web. If you
want more detail, Google away.