4 - coLinux -Debian

Introduction

  • I run CYGWIN on all my Microsoft Windows PCs (desktops and laptops) and a 10G Debian Linux system on my Microsoft Windows-7 Pro PC. I also use WSL on Microsoft Windows-10.
  • The Debian system is built using the virtual-machine product coLinux.
  • This page documents my coLinux and Debian system setup instructions.
  • Note to self: My Debian network and file-system configuration files I may need to include below.
    • FILENAME ........... LOCATION
    • resolv.init ........ /etc in Debian FS
    • resolv.conf.init ... /etc in Debian FS
    • hosts .............. c:\windows\system32\drivers\etc
    • pidfile.txt ........ c:\colinux
  • I have a wireless router at home and at work, as well as a cabled LAN.
  • My home router is set up with a restricted IP range, thus the change to the IP addresses

in the coLinux config file (interfaces).

  • More details on these files later in the setup process.
  • Note: Ensure that you have enough free disk space before you start this process.
    • I use a 10G to 30G Debian file system and a 512M - 2G swap file.
    • The disk format must be NTFS, not FAT32.
    • I recommend that in addition to the 10.5G to 32G needed above that you still have 20% free space for optimum disk performance.
    • Also, defragment/compact the hard drive before you start this process.
  • NOTE:
    • These instructions are for coLinux 0.7.3 and Debian 4.0
    • For coLinux 0.7.5 and Debian 4.0 there are some changes as noted at the end of section 12.
    • For coLinux 0.7.5 and Debian 5 (Lenny) there are additional notes in the text below.


top

Get a copy of coLinux

  • Connect to the coLinux project: coLinux VM Software
    • On the coLinux Main Page, under the heading: "Current Versions", use the boxed link: Download to get the latest stable version

or

    • On the coLinux Main Page, use the link: coLinux Official Downloads
    • Select the latest stable version listed on the page.
  • I save the self-extracting exe file to the directory: c:\colinux
  • c:\colinux is the default directory used in the extensive sets of instructions found on the coLinux site, and thus it makes life a little easier if you use it.


top

Install coLinux

  • Run the self-extracting exe file that you downloaded in step 1 above.
    • You will be prompted to select the components to install.
    • Select all the components.
  • I include the "Root Filesystem image Download".
  • If you do not download the root file system image now, don't worry, you can download it later from the coLinux project on SourceForge.net
  • If you download the root filesystem image manually, you can choose from many releases besides the default.
  • http://gniarf.nerim.net/colinux/fs has several preloaded root file systems of various sizes up to 10G.
    • on the "Choose Install Location" window, change the "Destination Folder" to: C:\colinux
    • on the "Get winPCAP" window, select one of the locations and download winPCAP
    • Save the winPCAP file to c:\colinux directory
    • Run the winPCAP install, taking the defaults.Yes, you are installing winPCAP in the middle of the coLinux install.
    • NOTE: (the following has NOT happened in the latest releases of wintap)
      • In the TAP-Win32 portion of the install process, the install screen may lose focus

and get hidden behind other windows.

The install process looks like it is hung up.

      • Use ALT-TAB repeatedly until you find the hidden window.
      • The hidden window is a prompt screen that says that you are installing an unsigned Windows driver.
      • Click on the "OK" button to install the driver.
      • For more detail view: http://colinux.wikia.com/wiki/TAP-Win32_Adapter_V8_(coLinux)
        • on the "Obtain a colinux root file system image" window, select Debian.
        • Select/Click the "Install" button


top

Unzip Debian File System File

  • Put the Debian file system in the directory c:\debian.

It's not required, but I find that Debian maintenance and updates are a little

easier when the coLinux files are separated from Debian file system artifacts.

  • Unzip the Debian file system file. I use 7 Zip Compression to handle my compress/decompress needs.

It's free, and works on all the file types that I've had to deal with.


top

