You can insert or remove an SD card while Cisco IOS-XE is running. If you insert a supported Cisco SD card while Cisco IOS-XE
is running, the switch validates the Cisco-embedded string in the Product Name (PNM) field and displays the product number
and the flash capacity of the SD card. If you remove an SD card while Cisco IOS-XE is running, the switch displays a warning
message to alert you that the SD card has been removed.
If syslog is enabled, the system also sends a message when the SD card is inserted or removed.
Boot Loader Commands
The following boot loader commands can be executed on an SD card:
-
boot—Load and boot an executable Cisco IOS XE image
-
cat—Concatenate (type) a file or files
-
copy—Copy a file
-
dir—List files in directories
-
fsck—Check file system consistency
-
format—Format a file system
-
mkdir—Create directories
-
more—Concatenate (display) file
-
rename—Rename a file
-
rmdir—Delete empty directories
-
sd_init—Initialize SD flash file systems
How Commands Work with SD Cards
When an SD card is installed in the switch, the write, boot, and sync commands behave as described below.
write Command
The write command saves the running configuration. See the table below for command behavior details.
Table 2. write command behavior from 17.10.1
Command |
Boot Source |
SD Card Status |
Behavior |
write |
SD card |
Present |
Saves running configuration to internal flash |
write |
SD card |
Removed |
Saves running configuration to internal flash |
write |
Internal flash |
Present |
Saves running configuration to internal flash |
Table 3. write command behavior before 17.10.1
Command |
Boot Source |
SD Card Status |
Behavior |
Message Displayed |
write |
SD card |
Present |
Saves running configuration to SD card |
None |
write |
SD card |
Removed |
Saves running configuration to internal flash |
WARNING: The SD flash is not present. The running-config is saved to the on-board flash.
NOTE: This warning message is displayed only once.
|
write |
Internal flash |
Present |
Saves running configuration to internal flash |
None |
boot Command
The boot command lets you change the system boot parameters. See the table below for command behavior details.
Table 4. boot Command (SD Card Boot Behavior from 17.10.1)
Command |
Boot Source |
SD Card Status |
Behavior |
boot |
SD card |
Present |
|
boot |
SD card |
Removed |
|
boot |
Internal flash |
Inserted |
|
Table 5. boot Command (SD Card Boot Behavior Prior to 17.10.1)
Command |
Boot Source |
SD Card Status |
Behavior |
Message Displayed |
boot |
SD card |
Present |
|
None |
boot |
SD card |
Removed |
Boot/config path not saved; system attempts to boot from flash if image is available |
WARNING: The BOOT/config file path points to the SD flash card and the SD flash card is not present. The environment variable(s)
is not saved.
NOTE: This warning message is displayed only once.
|
boot |
Internal flash |
Inserted |
|
None |
Table 6. boot Command (Internal Flash Boot Behavior with SD Card Inserted from 17.10.1)
Command |
Boot Source |
SD Card Status |
Behavior |
boot |
Internal flash |
Present |
-
If the boot path points to internal flash, system boot path is set to flash
-
If the boot path points to SD card, system boot path is set to SD card
Note
|
The configuration path cannot be set manually, as it is always stored in internal flash memory.
|
|
Table 7. boot Command (Internal Flash Boot Behavior with SD Card Inserted prior to 17.10.1)
Command |
Boot Source |
SD Card Status |
Behavior |
Message Displayed |
boot |
Internal flash |
Present |
If the boot or config path points to internal flash, the system boot path or config file is saved to internal flash |
None |
boot |
Internal flash |
Removed |
If the boot or config path points to SD card, the system boot path or config file is saved to SD card |
WARNING: The BOOT/config file path points to the SD flash card. The environment variable(s) is saved onto the SD flash card.
NOTE: This warning message is displayed only once.
|
sync Command
The sync command copies the Cisco IOS-XE image directory, configuration files, and boot parameters from the internal flash memory
to the SD card. Prior to 17.10.1, you could copy from the SD card to the internal flash memory as well.
Table 8. Components and Files Copied by sync Command
Component
|
Included Files
|
Cisco IOS XE Image Directory
|
|
Configuration Files
|
-
NVRAM config files
-
VLAN configuration file (vlan.dat )
-
DLR, PNP, and CIP config files
|
Boot Parameters
|
Cisco IOS XE boot parameters
|
Prior to 17.10.1
After copying the files, the sync command verifies whether the Cisco IOS-XE image is appropriate for the switch model and that sufficient destination flash
memory is available. If a potential issue is detected, the sync process is aborted.
When the verification is successful, the sync command retrieves the files from the SD card and overwrites the destination Cisco IOS-XE image directory and configuration
files. By default, the sync command overwrites the destination files. However, there is an option to save the old files, overriding this default behavior.

Note
|
If the running configuration has not been saved before running the sync command, the switch prompts you to save the running configuration before proceeding.
|
Table 9. sync Command Options
Command |
Purpose |
Examples
|
sync sdflash |
Synchronizes the Cisco IOS-XE image directory, configuration files, and boot parameters from internal flash memory to the
SD card and restores the IE switch in install mode by default.
|
Switch# sync sdflash
|
sync sdflash: ios-image <ios-image-name> |
Synchronizes the Cisco IOS-XE image directory from internal flash memory to the SD card.
|
Switch# sync sdflash: ios-image ie3x00-universalk9.17.10.01.SPA.bin
|
sync sdflash: restore-bundle |
Synchronizes the Cisco IOS-XE image directory from internal flash memory to the SD card to restore the IE switch in bundle
mode.
|
Switch# sync sdflash: restore-bundle
|
sync sdflash: skip [all|config|ios-image] |
Synchronizes either the Cisco IOS-XE configuration or the Cisco IOS-XE image directory flash memory to the SD card.
|
Switch# sync sdflash: skip ios-image
|
SD Card Alarms
The SD card alarms notify users of potential issues related to the SD card. See the table below for alarm details.
By default, the SD card alarms are disabled. To activate the alarms, use the options of the alarm facility sd-card global configuration command. Additionally, you can configure the alarms and associated traps to be sent to syslog and the
SNMP server.
Table 10. SD card alarm facility command options
Command |
Purpose |
Examples
|
enable |
Enables the SD card alarm feature |
Switch(config)# alarm facility sd-card enable
|
notifies |
Enables notifications to the server |
Switch(config)# alarm facility sd-card notifies
|
relay |
Enables relay setting |
Switch(config)# alarm facility sd-card relay major
|
syslog |
Enables system logging |
Switch(config)# alarm facility sd-card syslog
|

Note
|
To disable the alarm, use the following commands:
no alarm facility sd-card enable— disables the alarm facility enabled for the SD card.
clear facility-alarm—clears the alarm warning state for the alarms configured on the switch.
|