Updated: 2012-01-29 01:33 EST
Your hard disk is very sensitive to shock. Don’t store it unpadded in the bottom of your backpack where it will hit the floor every time you drop your backpack. Keep it in a thick bubble wrap envelope or wrap it in your clothes. Store it in your locker when you aren’t using it and don’t carry it around all the time.
Your hard disk is sensitive to temperature changes. Keep it at room temperature. Don’t bring it into a warm room and power it on right after it has been stored outside in your freezing car overnight or in a cold backpack in winter. If you have a very cold hard drive, give it a few hours to warm up before turning it on.
Put your name on your caddy so we can contact you if you leave it behind in a lab some day.
Treat every virtual machine as you would a real physical computer. You must power on and power off your real and virtual systems in the correct order to avoid file system damage and locked VMware images:
Reverse these steps, bottom-to-top, to power on your systems.
If you resume a virtual machine in a different room than where you Suspended it, the resumed networking will likely be wrong - it will be the networking used in the room where you Suspended the machine. Under the Network menu on the top menu bar, you have to “Disconnect” and then reconnect the wired network to get networking functioning again.
Your Fedora 12 installation will at some point announce that dozens of security updates are available for your Linux system, as well as hundreds and hundreds of other non-security updates - over 900MB of updates in total. Do not install any updates to Fedora 12.
If you only use Fedora in your virtual machine, inside a NAT network, there is little risk of damage from an unpatched system. When you install a more current version of Fedora, that would be the time to also install the related updates.
To disable annoying update notices, you can right-click on the Update Icon in the top Fedora menu bar (red with exclamation point) and select Preferences and then set all the Update Settings to Never. (Don’t do this on the job! Ignore updates only for school use!)
Do not install any updates to Fedora 12.
Lock files are left behind when you fail to Shut Down or Suspend your virtual machines before closing VMware or before shutting down your Windows XP host. Locked virtual machines may be corrupted, since they did not shut down cleanly. To unlock your locked virtual machines:
D:
drive).lck
” and remove itAll your machines should be unlocked; some may be corrupted or damaged and may not work properly. Do not remove the lock files of running virtual machines. Follow correct shutdown procedures.
Normally you have to click in a Fedora window to make it accept focus (keyboard input), and that click also raises the window. You can change this behaviour so that simply moving the mouse into a window enables keyboard input without requiring any mouse click and without raising the window. This is called “focus-follows-mouse”.
To enable this wonderful feature, install both the “control-center-extra” and updated “nautilus” packages, either through the System|Administration|Add/Remove Software menu or by becoming “root” and using the command line:
su
yum install control-center-extra
yum install nautilus
exit
Answer Yes to all questions. You will have to enter your root password and confirm the installation of some other related packages. You must install both packages, otherwise your system will loop.
When installed, this package creates the menu System|Preferences|Windows. Select this Windows menu item to open the Window Preferences dialog box. Check “Select windows when the mouse moves over them”. You can leave “Raise selected windows after an interval” unchecked, unless you like that behaviour.
Now, just moving the mouse pointer into a window will enable keyboard focus. You don’t have to click in the window to type there any more. Wonderful!
When you first power on a VMware virtual machine on hardware different from that on which it was created, you may be asked if you moved or copied the virtual machine. The answer is simple: If this virtual machine is not a copy of an existing machine, reply moved it (this is the usual case). If you actually did make a file copy of the virtual machine file and power on the new copy, reply copied it.
A linked clone/snapshot links to the base version using a host-specific absolute pathname that doesn’t work directly on alternate architectures, such as when moving from a Windows host O/S to a Linux host O/S. You can still use the clone/snapshot, but you have to manually browse to the new absolute pathname in the new O/S when booting the system.
Using VMware to Suspend a machine is faster and more convenient than using the menus to shut it down. One time you should not use Suspend is if you are going to restart the machine on a different processor.
VMware gives a warning about problems if the processor vendor changes when you restart a machine. Avoid restarting a Suspended machine on a different processor. If you know you’re moving to a different processor (e.g. moving to home from school or vice-versa), shut down your virtual machines instead of suspending them.
You can never recover or find out an existing password from Linux. All you can do is set a new password to replace the old one.
Since the default VMWare mouse escape (Hot Keys) starts with CTRL+ALT
, you may need to change this in the VMWare Edit|Preferences|HotKeys dialog before the following instructions using CTRL+ALT+F2
can work. I recommend changing the Hot Key Combination to Custom and using CTRL+SHIFT+ALT+WIN
in “Down” mode.
If you forget the password of your ordinary (non-root) account, switch to a text console (e.g. use CTRL+ALT+F2
), log in as the root user and use the command passwd user
where user
is the account for which you want to set a new password. (You cannot log in as root via the Fedora GUI; you must switch away from the GUI to use a text console.)
After you have set the new password, log out from root by typing exit
, switch back to the Fedora GUI using either CTRL-F1
or CTRL-F7
, then log in as user
using the new password. Remember it!
If you forget the password of your root account, you have more work to do. Read this whole section through once before you begin.
To recover the root account, you have to Shut Down and restart Linux in single-user mode. Look for the “I forgot my password” PowerPoint file on Blackboard, which has pictures and is mostly right but not completely correct, or follow these directions here which are definitely right (Fedora 12, September 2011):
#
”).passwd root
command to change root’s password.reboot
at the prompt.You can also change any other user account password as root in single-user mode, using the same passwd user
syntax. See the man page for passwd.
Don’t forget your passwords!
You can take your caddy home (or connect it to your laptop) and plug it in as a second external hard disk, either ESATA or USB. You can then open your virtual machines and run them using either the free VMware Player (from http://vmware.com/
), or the full VMware Workstation application.
The version of VMware Workstation pre-installed in your Windows XP host O/S this term is already licensed for a year. (You can renew the license via the VMware Web Store, mentioned below.) You only need a license for the second copy of VMware Workstation that you download at home (or on your laptop).
You can get an updated license for VMware Workstation by following the directions you got in a recent email message sending you to the VMware Web Store at onthehub.com
. (You can also get to this store via the Drivers and Downloads menu at http://cstech/
.) You do not need Workstation to run your existing virtual machines - the free VMware Player application will do that. You need a licensed copy of VMware Workstation only to modify or create new virtual machines.
For home or laptop use, use your caddy as an additional external hard disk and connect it to your existing Linux/Windows/Mac computer or laptop using an ESATA or USB cable. In most cases you won’t even need to reboot your system when you connect the external disk; the disk will be recognized when you plug it in.
Do not use your caddy drive as a boot drive (main disk) other than in the Algonquin caddy labs T108, T110, T111, T113, T114, T115, T126. Booting from the caddy anywhere else will confuse the Windows XP host operating system (because the hardware will be different), and it may lock you out and require you to re-image your O/S partition over again to recover.
Make sure your Networking is working before you configure a network printer. (Check the Network icon in the Linux top menu bar, and make sure you can use Linux Firefox to open a Google window inside Linux.) Installing a network printer requires network access.
Athough the printer in T126 is a Lexmark model Optera T632, the Lexmark E220 driver is available and works, so we use that below.
Note that the printer will only work if your Fedora Linux system is fully connected to the network, as indicated by the Network icon in the Linux top menu bar. Be careful about queueing multiple print jobs with the network disconnected - all those print jobs will rush to the printer when the network becomes active. Go to System -> Administration -> Printing and right-click on lp126 and select “View Print Queue” to see and delete queued print jobs you don’t need. Once all the print jobs go to the printer, you have to physically go to the printer and use the front panel buttons to cancel the print jobs.
Your first lab in this course contains printed instructions on troubleshooting a caddy that does not appear to be working properly. See also troubleshooting help on the http://cstech/
web site. (The cstech
web site only works properly inside the College or through the College VPN. You can find a partial mirror of some of the information here.)
If your caddy doesn’t work on a particular machine in a lab (i.e. your disk drive is not visible during POST, or the blue LED light never blinks during POST to indicate access to the hard disk, or the blue LED is constantly blinking even when the computer is off), follow these steps:
If your caddy still doesn’t work, take your caddy apart, unscrew, remove and re-insert the hard drive, making sure to push it firmly against the circuit board for a good connection. There should be no space between the hard disk and the circuit board. Screw it down firmly.
Many student drives shift during term and need to be re-seated inside the caddy enclosure.
If after all the above attempts you still can’t get the drive to work properly, go to a working machine or an open access centre and bring up the CSTECH problem report form and submit a problem report: http://cstech/
Under “Room Number:” either select the room you are in from the drop-down menu or use “General Inquiry” if you are in a different room. If you are in a different room, remember to include the room number in the description of the problem report so that the technician can come to you.
This CSTECH report will go immediately to the hardware people via pager, and if they are on duty they will come to your room right away to help you diagnose the problem. You can also try visiting the hardware lab in T110, though paging through the reporting form is probably faster.
You cannot return your drive or caddy to the campus store as defective until it has been signed off as defective by our hardware technicians. You must follow the above steps before you can get a replacement hard drive or enclosure.
The UMASK value is a mask. It turns off permissions. Do not subtract a umask value from permissions; use it as a mask. For example: default 666 with umask 002 gives 664 but default 666 with umask 001 gives 666 (no change!) and default 666 with umask 007 gives 660.
In 2011, many distributions of Linux are still in a transition from the old static run-level system sysvinit inherited from System V Unix™ to the new event-driven upstart system (http://en.wikipedia.org/wiki/Upstart
) or to the newer dependency-based systemd system (http://0pointer.de/blog/projects/systemd.html
and http://0pointer.de/blog/projects/why.html
).
The old System V run-level system had a small number of system states, called run levels, each of which had an ordered list of processes running. Switching between states stopped and started processes in a given order. You couldn’t have dependencies such as “start this process whenever that process starts” or “start this process when this hardware changes”. The new upstart and systemd systems can handle these things, while retaining backward-compatibility with the legacy System V scripts.
While Linux is in transition, upstart emulates the old run levels using events and systemd extracts dependency information from the LSB (Linux Standards Base) headers in the old sysvinit files under /etc/init.d
. Many programs have not yet been converted to upstart or systemd and still use a legacy run-level start script. Fedora moved to upstart with Fedora 9, then to systemd with Fedora 15.
To get a longer pause at the VMware BIOS boot menu, edit (using Notepad) each of your VMware *.vmx
configuration files and add this line at the bottom: bios.bootDelay = "60000"
The mouse does not work on any BIOS/POST screens or GRUB (boot menu) screens. First click in the virtual machine window (to set keyboard focus there), then use the keyboard arrow keys to change selections and ENTER to proceed.
Many modern hard disks have 4KB blocks, not the old 512-byte blocks, but Windows versions prior to Vista(?) don’t handle these disks properly, leading to extremely slow access times. You need to re-align your 4KB-block disk to make it usable under old versions of Windows, especially Windows XP. See this link: http://support.wdc.com/product/downloadsw.asp?sid=128
The hardware kits supplied to students have Seagate disks that claim to have alignment software built into the disk.
You must have a valid and current anti-virus installed in any Windows systems used on Campus. Your caddy Windows XP comes with ESET. You can update your ESET license via the instructions posted under the Computer Systems Technician course on Blackboard, under “ESET Instructions” in the left side-bar. The update file name is the same for Winter 2012 as for Fall 2011:
12W_H_0150X_WO_F_A_01_01 Computer Systems Technician
Eset-Fall-2011-Update ver.6400-20110822-students.xml
Here is how to unscramble a terminal emulator that is stuck in graphics character set mode, where you will see many special and line-drawing characters instead of your typed text.
Most terminals and terminal emulators can be switched into a “graphics” mode by sending them a special sequence of escape characters. Sometimes this happens when you don’t want it, e.g. you display a binary format file on your screen by mistake. This might happen after you accidentally use “cat” to send a non-text file to your terminal screen, e.g. “cat /bin/ls” or “cat file.gz”.
To restore your terminal (you may not be able to read what you are typing!):
$ setterm -reset
$ reset
$ echo ^V^O
(that’s CTRL-V CTRL-O)The above should switch your terminal emulator back to its normal character set. Practice this now, in case it happens to you!
You can install Linux natively into an empty partition on your hard disk, if you have room. (The school disks do not have any spare room.)
When you install Linux directly onto your disk, the installation process will detect the hardware that you have at the time of installation and set up Linux to use that exact hardware (video card, monitor, ethernet card, sound card, etc.). If you move your disk to a machine that has different hardware, the Linux image may not even boot properly due to the change in hardware. Or, the boot process may cause Linux to reconfigure for some of the new hardware, resulting in an image that won’t work when you move the disk drive back to the original hardware.
Some distributions even install processor-specific optimizations at install time, meaning that your disk can’t be moved between Intel and AMD processors!
Unless you specifically use a version of Linux that reconfigures itself for new hardware every time you boot it (e.g. a Live CD), a Linux system installed natively on a partition should always be booted with the same hardware attached. Normal Linux hard-disk installations don’t expect to have big hardware changes between reboots.
If you run Linux in console mode (no X11 GUI), you can usually boot Linux on any hardware; however, you may have work to do getting the rest of the new hardware to function properly (e.g. getting networking to use different network hardware).
Once Linux is installed natively on disk, it doesn’t like to be moved to new hardware. Use virtual machines if you intend to move around.
You can create a file log of everything you type and see on your terminal screen by using the “script” command and giving it as an argument the name of a file into which it will record your session:
$ script raw.txt
Script started, file is raw.txt
$ date
Thu Sep 23 02:19:59 EDT 2004
$ echo hi there
hi there
$ who am i
idallen pts/1 Sep 19 20:07
$ exit
Script done, file is raw.txt
$
$ col -b <raw.txt >saveme.txt
After you exit the shell started by “script”, the file “raw.txt” will contain a raw session log containing everything that was sent to your screen, printable or unprintable, including all your backspaces and carriage-returns. Filtering is usually needed.
The command “col -b” is useful for filtering out backspace and carriage-return characters from a recorded script session:
$ col -b <raw.txt >saveme.txt
Note: The col command only reads standard input; you cannot pass it file names on the command line. RTFM
Warning: If you use a full-screen editor such as VIM inside a screen session (not recommended!), the screen output will be a huge mess when recorded in the session file due to all the unprintable characters that VIM uses to draw characters on your screen. Make sure you edit out this mess before you print the file! Don’t use full-screen editors inside a “script” session if you can avoid it.
The “script” command has an option to append to a session file instead of overwriting it. (RTFM)
See also the BUGS section of the “script” manual page.
If you find yourself unable to access your home directory, with permission errors such as the following:
$ ls
ls: .: The file access permissions do not allow the specified action.
You have probably removed either read or execute permissions from your directory. To restore these permissions for your userid, use this:
$ chmod u+rwx "$HOME"
Details on the chmod command are available in the Unix manual pages. The environment variable $HOME expands to be your home directory.
You must be able to read your directory, to see what file names are in it. You must have execute permission on a directory to pass through it to any of its contents. You need both read and execute for “ls .” to work.
C programmers will recognize that the line end character for Unix text files is ‘’ - an ASCII newline (LF) character. (See “man ascii” for details on the ASCII character set.)
Unix commands that count characters in files and lines will also count the newline character at the end of every line:
$ echo hi | wc -c
3
$ echo hi >out ; echo ho >>out ; wc -c out ; ls -l out
6 out
-rw-r--r-- 1 idallen idallen 6 Jan 22 03:44 out
Microsoft operating systems use two characters at the end of every line of text - the LF is preceded by an ASCII carriage return (CR). A text file containing the word “hi” contains four characters: hi
A text file written on Unix contains only linefeed (LF, “”) characters at the ends of lines; Windows expects lines in text files to end in both a carriage-return (CR, “”) and a linefeed character. This may result in “staircasing” text if you send a Unix text file to a Windows printer from inside some Windows programs (e.g. Notepad).
Apple computers (e.g. Macintosh) use the single character CR instead of LF at the end of every text line.
You can tell the VIM editor to read and write text files in different formats using the “fileformat” VIM variable:
:set fileformat=unix
:set fileformat=dos
:set fileformat=mac
The Unix sort command sorts lines by character value, not by numeric value. Explain the difference in output of the two “sort” pipelines, below.
(The translate command “tr” is turning blanks into newlines so that the numbers appear on separate lines on input to sort; sort only sorts lines.)
$ list="1 11 2 22 3 33 4 44 3 33 2 22 1 11"
$ echo "$list"
1 11 2 22 3 33 4 44 3 33 2 22 1 11
$ echo "$list" | tr ' ' '\n'
1
11
2
22
3
33
4
44
3
33
2
22
1
11
$ echo "$list" | tr ' ' '\n' | sort
1
1
11
11
2
2
22
22
3
3
33
33
4
44
$ echo "$list" | tr ' ' '\n' | sort -n
1
1
2
2
3
3
4
11
11
22
22
33
33
44
Why is the sort output different in these two examples? (RTFM)
Author:
| Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada
| Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/
Plain Text - plain text version of this page in Pandoc Markdown format
Author Ian! D. Allen