CS615A Aspects of System Administration Homework Assignment #1 Please read this entire document before starting to work on the assignment. Please also read http://www.cs.stevens.edu/~jschauma/615A/hw.txt Goals: ------ To understand the steps involved in installing an operating system, creating user accounts and installing add-on software. Summary: -------- Using the bochs(1) emulator, install NetBSD-4.0.1 on a disk-image. Due date: --------- 2009-02-28 10:59:59 Meta: ----- This assignment will be done on linux-lab.cs.stevens.edu. Feel free to discuss general problems and concepts on the mailing list or amongst yourself, but please do not share detailed step-by-step instructions. Each of you should learn to do this on their own. Details: -------- In this assignment, you will install the NetBSD operating system on a disk-image using an emulator. This will allow you to understand the basic concepts of operating system installation, user account creation and installing of add-on software. We will perform the installation by hand, as all installers (graphical or menu driven) necessarily hide all the steps from the user, yet it is important for System Administrators to understand *all* the steps involved in setting up a new host. In particular, you need to partition the disk, create the filesystems, install the boot blocks and extract the operating system sets into the new filesystem, then create accounts and configure a few things. Remember to document each step as you perform it (see below). Since you don't have access to actual hardware, we will use the bochs(1) emulator and a disk-image file instead of a hard drive. The bochs(1) emulator allows you to boot a "CD" or a "disk" from a file as if it was an actual physical host. Please refer to the documentation in the bochs(1) manual page (and the references manual pages) for details. You should start by downloading the example bochsrc configuration file from http://www.cs.stevens.edu/~jschauma/615A/bochsrc and saving it as ~/.bochsrc. Next, you will create a file which will be used as your hard drive. To do this, use the bximage(1) tool, creating a "flat" "hd" file of 1GB size. Save this file as ~/CS615A/netbsd.img. Your ~/.bochsrc is set up to look for that file in this location. The CD image from which you will initially boot is available to you at ~jschauma/CS615A/i386cd.iso and your ~/.bochsrc is already set up to find this location. Equipped with both this "CD" and your "hard drive" you should now be able to boot the emulator. You will need to have a display accessible for this, so either you need to have accessed linux-lab.cs.stevens-tech.edu via ssh and enabled X forwarding or you need to do this exercise locally in the actual lab, located in Burchard 120. The emulator is configured to boot from the disk, but since we have not yet installed anything, you need to tell it to boot from the CD instead: bochs -q 'boot:cdrom' In the new window, you will see a computer boot off the NetBSD installation CD, eventually yielding a blue screen with instructions on how to install the operating system. However, we will *NOT* be using the menu driven installer, and instead perform all necessary steps ourselves. Therefor, simply hit ^C when the blue install screen is displayed and you will be dropped into a regular terminal session, displaying sysinst terminated. # From here, you will need to configure your system using command-line tools. The CD containing the software to be installed is accessible via the "/dev/cd0a" device. Your disk image file to be used is accessible via the "/dev/wd0" device. You should partition your disk such that it contains a 750MB partition mounted under '/', 128 MB of swap space and the remaining disk space allocated to the '/home' partition. The filesystems for both the '/' and the '/home' partitions should be UFS2 aka FFSv2. You should install a full NetBSD installation *without* the X11 window environment. You should install the bootloader such that it uses a 20 second countdown. You should set the hostname of your virtual host to "-netbsd". You should set your host's root password to your username. After the operating system is installed, you should create two accounts on the host, one for yourself and one for me. Both accounts to be created should mirror the accounts we have on linux-lab.cs.stevens.edu. That is, both your and my account on your disk image should have the same UID, GID, gecos field, and shell as our accounts do on linux-lab.cs.stevens.edu. You can choose any password you like for your account. The password for my account should be my username. Both of our accounts should be able to su(8) to root. A second CD image is available via the "/dev/cd1a" device. This CD contains a number of binary packages suitable for installation in your virtual host. Using these packages, you should install the following additional software: - gnupg - perl After all is said and done, you should be able to boot into the OS via bochs(1) without any additional commands (ie "bochs -q"). The host should come up in full multi-user mode and let both of our user accounts log in. During all of this, please document how you did the assignment in detail, including all (successful) commands in a plain text file. Store this file on your virtual host in your user's home directory as "hw1.txt". Deliverables: ------------- A single file called "netbsd.img" found in the directory "CS615A" under your home directory on linux-lab.cs.stevens.edu. This assignment will be graded based on the disk image you create as well as the accompanying document outlining how you did the assignment. I will be booting your disk image and verify that everything is set up as described above. Hence, your disk image "~/CS615A/netbsd.img" needs specific permissions: chmod a+x ~ ~/CS615A/ chmod 604 ~/CS615A/netbsd.img References: ----------- You may wish to review the following documents and manual pages. However, there may be other commands you my need. - http://www.netbsd.org/docs/guide/en/ - MAKEDEV(8) - bochs(1) - bochsrc(5) - bximage(1) - chroot(8) - disklabel(8) - fsck(8) - fdisk(8) - installboot(8) - mbr(8) - mount(8) - newfs(8) - rc.conf(5) - pkg_add(1) - tar(1) - umount(8) - useradd(8)