Re-size Debian system file

  • I resize the root file system from between 10G to 30G, depending on my intended usage.
  • I use the following instructions from the colinux.wiki.com: Expanding the Root File System
  • I use the instructions in this section of the wiki page: "Copy whole filesystem into new image"
  • The process took about 45 minutes to complete.
  • I then make a backup of this file system via 7-Zip. It easier to recreate via unzipping that doing all this setup.
  • NOTE: At the end of the last step of this setup, I shutdown coLinux and remake the 7-Zip file as a backup of the full install.


top

Create the swap file.

  • The suggested size for the swap file is the same as the system memory.
    • Download a swap file from Swap Files for coLinux
    • Save the file in the same directory as the Debian file system file (c:\debian)
    • Uncompress the downloaded file.
    • Re-size the file if needed.
  • See step 4 for instructions to unzip the file or if you need to resize the swap file.
  • How to Create Swap File is also a good reference for creating a swap file.
  • I like to use this section of the page: "Using Windows-builtin tool fsutil (XP and later Only)"


top

Tailor example.conf

  • You can download debian_1.conf or edit the example.conf file in the c:\colinux directory.
  • I keep the original example.conf, so I make a copy of it and name it like: debian_1.conf
  • My version of the file is shown below and I have included comments where I made changes
  • to the original example.conf.
  • My comments start with: # FOR ???: Example: # FOR cobd0: CHANGED THE ..
# This is an example for a configuration file that can# be passed to colinux-daemon in this manner: # # colinux-daemon @example.conf # # Note that you can still prepend or append configuration and # boot parameters before and after '@', or you can use more # that one '@ to load several settings one after another. # # colinux-daemon @example.conf @overrider.conf mem=32 # # Full list of config params is listed in colinux-daemon.txt. # The default kernel kernel=vmlinux # File contains the root file system. # FOR cobd0: CHANGED DIRECTORY FROM c:\colinux TO c:\debian AND USED THE REAL FILE SYSTEM NAME# Also has corresponding entry in Debian /etc/fstab cobd0="c:\debian\Debian-4.0r0-etch.ext3.10gb-root"# FOR cobd1: CHANGED DIRECTORY FROM c:\colinux TO c:\debian AND USED THE REAL SWAP FILE NAME # Also has corresponding entry in Debian /etc/fstab cobd1="c:\debian\swap_2g" # FOR cobd2: CHANGED DIRECTORY FROM c:\colinux TO c:\debian AND USED THE REAL FILE SYSTEM NAME # This is used for a second extra Debian file system. Otherwise it is commented. # Also has corresponding entry in Debian /etc/fstab # cobd2="c:\debian\Debian-4.0r0-etch.ext3.10gb-xtra" # FOR cobd4: I USE TO POINT TO MY DVD/CD DRIVE. OTHERWISE COMMENTED. # Also has corresponding entry in Debian /etc/fstab cobd4="\Device\Cdrom0" # Tell kernel the name of root device (mostly /dev/cobd0, # /dev/cobd/0 on Gentoo) # This parameter will be forward to Linux kernel. root=/dev/cobd0 # Additional kernel parameters (ro = rootfs mount read only) ro # FOR cofs00: ADDED cofs00 SO DEBIAN WILL BE ABLE TO ACCESS MY WINDOWS C: DRIVE # Also has corresponding entry in Debian /etc/fstab cofs00="C:\" # FOR cofs01: ADDED cofs01 SO DEBIAN WILL BE ABLE TO ACCESS MY WINDOWS F: DRIVE. # Also has corresponding entry in Debian /etc/fstab file # Don't have a F: drive? then delete the line or make it a comment. # This could be any other "local"/USB hard drive on your PC: D, E, ... Z # cofs01="F:\" # Initrd installs modules into the root file system. # Need only on first boot. initrd=c:\colinux\initrd.gz # Maximal memory for linux guest # FOR mem: Set memory size to 512 mem=512 # Select console size, default is 80x25 cocon=120x24 # Slirp for internet connection (outgoing) # Inside running coLinux configure eth0 with this static settings: # ipaddress 10.0.2.15 broadcast 10.0.2.255 netmask 255.255.255.0 # gateway 10.0.2.2 nameserver 10.0.2.3 # FOR eth0: uncomment eth0 and added port forwarding for ssh port 22 # Also has corresponding entry in debian /etc/fstab file eth0=slirp,,tcp:22:22 # Tuntap as private network between guest and host on second linux device # FOR eth1: uncomment eth1 # Also has corresponding entry in debian /etc/fstab eth1=tuntap # FOR eth2: comment a placeholder for pcap-bridge # Also has corresponding entry in debian /etc/fstab #eth2=pcap-bridge,"COLINUX",, # Setup for serial device #ttys0=COM1,"BAUD=115200 PARITY=n DATA=8 STOP=1 dtr=on rts=on" # FOR exec0: I leave as a comment and start the Xming Xserver manually. # Then I can use it for other X-Windows services besides this Debian instance. # Also, if I shutdown Debian (halt), Xming stays put for my other uses. # Run an application on colinux start (Sample Xming, a Xserver) # exec0=C:\Programs\Xming\Xming.exe,":0 -clipboard -multiwindow -ac"


