/
Platform P-3297

Platform P-3297

P-3297 is shipped with early 2.0 releases. User needs to upgrade to the latest 2.3 release before the software can automatically provision the system.

Backup the Running Configuration File

Before the upgrade, user can back-up the configuration file before upgrading the switch.
If L2/L3 mode is being run, the configuration file is /pica/config/pica_startup.boot. If user is unable to locate it, please enter the following CLI commands to generate it. If OVS mode is being run, the configuration files are located in /ovs/ovs-vswitchd.conf.db.

Download the PicOS 2.3 Image

Download the PicOS 2.3 image for P-3297 from the Pica8 website. Visit http://www.pica8.com/portal/ to register for a Pica8 Portal account. Once registration is approved, log in to the portal and download the images from the portal. Save the downloaded image at a local TFTP or FTP server.

Prepare the USB NAND

The boot loader, uBoot, provides the different boot commands to enter either the flash Linux environment or the PicOS system on the SD card. By default, it brings up PicOS. uBoot provides two commands to boot into different environments. One is to the PicOS system and the other to the backup Linux. By default, uBoot boots into PicOS on the first partition. To upgrade to the latest PicOS 2.3, manually bring up backup Linux by stopping uBoot. 

[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 <Ctrl-C>

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

=> run norrescueboot

This boots through a Linux kernel

[root@Kennisis /]#


Partition the SD Card

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

umount /mnt

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

fdisk /dev/sda

First, check whether the SD card has one or two partitions.

 Command (m for help): p Disk /dev/sda:
  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/sda1              1        3970     2544160+ 83 Linux

If it shows either one partition (as shown above) or no partition, users should use the following steps to partition the SD card. Display of two partitions means that it has been done in the factory, so user can skip the steps to partition the SD card. Do this by issuing command "q" to exit from fdisk and continue on Mount SD 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 SD size. User needs to reserve about 400 MB for partition 2. The rest of the SD card belongs to partition 1. If the size of the SD 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 the  partition. 

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

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/sda1

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/sda2
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.


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 eth1 <IP address>

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

 

Mounting the USB NAND Flash and Saving the Running Configuration File

Need to mount the PicOS partition on the /mnt directory:

#mount /dev/sda1 /mnt


Cleaning the USB NAND Flash

Change the directory to /mnt, and remove all existing software.

#cd /mnt
# rm -rf * .*
# sync


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. This process may take several minutes. 

[Note - Make sure entering the sync command after downloading the file.]
#cd /mnt
#tftp -g -l <local-image-name> -r <remote-image-name> <TFTP-server-IP>
...
#sync

When using FTP, use the following syntax.

#cd /mnt
#ftpget -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 a corrupted image.]

Finally, reboot the system:

#sync
#reboot
[Note - the reboot process may take up to 3 minutes.]

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






















Copyright © 2025 Pica8 Inc. All Rights Reserved.