Add-On Packages/Setup
From ImageStream Router Documentation
- Enter the following commands from the command prompt (Main menu option 3 Advanced -> option 1 Bash shell)
- addon_hd configure
- addon_hd partition
- addon_hd format
- Enable addon_hd
- Start addon_hd
The addon_hd service creates 2 partitions. A read-only partition for program installation is mounted by default on /opt. A read-write partition for data storage is mounted on /data.
The addon_hd service can be configured to run on the built-in flash if it is 128 MB or larger. Otherwise an extra flash drive or hard drive is required.
Partitioning schemes
Device | RO Partition | RO Size | RO Mount Point | RW Partition | RW Size | RW Mount point |
---|---|---|---|---|---|---|
Built-in 128 MB Flash | hda3 | 32 MB | /opt | hda4 | Remainder of drive (24 MB for 128 MB flash) | /data |
Add-on Flash or Hard Drive Less than 8 GB | hdc1 | 512 MB | /opt | hdc2 | Remainder of drive | /data |
Add-on Flash or Hard Drive Greater than 8 GB | hdc1 | 4 GB | /opt | hdc2 | Remainder of drive | /data |
Primary Flash as Add-On HDD
- Use the following procedure to use the add-on hard drive feature with available storage on the primary flash (intended for routers with a primary flash that is 4 GB or larger).
- - Ensure a DNS server is configured and the router has access to the Internet.
- - Drop to a bash shell command line (Main menu option 3 Advanced -> option 1 Bash shell).
- - Update the router OS.
update 4.4.0
- - Reboot the router after the OS update completes successfully.
- - Drop to a bash shell command line (3. Advanced, 1. Bash shell).
- - Run fdisk on the primary flash device (normally /dev/hda).
fdisk /dev/hda
- - Document the existing partition scheme (option 'p' in fdisk) which will look similar to the output below.
Command (m for help): p Disk /dev/hda: 16 heads, 63 sectors, 15538 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 131 65992+ 83 Linux /dev/hda2 132 148 8568 83 Linux /dev/hda3 149 214 33264 83 Linux /dev/hda4 215 15538 7723296 83 Linux
- - Delete the hda3 and hda4 paritions.
Command (m for help): d Partition number (1-4): 3 Command (m for help): d Partition number (1-4): 4
- - Write the changes to disk by using the 'w' command.
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.
- - Run fdisk on the primary flash device (normally /dev/hda) again.
fdisk /dev/hda
- - Confirm the partition table only shows hda1 and hda2 by using the 'p' command.
Command (m for help): p Disk /dev/hda: 16 heads, 63 sectors, 15538 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 131 65992+ 83 Linux /dev/hda2 132 148 8568 83 Linux
- - Create a new 3rd partition by using the following options:
- n (add new partition)
- p (primary partition)
- 3 (parition number)
- <enter> (accept the default which should be around 149)
- +1000M (make it a 1GB partition)
- - The sequence should look similar to the following.
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 3 First cylinder (149-15538, default 149): Using default value 149 Last cylinder or +size or +sizeM or +sizeK (149-15538, default 15538): +1000M
- - Create a new 4th partition by using the following options:
- n (add new partition)
- p (primary partition)
- 4 (parition number)
- <enter> (accept the default which should be around 2181)
- <enter> (make it use the remain available space)
- - The sequence should look similar to the following.
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 4 First cylinder (2181-15538, default 2181): Using default value 2181 Last cylinder or +size or +sizeM or +sizeK (2181-15538, default 15538): Using default value 15538
- - Confirm the partitions and sizes by using the 'p' command.
Command (m for help): p Disk /dev/hda: 16 heads, 63 sectors, 15538 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 131 65992+ 83 Linux /dev/hda2 132 148 8568 83 Linux /dev/hda3 149 2180 1024128 83 Linux /dev/hda4 2181 15538 6732432 83 Linux
- - Write the changes to disk by using the 'w' command.
Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.
- - Reboot the router after completing the partition changes.
- - Run the addon_hd configuration script (addon_hd configure).
# addon_hd configure Creating a default add-on hard drive configuration... Checking for a hard drive or flash drive... Probing hdb... not found. Probing hdc... not found. Probing hdd... not found. Using the 3rd and 4th partitions on the primary flash drive.
- - Format the partitions by using addon_hd format script (addon_hd format).
# addon_hd format WARNING: All data and programs on the add-on drive will be lost! Are you sure you want to format the add-on drive (y/N)? y Formatting program partition... done. Formatting data partition... done. Starting the add-on hard drive service... Mounting add-on program partition read-only... done. Mounting add-on data partition read-write... done. done.
- - Enable the addon_hd (Enable addon_hd) so that it starts at boot.
# Enable addon_hd addon_hd enabled on boot.
- - Start the addon_hd feature (Start addon_hd) to make it available for use (most likely it is already started from the previous command).
# Start addon_hd Add-on hard drive service is already started.
- - Perform a "df -h" to confirm the addon_hd feature is working as evidenced by a 1GB /dev/hda3 parition mounted on /opt and another larger /dev/hda4 partion (size depends on the size of the flash) mounted on /data.
# df -h Filesystem Size Used Available Use% Mounted on rootfs 63.3M 47.6M 12.7M 79% / /dev/root.old 63.3M 47.6M 12.7M 79% / /dev/hda3 984.4M 16.0M 918.3M 2% /opt /dev/hda4 6.3G 32.1M 6.0G 1% /data