top

Create Debian boot shortcut

  • On your Windows desktop, or in some other folder, create a shortcut that you can use to start the Debian system.
  • right mouse click on a clear space on the Widows desktop
  • mouse over (move the mouse pointer over "New" and wait for the drop-down list.
  • click/select: Shortcut
  • in the input field enter: c:\colinux\colinux-daemon.exe @c:\colinux\debian_1.conf
  • click the "Next" button
  • enter a name for the shortcut like: Start Debian
  • click the "Finish" button


top

Test Debian

  • Double click on the Debian shortcut on your Windows desktop.
  • If Debian boots OK, then the userid is: root
    • For Debian 4.0 (etch) the password is: root
    • For Debian 5.0 (Lenny) the password is: colinux (see the file: c:\debian\README.txt)
  • If Debian doesn't boot OK, and the window closes then:
    • go to a Windows command prompt
    • cd to c:\colinux
    • run the command line in step "Create Debian boot shortcut".
  • The most probably error is that the root file system in the debian_1.conf file is not specified correctly.
  • (i.e., the debian_1.conf file specifies the wrong directory and/or file name).
  • For other errors refer to:
    • the coLinux readme.txt file (C:\coLinux\README.txt)
    • the coLinux Main Page to find help and/or do an internet search.
  • To shutdown Debian, use the command: halt
  • To reboot Debian, use the command: reboot

top

Configure /etc/fstab file

fstab

  • Edit /etc/fstab so that it matches the entries in debian_1.conf file.
  • This procedure will allow Debian to access the Windows C:\ drive, and the cdrom
  • enter command: cd /etc
  • enter command: nano fstab
    • nano is an easy editor. "Play" a bit with it on a test file to get use to its features.
  • using nano, modify fstab to look like the following:
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/cobd0 / ext3 noatime,errors=remount-ro 0 1 /dev/cobd1 none swap sw 0 0 # /dev/cobd2 /mnt/10g ext3 noatime,errors=remount-ro 0 1 /dev/cobd4 /cdrom iso9660 defaults,noauto /dev/cofs00 /mnt/cdrive cofs defaults 0 0 # cofs01 /mnt/fdrive cofs defaults 0 0
  • Notes:
    • /dev/cobd2 is commented but sometimes I have a second Debian file system.
      • This is the connection that I use for the second file system.
    • cofs01 is commented. This is the connection that I use for other local/USB Windows drives.
      • Notice that it does not have the /dev prefix. That is what it took to make it work.
      • I would have thought that it should have been: /dev/cofs01, but it wasn't. Perhaps a defect?


top

Activate swap file

  • Reboot Debian to test the activation of the swap file.
    • Use the command: reboot
      • or halt Debian via the halt command and restart Debian via the Windows Debian shortcut icon created in step "Create Debian boot shortcut"
    • The swap file is probably active if the above procedures were followed.
  • To check to see if the swap is being used:
    • enter command: top
    • The top running processes will be displayed. A display like the following should be shown:
top - 13:11:10 up 1 min, 1 user, load average: 0.07, 0.05, 0.01 Tasks: 27 total, 1 running, 26 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 516296k total, 20084k used, 496212k free, 976k buffers Swap: 2305016k total, 0k used, 2305016k free, 9932k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2218 root 15 0 2232 1080 856 R 0.3 0.2 0:00.71 top ... ...
  • Notice that the swap space usage is shown.
  • If the swap space is not shown then:
    • enter command:
mkswap /dev/cobd1
    • enter command:
swapon -a
  • Check the swap usage again:
    • enter command:
top


top

Attach and mount Windows C:\ drive

  • This is a one-time procedure per system build, unless you add/remove more Windows drives.
    • enter command:
cd /mnt # cd to the /mnt directory
    • enter command:
mkdir cdrive # this creates /mnt/cdrive to match the mount point name in the fstab file for /dev/cofs00
    • enter command:
cd / # cd to the system root directory
    • enter command:
ln -s /mnt/cdrive /c # create a symbolic link from /mnt/cdrive to the root directory and name in: /c

You may access the Windows C:\ drive via /c

    • enter command:
mount -a # mount all unmounted devices in fstab.

Windows C:\ drive is now available.

  • Note:
    • Files on the Windows C:\ drive can be read by any Debian user.
    • Pending creation of other user accounts and group assignments only the user root can update files on the Windows C:\ drive.
    • Be careful here!
      • It is possible to corrupt the Windows file system.
      1. Debian and cofs are not guaranteed to be error free.
      2. Do NOT update the same file(s) or access the same devices (cdrom, dvd) from Windows and Debian simultaneouly.
  • Three (3) little words for you: BACKUP, BACKUP, BACKUP!

top

Configure /etc/network/interfaces - Part 1

interfaces

  • Test the internet connection:
    • enter command: apt-get update
      • If all is well, then you should get messages like the following:
Get:1 http://security.debian.org etch/updates Release.gpg [189B] Get:2 http://ftp.debian.org etch Release.gpg [386B] Get:3 http://ftp.debian.org etch Release [58.2kB] Get:4 http://security.debian.org etch/updates Release [37.6kB] Ign http://security.debian.org etch/updates/main Packages/DiffIndex Ign http://ftp.debian.org etch/main Packages/DiffIndex Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex Ign http://security.debian.org etch/updates/main Sources/DiffIndex Ign http://security.debian.org etch/updates/contrib Sources/DiffIndex Ign http://ftp.debian.org etch/main Sources/DiffIndex Get:5 http://security.debian.org etch/updates/main Packages [403kB] Get:6 http://ftp.debian.org etch/main Packages [5620kB] Get:7 http://security.debian.org etch/updates/contrib Packages [8934B] Get:8 http://security.debian.org etch/updates/main Sources [62.2kB] Get:9 http://security.debian.org etch/updates/contrib Sources [1283B] Get:10 http://ftp.debian.org etch/main Sources [1656kB] Fetched 7847kB in 1m10s (111kB/s) Reading package lists... Done
  • If the connection to the internet is OK, then you can probably skip to the next step.
    • I had to configure the interfaces file a bit for it to work at home and in the office.
    • That configuration is shown in this section.
  • In Windows, open a DOS Window:
    • "Start"; "Run.."; enter "cmd" in the "open:" field; press/click: OK
  • in the DOS window, enter command: ipconfig /all
    • You need to record/write down some information from this screen
    • The ipconfig data for my PC is like the following:
Windows IP Configuration Host Name . . . . . . . . . . . . : pslaptop Primary Dns Suffix . . . . . . . : na.phs.com Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : na.phs.com phs.com Ethernet adapter coLinux1: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : TAP-Win32 Adapter V8 (coLinux) Physical Address. . . . . . . . . : 00-FA-A1-2C-12-AB Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Autoconfiguration IP Address. . . : 169.254.101.147 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Media disconnected Description . . . . . . . . . . . : Broadcom NetLink Gigabit Ethernet Physical Address. . . . . . . . . : 00-16-A1-CA-5B-DF Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : comcast.net. Description . . . . . . . . . . . : Broadcom 802.11a/b/g WLAN Physical Address. . . . . . . . . : 00-2B-31-13-4D-FA Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 201.155.124.23 201.155.112.23 68.87.73.242
  • The coLinux1 connection was originally named: Local Area Connection 2
  • I renamed it to coLinux1 to reflect "coLinux connection 1"
  • I went to "Network Connections" to rename the connection.
    • Make note of the IP address of coLinux1.
    • It this example it is: 169.254.101.147
    • If you use PuTTY to create a session to this Debian system, this will be the IP address to use.
  • -------------------
  • Notes for colinux 0.7.5 and Debian 4.0:
    • I had to use the IP address: 127.0.0.1 for PuTTY.
    • Also, per the coLinux 0.7.5 README.txt file in c:\coLinux directory, I did the following:
      • "Remove all entries from /etc/udev/rules.d/z25_persistent-net.rules"
      • I actually made a backup first and then deleted all entries in the file.

top

Configure /etc/network/interfaces - Part 2

interfaces

  • I am not a networking expert.

I can not explain the details of how each of these configuration settings work.

There is much documentation at the coLinux site that can assist you in understanding network operations to a greater degree.

I know that this setup works for me.

  • My particular router is set up to limit available addresses and ports, for increased security.
  • The default IP address in the interfaces file for the tap-win32 connection (eth1) is as follows:
# Second network (tap-win32) auto eth1 iface eth1 inet static address 192.168.0.40 netmask 255.255.255.0 gateway 192.168.0.1
  • Address 192.168.0.40 is not valid in my set up.
  • As reported in section 12 above, the Wireless Network Connection IP address is: 192.168.1.101
  • I updated eth1 part of the file to read as follows:
# Second network (tap-win32) auto eth1 iface eth1 inet static address 192.168.1.101 netmask 255.255.255.0 gateway 192.168.1.1
  • The address, netmask, and gateways values are all from the Windows ipconfig command.

note to self: /etc/resolv.conf but later, as many may not need it yet


top

Update to latest release

  • At the Debian command prompt enter: apt-get update
    • A message about using "--fix-missing" may be at the end of the download file messages
    • If so, then enter command: apt-get --fix-missing update
  • At the Debian command prompt enter: apt-get upgrade
    • When this is finished Debian should be up-to-date.
    • Every week or so you may want to run the update and upgrade commands to get the latest fixes and updates to installed packages.


top

Install "base" Packages ssh, xterm, vi, and ksh

  • My "base" packages are:
    • ssh: for secure communications with other systems and to this system
    • xterm: because I like xterm better than straight telnet. Also, some ssh features (e.g., ssh-agent) need xterm session capabilities.
    • vi (vim): because I like vi/vim, but nano and other packages are available, like nedit (also a favorite).
      • For vi, I use vim, via the package "vim-full", but the package "vim" is adequate.
    • ksh: because I prefer ksh over bash, but you need not use ksh, bash is very fine
  • The install routine may prompt: Do you want to continue [Y/n]?
    • Enter y or just press return as Y is the default
  • Install each package by using the following form of the APT command:
apt-get install <package name>
  • so, for ssh the command is:
apt-get install ssh
  • Repeat for each package: xterm, vim or vim-full, and ksh


top

Change root password

  • I change the root password to avoid compromising my system.
  • The decision is yours, but if you haven't already done so, now is the time to become security minded.
  • There are more system intrusions and methods to do so than you can imagine.
  • Firewalls and anti-virus software are helpful, but do your part by closing the doors, windows, and using good locks (passwords and encryption methods).
  • A good password uses 3 of the following: upper-case letters, lower-case letters, numbers, and special characters.
  • Many people recommend at least 6 characters for passwords, but I recommend at least 12 characters.
  • The package "apg" can be used to create a list of new passwords. You know how to download packages.
  • To change the password:
    • pick, build, or otherwise create the new password.
    • Make sure that you can remember the password.
    • If you must write it down, then lock the password away from your PC.
    • If you store the password in an electronic file, be sure to encrypt the file.
    • Of course now you have another password/encryption key to remember. It is never ending.
  • enter command: passwd
  • at the prompt, enter the new password
  • at the prompt, reenter/confirm the new password


top

Make ksh the default shell

  • Note: I prefer to use ksh.
    • If you would rather use bash then skip this step.
    • However, some custom commands/functions/utilities will NOT work in bash!
  • enter command:
cd /etc # go to the /etc directory
  • enter command:
cp -p passwd passwd.sav # save a copy of passwd file
  • edit file: passwd # I use vi/vim
vi passwd - for the user root, change bash to ksh

save and exit (:wq in vi)

  • enter the command:
exit # to log off and get new login prompt
  • login as root
    • You will now be using ksh as the default shell.
  • Optional: Make ksh the default shell when creating new users
  • If you want all users to have ksh as the default login shell, then do this procedure,
    • else you can specify the shell as an option to the "adduser" command or you may manually alter the users entry in the /etc/passwd file.
  • To change the default shell for all new users:
    • enter command:
cd /etc
    • edit file: adduser.conf
      • vi adduser.conf
      • change the following line:
        • DSHELL=/bin/bash

to

        • DSHELL=/bin/ksh
    • save and exit the editor
  • Note: This procedure works for other shells. Just download and install them first.


top

Install "olb" tar file utilities

  • Note: The "olb" utilities are written for ksh.
  • Some of these will NOT work in bash or other shells.
  • Please send me any updates if you modify them for bash or another shell (be sure to add your attribution information) and I'll make a bash version of the "olb" tar file for distribution.
  • download file: olb.new.20140722.212131.tar and save it in c:\debian
  • boot Debian, if needed (use the Windows shortcut created in step "Create Debian boot shortcut")
  • enter command:
mkdir -p /opt/local/bin
  • enter command:
cd /opt/local/bin
  • enter command:
cp -p /c/debian/ccl_olb.20101229.160858.tar .
  • enter command:
tar -xvf ccl_olb.20101229.160850.tar
  • See page 2 - CYGWIN Sections B2 and B3 for a synopsis of some of the utilities in /opt/local/bin.
  • These utilities will not be fully functional until you complete the next step.


top

Use custom .profile

  • Note: These commands are written for ksh.
  • Save a copy of the original .profile and copy .profile, .myprof, and .myoptions to the home directory
  • enter command:
cp ~/.profile ~/.profile.sav
  • enter command:
cd /opt/local/bin
  • enter command:
cp .profile ~
  • enter command:
cp .myprof ~
  • enter command:
cp .myoptions ~
  • enter command:
cd
  • enter command:
. ./.profile
  • You should now have a custom prompt, functions, aliases, and exported variables
  • To see any new functions enter command:
functions
  • To see any new aliases enter command:
a # i.e., alias | more

To see any new variables enter command:

env | less
  • Optional: Install .profile, .myprof, .myoptions files automatically when creating new users
    • If you want all users to automatically have the custom .profile, .myprof, and .myoptions files,
    • then do this procedure, else the files can be copied manually to the users home directory.
  • To have the users home directory popuated when a user-id is created:
    • enter command:
cd /opt/local/bin
    • enter command:
cp .profile /etc/skel
    • enter command:
cp .myprof /etc/skel
    • enter command:
cp .myoptions /etc/skel
  • Now when a user is created via the adduser command, their home directory will be populated with the files from the /etc/skel directory.


top

Add a new user id

  • I only sign in as user "root" when I want to do system maintenance.
  • I usually sign in as a normal non-root user.
  • To do so, you must first create a new non-root user account.
  • The terms user, username, and user id are synonyms of each other in this context.
    • enter command:
adduser <username>

example: adduser andy

    • at the prompt, enter a password for the new user.
    • at the prompt, confirm the password.
    • at the prompts, enter the requested information or leave empty, and then confirm if it is correct.
  • The new username will have been created.
  • Also, the directory: /home/<username> will have been created.
  • The files from /etc/skel will be in the new home directory.
  • If you did the optional step "Make ksh the default shell" above, then the new user has the default shell: ksh
  • If you did the optional step "Use custom .profile" above, then the new user also has the custom .profile, .myprof, and .myoptions files.

Note: To delete a user, use the command: deluser <username>

Also review the man pages for deluser, userdel, adduser, useradd, addgroup, and groupadd


top

Creating and Using ssh keys

  • See page 3 - CYGWIN ssh on how to generate ssh keys.
  • Only do step 2, all subparagraphs, as you are using Debian, not Cygwin.


top

Install XMing X-Windows Server

  • See page 6 - Xming for instructions on installing Xming.
  • I start Xming manually from the Windows desktop before I boot Debian.


top

Tailor .profile, a bit more

  • You may need to set the DISPLAY variable for X-Windows sessions to function.
  • Try to start an X-Windows application, like: xterm.
  • If you get messages like:
    • xterm Xt error: Can't open display:
    • xterm: DISPLAY is not set

or

    • xterm Xt error: Can't open display: localhost:0.0
  • then add the following lines to .profile:
if [[ -z $DISPLAY ]] then export DISPLAY=10.0.2.2:0.0 fi


top

Install and Configure PuTTY and ssh Keys

  • See page 5 - PuTTY for instructions on installing and configuring PuTTY and ssh key pairs.

Create a new PuTTY session, use the IP address from step 12

  • You will be connected to Debian via a PuTTY session.
  • NOTE: I now shutdown coLinux and use 7-Zip to make a backup copy of the fully installed root file system.
  • Remember: BACKUP, BACKUP, BACKUP


top

Some of my uses of Debian

  • Virtual machine environment for secure, isolated web browsing (using Ice Weasel) where C: drive and PC will be safe from attack.

Do not allow C: drive access (skip step 11 above) and a virus can be removed by doing a CoLinux restore from the backup copy made in step 24.

  • Build and test application directory and system maintenance shells
  • Build and test programs
  • Test bed for ssh and PuTTY
  • Test pgp/gpg encryption/decryption techniques
  • Test Oracle database batch programs
  • Test bed for all manner of Unix routines before I use them on my production systems
  • Learn and test Unix administrative functions, commands


top

Other packages

  • These are additional packages that I install for various application development tasks.
  • Some are just for fun, like kstars.
    • screen - to help manage a remote session: see http://www.ibm.com/developerworks/aix/library/au-gnu_screen/ for a good explanation.
    • tofrodos - to get: dos2unix, unix2dos (alternate package: sysutils, but this package may be superceded)
    • x11-apps - for xclock, xeyes, and other x11 apps
    • apg - a password generator
    • expect - script monitor and automator
    • gawk - gnu awk
    • nedit - a X-Windows GUI editor
    • Ice Weasel (firefox) - internet browser
    • aptitude - package install/maintenence tool
    • kompare - kde compare
    • xpdf - view pdf files
    • openoffice.org - open office
    • gcc - gnu cc compiler
    • build-essential - compile support
    • ddd - interface to gdb
    • gdb - debugger
    • other C debuggers to try: kdbg, xxgdb, cgdb
    • kde - ksh desktop environment
    • kstars - fun astronomy


top

... I'm done unless you ask for help or clarification.

...additional notes could be done on how to uninstall TAP-WIN32, if you were to remove CoLinux.

... how to do some shell coding, like creating your own "tree" command or "dos2unix" command, for when those utilities are NOT available (some AIX systems).

... MS Windows host file - add loopback and 127.0.0.1 for the Debian install.u