cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
28511
Views
5
Helpful
3
Replies

dir bootflash: and show bootflash: outputs are different :-/

manju.cisco
Level 3
Level 3

Hi All,

On 4507R-E switch, i noticed the output of commands "dir bootflash:" and "show bootflash" are different.

Can someone please explain me on below 3 points:

Q1. "show bootflash:" lists 2 files, where as "dir bootflash:" lists only 1 file ........what are the difference between these 2 commands.

Q2. I believe when there is no bootvar configured the switch should pick the 1st IOS and boot....am i right?

Q3. Even thought file 1 (IOS) is higher version, my switch did bootup with lower version IOS, there is not bootvar configured. I would like to know why the switch didnt boot with higher version.

Switch# show bootflash:  <<<< 2 files were listed

-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name

1   .D image        CA34E81D 1161A7C   39 17963516 May 2 2011 10:48:54 +00:00 cat4500-entservicesk9-mz.122-53.SG4.bin

2   .. image        43A8AF73 22567AC   38 17779888 May 16 2011 10:34:11 +00:00 cat4500-entservicesk9-mz.122-53.SG.bin

25543020 bytes available (35798676 bytes used)

Switch#

Switch# dir bootflash:   <<<< 1 file was listed

Directory of bootflash:/

    2  -rwx    17779888  May 16 2011 10:34:11 +00:00  cat4500-entservicesk9-mz.122-53.SG.bin

61341696 bytes total (25543020 bytes free)

Switch#

2 Accepted Solutions

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Q1. "show bootflash:" lists 2 files, where as "dir bootflash:" lists  only 1 file ........what are the difference between these 2 commands

Q2. I believe when there is no bootvar configured the switch should pick the 1st IOS and boot....am i right?

1   .D image        CA34E81D 1161A7C   39 17963516 May 2 2011 10:48:54 +00:00 cat4500-entservicesk9-mz.122-53.SG4.bin

D is for delete.  This file has been deleted,.  that is why it is not booting from the first image.

If the image was not deleted, then you are correct it would boot from the first one on the flash

This also answer q number 3.  It is not about higher or lower IOS image number.  If there is not boot loader specified, it will boot from the first image on the flash

HTH

Reza

View solution in original post

Hi,

Q1 "show  bootflash:" lists 2 files, where as "dir bootflash:" lists only 1 file  ........what are the difference between these 2    commands.

A:  I believe you should see the same result as "show bootflash" when using a "dir /all" command. "dir bootflash:" won't show files marked as delete aka "D" flag.

#######################################################

Q2. I believe when there is no bootvar configured the switch should pick the 1st IOS and boot....am i right?

A:  Config-register 0x2101 will boot your first image for sure. Config-register 0x2102 will point to a "boot system flash" command.

#######################################################

Q3. Even thought file 1 (IOS) is higher version, my switch did bootup with  lower version IOS, there is not bootvar configured. I would like to know  why the switch didnt boot with higher version

A: Your higer version is marked as delete aka "D" flag. You may notice that your space is used up to 35 Mb approximately (2 images). If you want to use the higher version one,try using an "undelete" command to bring it back. If you have 2 images in your bootflash,I'd recommend you to use a "boot system flash" command and change config-register to 0x2102. If you really want to delete the file,just use "squeeze bootflash:" to get your available space back from files marked as delete.

HTH,

Toshi

View solution in original post

3 Replies 3

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Q1. "show bootflash:" lists 2 files, where as "dir bootflash:" lists  only 1 file ........what are the difference between these 2 commands

Q2. I believe when there is no bootvar configured the switch should pick the 1st IOS and boot....am i right?

1   .D image        CA34E81D 1161A7C   39 17963516 May 2 2011 10:48:54 +00:00 cat4500-entservicesk9-mz.122-53.SG4.bin

D is for delete.  This file has been deleted,.  that is why it is not booting from the first image.

If the image was not deleted, then you are correct it would boot from the first one on the flash

This also answer q number 3.  It is not about higher or lower IOS image number.  If there is not boot loader specified, it will boot from the first image on the flash

HTH

Reza

Hi,

Q1 "show  bootflash:" lists 2 files, where as "dir bootflash:" lists only 1 file  ........what are the difference between these 2    commands.

A:  I believe you should see the same result as "show bootflash" when using a "dir /all" command. "dir bootflash:" won't show files marked as delete aka "D" flag.

#######################################################

Q2. I believe when there is no bootvar configured the switch should pick the 1st IOS and boot....am i right?

A:  Config-register 0x2101 will boot your first image for sure. Config-register 0x2102 will point to a "boot system flash" command.

#######################################################

Q3. Even thought file 1 (IOS) is higher version, my switch did bootup with  lower version IOS, there is not bootvar configured. I would like to know  why the switch didnt boot with higher version

A: Your higer version is marked as delete aka "D" flag. You may notice that your space is used up to 35 Mb approximately (2 images). If you want to use the higher version one,try using an "undelete" command to bring it back. If you have 2 images in your bootflash,I'd recommend you to use a "boot system flash" command and change config-register to 0x2102. If you really want to delete the file,just use "squeeze bootflash:" to get your available space back from files marked as delete.

HTH,

Toshi

girish_p1
Level 1
Level 1
I also have below two outputs to discuss. I want to know if I have below outputs then which image will be my device will boot from on next reload and the reason behind it.
Other one is can anyone let me know about the flags and "." and ".." directories in the output. Thanks in advance. 
dir bootflash:
Directory of bootflash:/
 
    2  -rwx    15747764  Jul 21 2010 12:38:49 +00:00  cat4500-ipbasek9-mz.122-50.SG6.bin
    3  -rwx    18095624  Mar 26 2018 03:33:31 +00:00  cat4500-ipbasek9-mz.150-2.SG11.bin
 
============================================================================================
 
sh bootflash:
-#- ED ----type---- --crc--- -seek-- nlen -length- ---------date/time--------- name
1   .D image        C385C73F  EB44B4   34 15156276 Dec 17 2009 07:33:05 +00:00 cat4500-ipbasek9-mz.122-46.SG1.bin
2   .. image        DDB35A26 1DB8FE8   34 15747764 Jul 21 2010 12:38:49 +00:00 cat4500-ipbasek9-mz.122-50.SG6.bin
3   .. image        CADA774E 2EFAE70   34 18095624 Mar 26 2018 03:33:31 +00:00 cat4500-ipbasek9-mz.150-2.SG11.bin