XETEC LT. KERNAL HARD DRIVE


For the Commodore 64 & 128 Computers

Written by eBay's 94Bravo





HOME


HOST ADAPTER


SYSGEN


Hard Drives


FILES



Details


Install


Editing SYSGEN





Install


Configure


SCSI Adapter





Multiplexer Unit


Activation


Drive Case & Cables







The Wall









DOS Commands










Software Configuration


Configuring the system:

After installing LK DOS software on the DOS LU 10, now is the time to configure the whole system. Configuration includes setting the size of the hard drive Logical Units and selecting a number of options that will determine the operating characteristics of your Lt. Kernal system. The first of these 'configurations' is to either use the default settings or change the SYSGEN-generated Logical Units (LU) settings. Using or changing these Logical Units determines, in part, how much of your drives' total capacity is used or subdivided for separate storage areas. Unlike a PC that uses drive Partitions, you will see that unless you use low-capacity drives or use multiple LUs on the Lt. Kernal, you won't be able to use as much of the hard drives' capacity.

Before continuing, let's look at where the CBM term "Logical Unit" comes from. Commodore Dual-floppy drives (e.g., 4040, 8250, etc.) were addressed as Device number 8 or 9 and so on. How then did you separately address each of the two physical disk drives? This was accomplished by referring to one drive as drive "0" and the other as drive "1", or Two Logical Units. To load a file, you could use either LOAD"0:filename",8 or LOAD"1:filename",8. (Actually, when you use a 1541 drive, it's implied as LOAD"0:filename",8) So, the Lt. Kernals' design just took this further by providing up to 10 User Logical Units defined in software instead of hard drive 'partitions'.

The Lt. Kernal allows you to have up to ten user Logical Units. This allows you to separate data, keep backup copies of files in different addressable areas, ultimately have More storage area and better organize your data. So, some thought needs to be given to how you are going to use your hard drive. If you outgrow the space on one of your LTK LUs and want to increase/decrease the LUs' size, you risk losing files in both that LU and the adjacent LUs.

Another very important consideration when setting your LUs is to make a 'Spare' LU. The reason for this is because you may need to transfer all of your files from one LU to this 'spare' LU in order to make repairs on a corrupted LU. That is, if the Recovery or Validate LtK DOS commands can't solve a file or directory problem, you'll want a Spare LU to transfer as many files as possible before you Activate (erase) the bad LU. When the corrupted LU has been Activated, you can then transfer all of your files from the Spare LU, back to the repaired LU.

So, to help you determine if the default setting will work, it would help to see the current configuration! To do this from the prompt of an LTK operating system, enter "config" on the far-left column cursor position and hit Enter. (Note: All DOS commands are entered in lowercase and always at the far-left) This DOS command loads the existing or new 'ltkernal.r' or 'ltkrn128.r' file and then shows these options:

  • F1 - SET LOGICAL UNIT PARAMETERS
  • F3 - SET ALL OTHER PARAMETERS
  • F5 - SET THE SPREADSHEET COLORS
  • F7 - EXIT CONFIGURE MODE

