/
Platforms P-3295, P-3290 and P-3780

Platforms P-3295, P-3290 and P-3780

P-3290, P-3295, and P-3780 contain one flash chip and one CF (compact flash) card. The boot loader, uBoot, is stored in the flash chip, while PicOS is installed on the CF card.

Backup the Configuration File

Before the upgrade, user can back-up the configuration file prior to upgrading the switch.
If user is running the L2/L3 mode, the configuration file is /pica/config/pica_startup.boot. If user is running the OVS mode, the configuration file is /ovs/ovs-vswitchd.conf.db.

Download the Image

Download the PicOS 2.3 image from the Pica8 website. Visit http://www.pica8.com/portal/ to register for a Pica8 Portal account. Once the registration is approved, user can login and download the images from the portal.

 

[Note – please make sure the downloaded image file is compatible to the system product number. P-3295, P-3290, and P-3780 require different images.]

Save the downloaded image at a local TFTP or FTP server.

Prepare the Compact Flash

PicOS 2.3 requires user to partition the compact flash. This will require user to bring up a utility program to perform the disk partition and re-formatting. To bring up the utility program, user needs to first stop the boot loader from the booting process.
The boot loader, uBoot, provides two different boot commands. One is to load the PicOS image and the other to enter the flash Linux. By default, uBoot brings up PicOS. In order to manually upgrade the system, user needs to stop the booting process by hitting the Enter key at the prompt of "Hit any key to stop autoboot". This will drop into uBoot prompt.

[Note: this prompt appears very soon after the system boots up. User will need to hit the key fast enough to stop the process]

Hit any key to stop autoboot: 5

At the uBoot prompt, enter the following command to bring up the utility program.

=>run flash_bootcmd

This boots through a Linux kernel and stops at a menu of the utility tool as the following:

Diagnostic Test Main Menu v1.3 (LB9 - Linux) 
[1 ] File Management 
[2 ] Board Information 
[3 ] Diagnostic Test 
[4 ] Manufacturing Test Mode Set 
[5 ] Test Error Log File Management 
[6 ] PING 
[7 ] Reset 
[8 ] For Vibration Test 

Enter the choice: <Ctrl-D> <Ctrl-D>
Input Ctrl+D twice to quit the diagnostic menu (shown below) and to enter the Linux command line interface.


Partition the CF Card

To ensure the CF card is properly formatted, user should un-mount the CF card first. An error message may be displayed, since the CF card may not have been mounted. In this case, the error message can be ignored.

umount /cf_card

Bring up the fdisk tool, which can set up the partition table.

fdisk /dev/hda

First, check whether the CF card has one or two partitions:

Command (m for help): p Disk /dev/hda: 1997 MB, 1997163520 bytes
128 heads, 63 sectors/track, 968 cylinders
Units = cylinders of 3970 * 512 = 2031640 bytes    Device Boot      Start         End      Blocks  Id System
/dev/hda1               1         3970     2544160+ 83 Linux 

If it shows one partition (as shown above) or no partition, use the following steps to modify the CF card into two partitions. If it shows two partitions, it means that it has been done in the factory and user can skip the steps to partition the CF card by issuing command "q" to exit from fdisk and continue on Mount CF Card.

[Note - Please pay attention to the total size of the disk. User will need the disk size when calculating the partition sizes of the new table. The output above shows this is a 2GB CF card.]

If it shows only one partition, enter "d" to delete the old partition.

Command (m for help): d
Selected partition 1

Now create the new partition with the "n" command.

Command (m for help): n
Command action
e extended
p primary partition (1-4)

This is where user needs to use the recorded CF size. User needs to reserve about 400 MB for partition 2. The rest of the CF card belongs to partition 1. If the size of the CF card is 2 GB, partition should be 1.6GB (1600M) and partition 2 is 400M.
Since we need both partitions to be bootable, we will need to set both as primary. Enter "p" to select primary partition, and "1" to configure partition 1.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3970, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-3970, default 3970): 3176

In the above example, the total cylinder is 3970. So user can allocate 3970 / 5 * 4 = 3176 (2G / 5 * 4 = 1.6G) for partition 1. Create partition 2 with the rest of the sectors.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (3177-3970, default 3177): <Enter> Using default value 3177
Last cylinder or +size or +sizeM or +sizeK (3177-3970, default 3970): <Enter> Using default value 3970

Enter "w" to write the partition table and exit.

Command (m for help): w

This should complete the disk formatting process. 

 

Formatting the File Systems

We need to format the two partitions into EXT3 file system.

mke2fs -j /dev/hda1
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
mke2fs -j /dev/hda2
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


Mount CF Card


Mount the partition1 and change the working directory to /cf_card with the following commands:

mount /dev/hda1 /cf_card
cd /cf_card


Setting Up an IP Address

In order to download the 2.0 image to the switch, user will need to set up the network connection of the management port. There are two ways to setup the IP address of the management port:

1. Obtain the IP address through DHCP.

2. Setup a static IP address.

If the switch is connected to a DHCP server, enter the following command to obtain the DHCP-assigned IP:

#udhcpc

If a DHCP server is not available, setup a static IP instead:

#ifconfig eth0 <IP address>

Ping the TFTP server first to make sure the network is set up properly.


Downloading and Installing the PicOS Image


Use TFTP or FTP to retrieve the image from a remote server.
When using TFTP, enter rootfs.tar.gz for<local-image-name>. User will need the file name of the new image, which should be stored at the TFTP server. Use the file name as <remote-image-name>.
<TFTP-server-IP> is the IP address of the TFTP server. The process may take several minutes.

[Note: Make sure to enter the sync command after downloading the file.]

#tftp -g -l <local-image-name> -r <remote-image-name> <TFTP-server-IP>
...
#sync

When using FTP, use the following syntax.

ftp get -u <user-name> -p <password> <FTP-server-IP> <local-image-name> <remote-image-name>
...
#sync

After downloading the image, unzip the compressed image file.

#tar zxvf rootfs.tar.gz
...
#sync
[Note: make sure to enter the sync command before restarting the system, otherwise the upgrade process might be incomplete and can lead to corrupted image.]

Finally, reboot the system:

#reboot

[Note – the reboot process may take up to 3 minutes.]

Please refer to section "Upgrade PicOS from 2.1 to 2.x" for instructions for upgrading to 2.x version.

Copyright © 2025 Pica8 Inc. All Rights Reserved.