|
Gary D. Brown |
CIS 50.71: Introduction to
UNIX |
Spring 2007
|
Section 5307
Offered Online
Overview | Syllabus
| Getting Started | Schedule
| Knoppix Instructions
For Labs 10 and 11, User Account Management and File Systems,
you may use Knoppix, a CD-only Linux installation
which starts directly from the CD. It does not require installation,
nor does it normally make any changes to the hard drive.
For complete information, please see the Knoppix
web site.
You may check out a Knoppix CD for use in the computer lab;
ask your instructor if you would like to obtain a CD to take home.
Alternatively, if you have a broadband Internet connection at
home, you can download a 700 MB "ISO" CD image file
and create a CD with a CD writer; see the Knoppix
web site for download locations. (Make sure you have
a broadband connection; by modem, 700 MB would take three days
to download!)
Running Knoppix
- Change your BIOS so that your computer will boot from CD.
If this doesn't work for you, you can start Knoppix from a boot
diskette. In MS Windows, you can create a Knoppix boot
diskette by launching the batch program \KNOPPIX\mkfloppy.bat
on the CD. Your instructor may have Knoppix boot diskettes
available as well.
- Place the Knoppix CD in the CD drive, and if necessary, the
Knoppix boot diskette in the diskette drive. In Windows,
the Knoppix CD may automatically open a browser window to the
CD's instruction set.
- Restart your computer.
- Knoppix starts with an opening screen with the prompt "boot:"
at the bottom. You have about 30 seconds to respond before
Knoppix automatically starts booting into its X-Windows KDE environment.
- If you have at least 90 MB of RAM, either wait 30 seconds,
or just hit the Enter key to run the full Knoppix
X-Windows environment. Some computers with less RAM may
still run X-Windows, especially if your computer has a Linux
swap partition that Knoppix can automatically use. Otherwise,
some applications may not work properly.
- However, even without enough RAM for X-Windows, you can still
run in text-only runlevel 3, which suffices for the lab exercises.
In that case, enter:
knoppix 3
- Knoppix runs through its boot sequence, including hardware
detection, and finishes with a root shell command prompt, like
this:
root@tty1[/]#
- If you see a message about an invalid video mode, either
just wait 30 seconds, or tap the Space bar.
If you see a list of video modes from which to choose, select
mode 0 as the most generally reliable.
- If you have compatible hardware, Knoppix will proceed through
its startup process, auto-detecting your hardware, and end up
in the KDE ("Kool Desktop Environment") graphical user
interface. Knoppix automatically logs you in as the restricted
user "knoppix" -- not "root"!
Therefore, you cannot perform functions that require root privileges,
including many operations in the File Systems and User Account
Management lab exercises. To get a root shell command prompt
so you can complete the labs, see "Getting
a Root Shell Command Prompt" below.
- Remember that all changes or additions you make to the file
system will disappear when you shut down or reboot!
Therefore, complete all of your work in one session.
If you have no Internet access as described below, you'll have
to take notes so you can answer the lab questions after you reboot
back to MS Windows.
- When you finish your work, reboot by entering:
shutdown -r now
or:
reboot
Knoppix will eject the CD when it completes its shutdown,
and prompt you to remove it before proceeding further.
- Remove the CD and diskette, if present, then press Enter
to restart.
Getting a Root Shell Command Prompt
- Getting a root shell command prompt:
If you have booted to the KDE graphical environment, you can
switch to a text-mode root shell by pressing Ctrl+Alt+F1.
When you see the text screen, press Enter to
display a command prompt, as shown above. To switch back
to KDE, press Ctrl+Alt+F5.
- Alternatively, you can launch a terminal window by clicking
on the "Konsole" icon on the task
bar at the bottom of the screen. The icon looks like a
video screen with a seashell in front of it.
- However, you don't get a root shell with Konsole: Knoppix's
KDE logs you in as the restricted user "knoppix", which
cannot access root-only files with normal commands. To
work around this, you can:
- Prefix every command line with the command "sudo
". For example, to copy the shadow file to
the /tmp directory, you'd enter:
sudo cp shadow /tmp
or:
- Change the root password and then get a root shell in Konsole
with the su - command:
- Switch to a text-mode root shell by pressing Ctrl+Alt+F1.
- Change the root password with the passwd command.
Because Knoppix provides only a temporary environment, you can
use anything, such as "123".
- Switch back to KDE by pressing Ctrl+Alt+F5.
- In a Konsole window, enter:
su -
- Enter your new root password.
- Proceed with your commands as root!
- See below for directions to copy-and-paste from Konsole to
your web answer form.
- About Internet Access: If you have
DHCP automatic Internet setup (as in the lab), you can (usually)
open web sites using a web browser in the KDE graphical environment,
including your instructor's web pages and web-based answer forms.
However, if you connect to the Internet by modem, Knoppix
has no automatic setup, and you will have to reboot to MS Windows
to open web pages.
If you can open the web-based answer form for your lab,
and you use Konsole as described in the previous step, you can
copy and paste terminal output from Konsole to the web form:
- Just drag the mouse cursor across the text you want to copy;
when you let go of the mouse button, Konsole copies the text
to the clipboard -- you don't have to activate a separate Copy
command.
- Then, paste the text into the desired blank on the web form
in the usual manner.
- To open a second root shell screen, press Ctrl+Alt+F2.
You can switch back to the first root shell screen with Ctrl+Alt+F1.
© 2003 Eric Skagerberg
Adjunct Instructor, Computer & Information Sciences Department
Santa Rosa Junior College, California |