Start by pressing F1, which will first asked you to select the PHYSICAL CONTROLLER number (0-7). This number actually refers to the SCSI Address Number of the drive (on-board drive's controller). All single-drive Lt. Kernal systems use SCSI address zero (0) or Physical Controller Zero. If you are adding a Second drive, the Physical Controller is ONE, etc.. Physical Drive Zero is also the drive where DOS is installed and where you should start. If you installed Seven more drives (SCSI ID# 1 - 7), LtK DOS is still only installed on SCSI ID#0.  Therefore, enter 0 (zero) for the Physical Controller number.

Next, you are asked to enter the Physical Drive number (0-3). This is always set to drive zero (0) because OMTI Controller cards are not used with SCSI embedded controller drives. (Note: With early designs of the Lt. Kernal, OMTI controller cards were used by Fiscal and Xetec.  You could connect up to Four drives to an OMTI controller card (four Physical Drives) - Yes, a Total of '32' hard drives!  However, with 'embedded-controller, SCSI drive LTK systems', there is only One Physical Drive/SCSI ID#, so you enter 0 (zero) and hit Enter.

You now see a Table showing which LUs were created (or your old settings) and how many hard drive Cylinders of storage are assigned to LU 10, LU 0, LU 1 and LU 2 (Yes, you set LUs by Cylinder usage, but you won't yet know how many Blocks of storage are available for each LU!) As mentioned before, these allocation numbers were either the way you set them before or SYSGEN defaults. If you reinstalled DOS, these settings were the result of reading the existing 'ltkernal.r' file on the hard drive. If these displayed setting are wrong, simply enter the numbers you recorded during the last installation. Once this done, all of your existing files are now available again and you are finished configuring the LUs. If you just reinstalled SYSGEN, you can Exit to the F3 menu (see below).

However, if this is a new install (on a new drive), you can change these default LU settings to anything you want (within reason). In order to change the size of any LU, you must DELETE the LU first and then ADD another LU. That is, before you ADD an LU, you must Delete one or more LUs to make space! Since the default creates 3 User LUs, you could DELETE them all and start over. However, you should not create one big LU. Just remember that the chart shows the Total number of Cylinders you have to store data. The objective is to set Cylinder usage so there are no Unused Cylinders.

Please notice that assigning Cylinders numbers is sequential. That is, LU 10 starts at ZERO and uses a few number of Cylinders (this number changes depending upon which Drive you use and is set by SYSGEN). Installing SYSGEN sets the Starting Cylinder for DOS - LU 10 at Zero and sets Size to 30 Cylinders. However, if you installed a larger capacity drive, LU 10 may have been automatically set to only 8 cylinders usage. That means you have already gained 22 cylinders (30-8=22). (Note: SYSGEN default of starting LU 10 to 30 is due to the small capacity drives that were used when the LTK was designed; 20 meg drives got 30 cylinders to store DOS). If DOS only used 8 cylinders, you could use the remaining Default settings OR you could DELETE all of the User LUs (0,1, & 2) and make your own User LU settings.

If you wanted to use 200 Cylinders for your first User LU (LU 0), simply enter that number at the prompt. For example, if the DOS LU 10 starts at 0 and uses 8 Cylinders, you would enter "8" for the Starting of User LU 0.  Next, if you wanted LU 0 to have 200 Cylinders of storage, enter "200" for Size. So far, you've used 208 Cylinders of the drive's total capacity. Next, the Starting Cylinder number for LU 1 would be "208" (can't be less or you would destroy files in LU 0 - could be more, but you'll create a gap and waste storage). Again, if you use a 200 Cylinder-size for LU 1, you have now used a total of 408 Cylinders which would be the starting Cylinder number of LU 2. This process could continue until you have used All available Cylinders and or LU numbers.

  • CAUTION: You can't use a number of Cylinders which will equal more than 65,536 Blocks (65K disk Sectors) of data storage because the Commodore is an 8-bit computer! Due to the fact that addressing the discbitmap for each LU is accomplished with 16-bit binary arithmetic, the maximum possible size for any one LU is 65,536 disk sectors or 32 megabytes of storage (i.e., 65K x 512 Bytes/Sector - also equals 131K Commodore Blocks/LU.)
    • (You should read ACTIVATION Before making substantial changes to the default LU configuration!)
  • If you use the Default SYSGEN settings, no editing is required. However, if you want to make modifications, you still need to DELETE the LU first. Actually, for our example, you need to DELETE All User LUs and start over.
  • If you want all of your LUs to be as large as possible, first consider:
    • Different drives render different storage BLOCK sizes for the same number of Cylinders! (Commodore Blocks = Cylinders X #Heads X Sectors/Track X 2)
    • If you set the LU Cylinders Size too high, you will roll-over the discbitmap and start back at the bottom! (i.e., actually have less Blocks storage because you mathematically went past 65K and started over!)
    • The WALL! (see top menu)
    • A safe maximum limit for cylinder usage is 240 cylinders (see below)
    • On a sheet of paper, first calculate the largest number of cylinders for storage. To do this, multiple the number of Heads times the number of Sectors/Track (e.g., 7x35=245). Now, divide 64K by the H/ST product (e.g., 65,536/245=267). This number (267) represents the largest theoretical number of cylinders needed to produce the largest LU possible. But, to prevent an Index or BAM rollover, you should start with a smaller number like 240 to 255.
    • In CONFIG, first DELETE all LUs (not LU 10). Then ADD LU 0, starting at cylinder 08 (i.e., use the same number used by LU 10), allocate 255 cylinders to the size of LU 0. Enter UPDATE then EXIT. Next, ACTIVATE LU 0 and restart the computer (see SYSGEN Activation)
    • Type LU 0 at the prompt and hit Enter (in case your default starting LU is not 00). Enter DIR to determine the total Blocks available in the LU (could be 55K-64K Blocks?).
    • GO BACK TO CONFIG and DELETE LU 0 and then ADD LU 0 again. Now, slightly increase or decrease (tweak) the cylinder allocation until you achieve your desired LU-size results.
    • ACTIVATE LU 0 one last time, cycle power and retest the BLOCK size.
    • Continue this process until the Sum of used and available Blocks does Not exceed 65,536 Blocks.
    • Depending on the drive(s) you use, there may be another limit to the total number of Cylinders you assign to an LU. The VALIDATE command may not work properly for Cylinder counts above 240 (240 and below seems to work fine on any drive). This is apparently due to the Validate command itself (code). In order to test this condition, Configure one LU, Activate this LU and then transfer some files to the LU (Use FASTCOPY to move some files from floppy to the LU). Next, enter that LU number at the prompt (e.g., LU 0) and then enter 'validate' and press Return. (When you use Validate, you must first select the LU# and be in that LU)
      • If everything is working properly, the screen will show each file name being Validated.
      • If there's a problem, the process of Validating will destroy the discbitmap, thus destroying access to the files in that LU. You could re-Activate the LU, but changing the size of the LU first is the only solution! (less # Cylinders)
        • The total number of Sectors per LU is the Product of #Heads, #Sectors/Track and #Cylinders. Since Fiscal and Xetec did not have to contend with very large capacity drives, this was probably never a design consideration?
      • When you run this Validate 'test', you only need to transfer a few files to the LU. This potential problem has nothing to due with how Many files you transfer, simply the process of running the 'Validate' command.
      • This potential '240' Block limit is probably due to the fact that Xetec used 20 and 40 megabyte drives and did not expect anyone would be using 200 to 500 megabyte Hard Drives!
  • Once you have determine the optimal Cylinder number size, this number works for subsequent LU settings.
    • Setting all ten User LUs to their maximum cylinder size normally equals over 1 million Commodore Blocks of file storage capacity.
  • A special feature about LU 10 (DOS) is that you can put your own utilities in this DOS LU 10 (SYSGEN sets the size of LU 10, but you'll still have space to store your programs). The advantage of putting your utility files in LU 10 is that the other LUs can access your utility, simply because it's in LU 10. The disadvantage is that any time you do a SYSGEN again, all files are erased in the LU 10, including your utilities. Therefore, before doing another SYSGEN, copy your files from LU 10 to any other LU. Once SYSGEN is done, copy your utilities back to LU 10.
  • If you add a Second Hard Drive, you will use the Next unused LU Number in Configuring that drive (e.g., Physical Controller 1, Physical Drive 0, stating at Cylinder 0 in (e.g.) LU 4. So, the objective is to Not set all available LUs on your first drive (SCSI ID# 0)!

When you've finished setting the LUs, Exit this screen. As you saw by doing the above procedure, you had an option to either display the table settings to the Screen or Printer. By either means, RECORD these numbers when you're finished; you will need them again! Knowing your LU settings is important if you don't want to lose any files when you SYSGEN again. When you EXIT setting LU parameters, you will be returned to the main CONFIG screen.

Note:  If you added a Second Drive and go to set LU sizes, this is where most people get confused.  That is, when you set the First Drive (Physical Controller ZERO) to a certain number of User LUs (say, DOS plus LU 0 - LU 3), you need to Record these settings.  The reason is that when you go to Config the second drive's Physical Controller ONE), the Config Screen is Blank (no, the First Drive's settings were Not erased!).  However, on this Blank Config screen, you start where you left off, meaning you set LU 4 starting at Zero and then set LU 4 Cylinder Size.  Also, you set the starting LU (e.g., LU 4) at Zero because there is no DOS LU on any drive other than Drive Zero. Finally, it's only when you Exit Config will you now see the settings for Both Drives.

Here's one other comment about Recording your Logical Unit (LU) settings. On a PC, if you drag a folder to the trash and empty it, you Deleted the files, Not the discbitmap on the hard drive. However, when you install/reinstall LK DOS, the Lt. Kernal discbitmap and BAM files May be lost. However, if you simply set the LU Cylinder numbers back the way they were, you have restored access to your existing LUs and all your user files.

At this point in Configuration, you should have set all of your Drive(s) LUs and Recorded these settings for future reference.  Now it's time to set the other features of the Lt. Kernal.

Now press F3 to select the other system features. The first thing you'll see is a chart or spreadsheet which is organize along to top by PORT number. Since most Lt. Kernal applications use only one Host Adapter, you can disregard all of the columns except the first PORT 00 column! Looking down this column, you can edit the screen, boarder and character colors (15) and printer number. To edit or look at the options for each, use the cursor up/down keys to position over the item and press the up-arrow (next to Restore key). The other options are explained in more detail below:

  • DRIVE # sets the drive number of the Lt. Kernal. The default is drive # 8, but you can change this to any legal device # (8-31). When the computer is turned on, this will be the device # of the LTK. In Most situations, you will probably leave the LTK device as #08 because the software you run on the LTK may have been written only for device #8!
  • LOGICAL UNIT # sets the LU number at startup. While the default is LU 10 (DOS), this is usually set to LU 00 because that's where most users put their most-used files and:
    • At power-up, DOS looks for the 'autostart' file on the Startup LU
      • Any ML or Basic program will automatically load/run if its name is changed to "autostart"
      • One of the best features of the Lt. Kernal
  • USER # sets the startup User # (one of 16 User areas - default is 00)
    • One thing most people don't know about setting the Default USER Number is that it's like having 16 different Hard Drives!  That is, when you start-up the Lt. Kernal and it's in a USER number (any number), software is unaware of 'User#s' and performs hard drive jumps and branches like before, but in the Default User#! - think about it...
  • AUTOLOAD - If you try to load a file, the DOS looks for it on the hard drive. However, by enabling AUTOLOAD, if the file is Not found, DOS will look for the same file on the floppy drive (Great feature!)
    • Device number of the Floppy drive and Drive# of the LTK should be the same
      • Connect two floppy drives; #8 and #9
      • When you want to Autoload to another floppy, change the LTK by using the "D" command (e.g., D 8, D 9, etc.)
      • Using the above allows you to Autoload from one of two floppy drives

When you are finished setting these options, press the exit arrow to return to the CONFIG menu. F5 is then used to set the spreadsheet colors (the chart you just saw in F3) and F7 exits Configuration menu and returns you to the main system prompt level.

You're Done, right? MAYBE? If you simply reinstalled LK DOS to an already-operating system (Your personal files are already on the hard drive), and you reentered the Same LU numbers from your previously recorded list, you Are Done.

However, if you just install LK DOS on a newly formatted drive, all that you have done is set the LU sizes. Just like a PC or Mac, the LU index/bitmap must be written for each LU; regardless if you use the default settings or set your own configuration! If you want to see how confused the hard drive is right now, enter DIR for any LU number (other than LU 10) and see what happens.

After you have configured the LUs on a new drive, you Must now ACTIVATE each LU! This process is what actually makes your New drive ready for use! However, before you Activate the LU, you may want to read the 'Wall' section (if you didn't already).








Home | Host Adapter | Sysgen | Drives | Files




Top
Lt. Kernal Data Archive 2003-2008 / Contact Author for Inquires