Cisco IOS Boot System Image

This topic is to discuss the following lesson:

Hello Rene,
Thanks for your amazing articles.
Could you please let me know what is the use of the commands " boot-start-marker" & “boot-end-marker”, sometimes I saw them on running config.
is it a must? is it safe to delete them?
Thanks in advance.

Hi Wisam,

These define the boot section of your switch or router. You can’t remove them, they are always in your config. If there is nothing in between then it means that your router/switch will use the default method to select the IOS image. If you use any of the boot system commands, they will be added in between these two commands.

Here’s an example of how you can do that:

https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/cisco-ios-boot-system-image/

Rene

Thanks Rene for your reply.
but what about:

boot-start-marker
boot system flash:iosfilename.bin
boot-end-marker

why sometimes see the boot system command in it, while I can just run this command “boot system flash:iosfilename.bin” from the CLI just one time?

Thanks in Advance Rene.

Hi Wisam,

With that boot system command, you tell the router specifically to use that filename when it is looking for the IOS image. If you remove it, it will just look for the first IOS file that it finds on the flash memory…

Rene

1 Like

Thanks a lot Rene :slight_smile:

Hi Rene,

can we boot the IOS from TFTP for a switch? in this case, do we use the same configuration register to have the switch load the new image? thanks

Hi @hsawiris,

An alternative option on older switches, if you have a working IOS but would like to upgrade it, is to use the “copy” command.

First check the existing boot file structure:

CiscoCat2970#show boot | include BOOT
BOOT path-list      : c2970-lanbasek9-mz.122-40.SE.bin

Check the returned path. It might be in the format “iosname.bin” or in the format “flash:/iosname.bin”. Make sure to use the same path format in your configuration below.

copy tftp://10.10.10.10/someimage.bin flash:
conf t
boot system someimage.bin

or

copy tftp://10.10.10.10/someimage.bin flash:
conf t
boot system flash:/someimage.bin

Kind regards,
Jon.

Hi Jon

Maybe my question was not clear enough.

I have old switches with small flash that can’t take IOS 15. I was asking if we can make the switch run the IOS in its RAM without loading it from the flash. It means every time the switch boots with the original IOS, it will pick the new IOS from a TFTP server that’s connected to it. Rene had mentioned this in this topic but for routers. My question now is can we do the same for switches and if yes what is the configuration register. Thank you

Hany

Hello Hany

When a Cisco router boots up, it has to load its IOS image. By default the router first looks for boot system commands in startup-config file to find out where to locate the image. If it finds these commands, it will run boot system commands in order they appear in startup-config to locate the IOS. If not, the IOS image is loaded from Flash. If the IOS is not found in Flash, the bootstrap can try to load the IOS from TFTP server or from ROM (ROMMON).

There is no configuration register that tells the router to search for the IOS image from a TFTP server. Click on this link to see a list of configuration register values for Cisco routers and what they do.

Switches follow a similar but not identical process. During bootup, switches will first search for an IOS image based on the BOOT environment variable which is set using the boot system global configuration mode command similar to routers. If this variable is not set, the switch only searches its own flash file system by performing a recursive, depth-first search throughout all of the directory structures found there. If an IOS is still not found, the switch will run a low level IOS stored in its ROM called Rom Monitor or ROMMON. It does not search a TFTP server for the IOS.

If however you want to force your switch to use an IOS image that is stored on a TFTP server on the network during bootup, you can configure the BOOT environment variable in order to do so. Specifically, you can configure the commandboot system tftp filename [ip-address] so that at each bootup, the IOS image found there will be downloaded and loaded into RAM. More information about this command can be found under the command boot system at Cisco’s command reference.

I hope this has been helpful!

Laz

Hi Laz. Thanks for the reply

You said that there is no configuration register that tells the router to search for the IOS image from a TFTP server. However, Rene mentioned in the lesson that the boot system command is half of the story and we need to set the configuration register to 0x210F. Please read boot from network section. I am confused now!!!

1 Like

Hello again Hany.

I understand how my comments have been confusing. Let me try to clarify.

The purpose of the config register is to indicate to the router what behaviour it should have during bootup. It doesn’t specifically indicate to the router to go to TFTP to boot up but it tells the device whether or not to take boot system commands into account.

The default register for the router in the specific example Rene indicated was 0x2101. This config register makes the router function like so on bootup:

Boots into bootstrap
Ignores break
Boots into ROM if initial boot fails
9600 console baud rate

This bootup procedure will not look at any boot system commands. This means that even if you configure a boot system command, it will be ignored.

In order for the router to take the boot system command into account, you must change the register to an appropriate value. Specifically, the config register 0x210F will make the device go through the following steps on bootup:

boot system commands
Boots from flash
boot from ROM if initial boot fails
9600 console baud rate

So, the config register will tell the router to take the boot system commands into account and it is the boot system commands that tell the router to load from the TFTP server.

I hope this has been helpful!

Laz

Thanks Laz. My question now is can we do the same for the switch? I know we can use the boot system tftp command but do we need to change the configuration register?

Hany

1 Like

Hello Hany.

I believe I answered that in the previous post. The quick answer is yes, Here is an excerpt of my previous answer.

Just to clarify, configuration registers do not play a role in this procedure.

I hope this has been helpful!

Laz

Hi Laz,

If i understand correctly, we need to change the configuration register on a ROUTER so it takes the new boot command into consideration but we do not need to do the same on a SWITCH. in other words, using the command boot system tftp is sufficient on SWITCHES. am i right?

Hello Hany

Yes, you are correct. The switch checks for boot system commands by default, so if you configure them, it will use them.

I hope this has been helpful!

Laz

1 Like

Hi Rene,
Thanks for your nice article …
I want to be more clear about What is the job of configuration register ?? My understanding It will instruct router where have to search the IOS . Please make me clear on it once again dear .
What will happen if we set 0x2101,0x2102 and 0x210F ?? a little bit confusion here .

Also want to know when we will set 0x210F and put command Router(config)#boot system tftp c2800nm-adventerprisek9-mz.151-4.M12a.bin 192.168.1.2 . Then the IOS will be load from tftp to RAM directly or Load in Flash first . Confused that you have write the section Booting IOS image from network

br//zaman

Hello Mohammad

The configuration register essentially tells the router how to behave upon startup. This table found in Cisco documentation specifically tells you the results of each config register setting. To specifically answer your question:

* 0x2101 will make the router do the following:

  1. Boots into bootstrap
  2. Ignores break
  3. Boots into ROM if initial boot fails
  4. 9600 console baud rate
    * 0x2102 will make the router do the following:
  5. Ignores break
  6. executes boot commands in NVRAM
  7. Boots into ROM if initial boot fails
  8. 9600 console baud rate
  9. (default value for most platforms)

Keep in mind that any value from 0X2102 through to 0x210F is exactly the same as it tells the router to use the boot commands specified in NVRAM. So both 0x2102 and 0x210F give the same result. (See CIsco CCIE Study guide page 56)

So by using the 0x210F register, we tell the router to look in NVRAM (or the boot system commands that have been executed) to find out where to boot from. To answer your question, the IOS will be loaded into the flash memory, will be decompressed and then loaded into RAM.

I hope this has been helpful!

Laz

If the TFTP server is reachable to router is it necesaary to configure interface which is of same subnet

Hello Pavan

The TFTP server will be reachable to the router only if the interface is in the same subnet as the TFTP server. If the TFTP server is in a different subnet, then you can use routing between the router and the TFTP server to enable communication between them.

I hope this has been helpful!

Laz