My FREESCO page | A FREESCO is born | Installing FREESCO on a HD

Installing FREESCO on a HD

This page describes how to install FREESCO on a HD. It assumes that you have set up a FREESCO floppy which runs as expected. It also assumes that you have a HD installed in your computer. Throughout this tutorial I assume that the HD is installed as the primary master which in Linux terms means /dev/hda.

There are two ways to install FREESCO on a HD. The "traditional" way is to install FREESCO on an existing DOS partition on the HD. After formatting the HD you choose the "mv2hd" option from the boot menu shown when FREESCO starts. This copies FREESCO from the floppy to the HD. Starting with 034, you also have the posibility to install FREESCO on a ext2 partition. ext2 is a far better file system than DOS and the ext2 approach is what I will describe here. This is also a true open source alternative so I really recommend this approach. If you still want to install on a DOS partition, you can check out my old tutorial for installing FREESCO, but that page is not updated anymore.

When installing on a HD, it is also a good idea to enable some swap space. You can either use a swap file or a separate swap partition. A swap partition is preferable to a swap file as it gives better performance. If you have a spare HD you can put the swap partition on that HD for best performance. Swap space should be about double the amount of RAM you have. However, FREESCO can not use a swap space larger than 127MB so using a swap partition larger than that is a waste of space. If you have have a large amount of RAM, a swap partition might even slow down your system. See this post for more information about swap options.


Install the ext2 package

The first thing to do is to install the ext2 package. Starting with 037, the installation of the ext2 package is integrated with the setup program, so log in to your FREESCO and start the setup. In the Advanced Settings Menu, select setting 'p' - Package menu. The Add-on packages menu is now displayed:

                p. ADD-ON PACKAGES MENU
        The default package install URL is
        http://www.FREESCOsoft.com/home/0.3.x/
        The default patch/ext2 install URL is
        http://www.freesco.org/
        The default package save directory is
        /www/packages

 0. Uninstall package
 1. List installed packages
 2. List available packages
 3. Installed packages documentation
 4. Install a package
 5. Setup installed packages
 6. Enable - Disable packages
 7. Enable - Disable package firewall rules
 8. Enable - Disable control panel addons
 9. Default package install URL
10. Default patch/ext2 install URL
11. Default package save directory
12. Check/install patches from http://www.freesco.org/
13. Install the official ext2 package from http://www.freesco.org/


 Command me (x - exit)?

All you have to do here is to type '13' to start the installation of the ext2 package. You are given a chance to bail out from here:

 Install the Official ext2 package (y/n) [n]

but I suggest you type 'y' and press Enter. The script is downloaded and you are given the option to preview the installation script:

Installing...                           ext2-0.3.8-lewis
View the install script (y/n) [n]?

Just hit Enter and continue

Prepare and move FREESCO v0.3.8 to an ext2 hard drive partition.

Checking versions...                    Pv0.3.8
Checking required temp space...         Ok
Checking required disk space...         Ok
Checking dependencies...                Ok
Checking if package is installed...     Ok
Checking for existing libraries...      Ok
 *****************-- This is an official FREESCO package --********************
     _/_/_/ _/_/_/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ EEEEE X   X TTTTT 22222
    _/     _/  _/  _/     _/     _/     _/     _/  _/  E      X X    T       2
   _/_/   _/_/_/  _/_/   _/_/   _/_/_/ _/     _/  _/   EEEE    X     T   22222
  _/     _/ _/   _/     _/         _/ _/     _/  _/    E      X X    T   2
 _/     _/  _/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/     EEEEE X   X   T   22222
 ******************************************************************************
        ***--    loading this package will not damage your system   --***
!!!  However it is entirely possible to damage your system with this package !!!

 This package is designed to create and move FREESCO to an ext2 partition.

        If you are not comfortable with using the Linux cfdisk utility
        and formating hard drives then do NOT install this package.

        This package leaves no changes to your floppy, so if you reboot
        you will have to install this package again.

Do you want install this package (y/n) [y]?

Just press Enter. The package is downloaded and installed:

http://www.freesco.org/packages/ext2-0.3.8-lewis.tgz (351K)
/tmp/2560~/ext2-0.3.8-le  [########################]     351K |  286.66K/s
360400 bytes transferred in 1.23 sec (286.50k/sec)
Unpacking ext2-0.3.8-lewis.tgz .. Done

        Now that this package is installed you have two choices.
        The first is to setup for a new install or to repair an
        existing installation. Use

        rc_ext2 setup
        or
        rc_ext2 repair

        You also can use any of the included binaries directly from
        the command line. Binaries and scripts included are: lilo
        mke2fs mkswap e2fsck cfdisk sfdisk fdisk mv2ext2 tune2fs
        dumpe2fs mklost+found rc_ext2

        NOTE: If running this package from within the setup package menu,
        the installation is automatically started.

        <ENTER> continue

Now the ext2 package is downloaded and installed. Press Enter to continue with the setup:

Successfully installed...               ext2-0.3.8-lewis

Run the rc_ext2 setup now (y/n) [n]

To setup the package, type 'y' and hit Enter. Some basic information about the package is displayed:

     _/_/_/ _/_/_/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ EEEEE X   X TTTTT 22222
    _/     _/  _/  _/     _/     _/     _/     _/  _/  E      X X    T       2
   _/_/   _/_/_/  _/_/   _/_/   _/_/_/ _/     _/  _/   EEEE    X     T   22222
  _/     _/ _/   _/     _/         _/ _/     _/  _/    E      X X    T   2
 _/     _/  _/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/     EEEEE X   X   T   22222



        This is a utility to automate moving FREESCO v0.3.8 from a
        floppy to a hard drive ext2 file system. This utility will use
        fdisk, cfdisk, sfdisk, mke2fs, mkswap, lilo, tune2fs, mklost+found
        dumpe2fs, and mv2ext2. All of these binaries and scripts are
        included in this package and can be used directly from the command
        line if you need them. If there is any step during this install
        that is already done then just skip that step. This especially
        applies if you make a mistake and need to run the utility again.

        <ENTER> to continue

Just press Enter to go on with the setup:

     _/_/_/ _/_/_/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ EEEEE X   X TTTTT 22222
    _/     _/  _/  _/     _/     _/     _/     _/  _/  E      X X    T       2
   _/_/   _/_/_/  _/_/   _/_/   _/_/_/ _/     _/  _/   EEEE    X     T   22222
  _/     _/ _/   _/     _/         _/ _/     _/  _/    E      X X    T   2
 _/     _/  _/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/     EEEEE X   X   T   22222


        You are now going to run the Linux command line cfdisk utility.
        You have to have or create at least one primary ext2 partition
        and optionally one swap partition. You also need to make sure and
        toggle the bootable flag for your primary partition.

        Make sure to write the new configuration to the disk before you
        exit the utility.

        NOTE: By default this utility creates ext2 partitions. So if
        you want to create a swap partition, first create the partition and
        then change the partition's ID to "swap".
        The maximum size of a swap partition is 127MB.

        Run the Linux cfdisk utility (y/n)? [n]

The first step in the process is to create the partitions. As described earlier I assume that you only use one HD which will be split into two partitions: one "main" partition and one swap partition. Partitioning is done with a tool called cfdisk. Type "y" and hit Enter which will start cfdisk. The current layout of your HD will be displayed. For an empty HD the page will look something like this:

                                            cfdisk 2.11n

                                        Disk Drive: /dev/hda
                                       Size: 524288000 bytes
                        Heads: 16   Sectors per Track: 63   Cylinders: 1015

     Name           Flags         Part Type    FS Type              [Label]            Size (MB)
 --------------------------------------------------------------------------------------------------
                                   Pri/Log     Free Space                                 523.84
















      [  Help  ]  [  New   ]  [ Print  ]  [  Quit  ]  [ Units  ]  [ Write  ]


                                         Print help screen

The first thing to do is to remove all old partitions if there are any. Use the arrow keys to step up/down between the partitions. The currently selected partition will be highlighted. If you only have one partition, up/down will not work. To delete a partition, press the left/right keys to select the "Delete" option from the menu at the bottom of the screen and press Enter. Once all old partitions are removed, it is time to create the new ones.

Start by calculating the size of the main partition. The maximum size of the swap partition is 127MB. Making it bigger will not cause any errors, but FREESCO will only use 127MB so anything larger than that is a waste of space. In this example the size of the HD is 523.84MB and subtracting 127MB from that gives 396.84MB. This means that the main partition should be 396.84MB while the swap partition should be 127MB.

To create the partitions, use the left/right keys to select the "New" option from the menu. First of all you are asked if this should be a primary or logical partition. Accept the default (Primary). Now you are asked to specify the size of the partition. Enter the value you calculated earlier. Finally you are asked where to place the partition, at the beginning or at the end of the HD. Accept the default (Beginning) by hitting Enter. Now the new partition should show up in the list of partitions. Note that the actual size of the partition might vary some from the value you specified. This is normal. The only thing that remains is to make the partition bootable. This is done by selecting the "Bootable" option in the menu and pressing Enter. The text "Boot" should show up in the Flags column.

Repeat the process described above in order to create the swap partition. When specifying size for this partition, use all remaining space (as suggested by cfdisk. When done, you should end up with something like this:

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    hda1        Boot        Primary   Linux                             1151.93
    hda2                    Primary   Linux                              128.00

Now you need to make hda2 a swap partition by changing its file system type. Select the partition (by highlighting it with the up/down keys) and select the "Type" option in the menu. When you press Enter, all valid file system types are displayed and you are asked to enter a type (value). Enter value 82 to specify that this is a swap partition and you will be back in the main menu. Now partition hda2 should look like this:

    hda2                    Primary   Linux swap                         128.00

Now you are done creating partitions. Select the "Write" option in the menu and you are asked if you want to write the new partition table to the disk. Type "yes" to commit the changes. The partition table is saved and the menu is displayed once again. If you just select "Quit" without writing the partition table first, no changes are saved. Now that you have save the changes, select "Quit" to exit cfdisk. You will be back in the package installation script:

     _/_/_/ _/_/_/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ EEEEE X   X TTTTT 22222
    _/     _/  _/  _/     _/     _/     _/     _/  _/  E      X X    T       2
   _/_/   _/_/_/  _/_/   _/_/   _/_/_/ _/     _/  _/   EEEE    X     T   22222
  _/     _/ _/   _/     _/         _/ _/     _/  _/    E      X X    T   2
 _/     _/  _/  _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/_/_/     EEEEE X   X   T   22222


        Do you want to format a hard drive partition (y/n)? [n]

You must format the partition before you use it so type 'y' and press Enter.

        Format the FREESCO ext2 hard drive partition.

        NOTE: If your drive might have bad blocks, add the -c flag.

        (<ENTER>) to skip this step
        EXAMPLE: /dev/hda1
        EXAMPLE: -c /dev/hda1


        What hard drive partition do you want to format ?

Here you specify which partition to format. You want to format the main partition which is /dev/hda. To check the partition for bad blocks, add the -c flag and type -c /dev/hda1 and hit Enter. Formatting begins:

mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
97152 inodes, 387544 blocks
19377 blocks (5.00%) reserved for the super user
First data block=1
48 block groups
8192 blocks per group, 8192 fragments per group
2024 inodes per group
Superblock backups stored on blocks:
        8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, 81921,
        90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457, 155649,
        163841, 172033, 180225, 188417, 196609, 204801, 212993, 221185, 229377,
        237569, 245761, 253953, 262145, 270337, 278529, 286721, 294913, 303105,
        311297, 319489, 327681, 335873, 344065, 352257, 360449, 368641, 376833,
        385025

Checking for bad blocks (read-only test): done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

dumpe2fs 1.27-WIP (5-Mar-2002)
dumpe2fs: illegal option -- c
Usage: dumpe2fs [-bfhixV] [-ob superblock] [-oB blocksize] device
<ENTER> to continue   

After hitting Enter, you are given the option to format another partition:

       Do you want to format another hard drive partition (y/n)? [n]  

As you have only one normal partition, accept the default ("n") and press Enter.

        Do you want to format a swap partition (y/n)? [n]

Now you are asked if you want to format your swap partition. Enter a "y" and press Enter.

        You can now format a Linux swap partition if you created one with
        the fdisk utility. You will need to specify the disk partition
        that you created the swap file in. Also if this partition might
        have bad blocks, you can add the -c flag.

        (>ENTER>) to skip this step
        EXAMPLE: /dev/hda2
        EXAMPLE: -c /dev/hda2


        What swap partition do you want to format ?

Your swap partition is /dev/hda2 and when formatting it you want to check for bad blocks so type -c /dev/hda2 and hit Enter. Formatting starts with no output. When done, FREESCO will tell you how to specify the swap space in the setup program:

Formatting swap space, please wait......
Setting up swapspace version 0, size = 126955520 bytes

        Now that your swap has been formatted you need to enable
        it in the advanced setup. Rather than specifying a size you
        have to specify the device in the advanced setup swap section.
        This can be done at any time once you have finished.

        EXAMPLE: swap size = 127   (WRONG)
        EXAMPLE: swap size = /dev/hda2


        <ENTER> to continue.

Hit Enter and you will be asked if you want copy your FREESCO floppy to the HD:

        Copy FREESCO to your ext2 disk partition now (y/n)? [n]

This is what you want to do so type "y" and hit Enter.

This command will install FREESCO to a ext2 partition on your hard drive.
Choices: Clean install, delete previous copy
         Overwrite existing install leaving extra files intact
         Save existing hard drive install to a backup directory.
         Restore previous backup
         Abort/exit

Your choice (c/o/s/r/a)? [a]

Now you are asked which type of installation you want to do. You have the possibility to overwrite/save/restore a FREESCO installation, but you should type "c" to do a clean install. Press Enter and FREESCO will be copied to the HD (this will scroll by quickly):

Copying Freesco files to                         /dev/hda1
/>>>/>/>>>>>>>>///////>//////////
>
Copying kernel, ramdisk, and license....        Done
Copying ext2 file system tools.....             Done
Copying additional libraries.....               Done
Copying lilo configuration files......          Done

FINISHED

Now you are asked if you want to edit lilo. Skip this by hitting Enter.

        Now you can edit the configuration for lilo

        After you are finished editing the configuration script.
        Exit and save with <ALT>+<X> or <F10> and then <y>  



        Do you want to edit the /etc/lilo.conf file (y/n)? [n]

Now you are asked to install a boot loader:

        The final step to booting FREESCO is to install a boot loader.
        This is done with the lilo command.

        NOTE: if you have a boot loader from another Linux distribution
        loaded on another partition, you should probably not use this
        command. You should add the correct entries into that OS for
        FREESCO and run the lilo command from there.



        Do you want to run LiLO (y/n)? [n]

Unless you know what you are doing, type "y" and hit Enter. The following is displayed as the boot options are installed:

Added normal *
Added setup
Added debug
Added shell
Added floppy
<ENTER> to continue

Press Enter and you will be back in the Add-on Packages menu. The ext2 package is installed and you can try it out by exiting from the setup and reboot.

NB! If you ever created a ramdisk while running from the floppy, it might be a good idea to turn it off right now as the ramdisk is of little use when running from a HD. The only benefit from using a ramdisk with a HD installation is that /tmp is remounted in the ramdisk, giving more space for /tmp (see Lightnings comment). The ramdisk is turned off using setting 19 'Extra ram drive'.

NB! If you have edited rc_user to automatic install packages to the ramdisk, these entries should be removed now. As you remove the ramdisk, it will no longer be possible to install packages there. Instead, all packages can be installed to the HD later on.

Reboot your FREESCO and during the reboot, remove the floppy from the drive. If everything goes as expected, the FREESCO menu should load from the HD and within 8 seconds FREESCO should boot. During the boot, you should see the following lines on the screen:

Mounting boot device....                        Mounted Read-Only
Checking /dev/hda1: clean, 85/97152 files, 14436/387544 blocks
ReMounting boot device.......                   Done hda1

Now FREESCO runs from your HD. What remains to do is to activate the swap space.

Log in to your box as a super user and start the setup program. From the Advanced Settings Menu, select setting 15 (Swap file). Here you either specify the size of the swap file (if you use one) or the swap partition (which is what I describe here):

        It is a good idea to enable a swap file on hard drive systems with
        less than 32MB of RAM. You should enable at least an 8MB swap file
        if you have less than 16MB of RAM.
        NOTE: Maximum usable size is 127 MB. If you are using a Linux
        native swap partition, then enter the drive partition.

        EXAMPLE1=127
        EXAMPLE2=/dev/hda2

        NOTE:   If you have 64MB+ of ram, then enabling swap will usually
                just slow the system down.

15 Swap file size in MB or native swap device (0 = disable) [0]?

Your swap partition is /dev/hda2 so type this and press Enter. Exit the setup program and save your changes. When you are back at the prompt, reboot your FREESCO. The next time FREESCO boots you should see that swap gets enabled:

Enabling swap partition....                     Done /dev/hda2

By now the swap space is activated and your HD installation is finished.

[ Top ]


Page author: My email

Last modified: Wed Apr 16 20:51:40 CEST 2008

Valid HTML 4.01!