{"id":583,"date":"2020-09-17T13:15:33","date_gmt":"2020-09-17T12:15:33","guid":{"rendered":"https:\/\/zed-network.fr\/?p=583"},"modified":"2020-09-17T13:15:34","modified_gmt":"2020-09-17T12:15:34","slug":"how-to-increase-bootflash-on-nexus-9k","status":"publish","type":"post","link":"https:\/\/zed-network.fr\/?p=583","title":{"rendered":"How to increase \/bootflash on Nexus 9K"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">On the old version of N9K, the size for \/bootflash was around 7.5G. This size could be an issue with the new version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example with the old size :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bash-4.2$ df -h | grep bootflash\n\/dev\/sda4 7.5G 3.2G 4.3G 43% \/bootflash\n\/dev\/loop9 190M 1.6M 178M 1% \/bootflash\/.rpmstore\/patching\n\nbash-4.2$ sudo fdisk -l\n\nWARNING: GPT (GUID Partition Table) detected on '\/dev\/sda'! The util fdisk doesn't support GPT. Use GNU Parted.\n\n\nDisk \/dev\/sda: 64.0 GB, 64023257088 bytes\n255 heads, 63 sectors\/track, 7783 cylinders, total 125045424 sectors\nUnits = sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 4096 bytes\nI\/O size (minimum\/optimal): 4096 bytes \/ 4096 bytes\nDisk identifier: 0x00000000\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sda1               1   125045423    62522711+  ee  GPT\nPartition 1 does not start on physical sector boundary.\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To increase the size, you need to reload the switch. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: During this process, you need to format \/bootflash. Don&#8217;t forget to save your file<\/strong>s<strong> (Config, Binaries, License, etc.)<\/strong> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Try to backup these files on one USB key to restart quickly after the disk initialization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During the reload, you need to break the boot with CTRL + C, then enter the command: cmdline recoverymode=1 and then boot on the NXOS image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you are in loader.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">                Loader Version 7.66\n\nloader &gt; cmdline recoverymode=1\n\nloader &gt; boot bootflash:nxos.9.3.5.bin\n\nSecurity Lock\nBooting bootflash:nxos.9.3.5.bin\nTrying diskboot\n Filesystem type is ext2fs, partition type 0x83\nImage valid\n\n\nImage Signature verification was Successful.\n\nBoot Time: 9\/16\/2020  10:49:3\n\nSecurity Lock\nInstalling klm_card_index\ndone\nLinking n9k flash devices\ncreating flash devices BOOT_DEV= sda\nINIT: version 2.88 booting\nInstalling ata_piix module ... done.\nUnsquashing rootfs ...\nEnabling 8250 serial driver spurious INTs workaround\nInstalling isan procfs ... done.\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now your are in the mode boot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the following command to repartition the disk: <em>init system<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">switch(boot)# ?\nExec commands:\n  clear      Reset functions\n  config     Enter configuration mode\n  copy       Copy from one file to another\n  delete     Delete a file or directory\n  dir        Directory listing for files\n  exit       Exit from the EXEC\n  find       Find a file below the current directory\n  format     Format disks\n  init       Initialize internal disk\n  load       Load system image\n  load-nxos  Load nxos image\n  mkdir      Create new directory\n  move       Move files\n  no         Disable debugging functions\n  pwd        View current directory\n  reload     Reboot this supervisor module\n  rmdir      Remove existing directory\n  show       Show running system information\n  sleep      Sleep for the specified number of seconds\n  ssh        SSH to another system\n  start      Load bash shell\n  tail       Display the last part of a file\n  telnet     Telnet to another system\n  terminal   Set terminal line parameters\n  write      Write current configuration\n\nswitch(boot)# init system check-filesystem\nThis command is going to erase your startup-config, licenses as well as the contents of your bootflash:.\nDo you want to continue? (y\/n)  [n] y\nInitializing the system ...\nChecking flash ...\nErasing Flash ...\nPartitioning ...\nPartitioning successfull\nFormatting bootloader: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nInitializing startup-config and licenses ...\nFormatting cfg0: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nFormatting cfg1: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nFormatting pss: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nFormatting plog: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nFormatting bootflash: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nFormatting logflash: ...\nmke2fs 1.42.9 (28-Dec-2013)\nChecking for bad blocks (read-only test): done\nMounting ...\nmount: can't find \/mnt\/plog in \/etc\/fstab\nERROR: cannot mount filesystem\nResetting CMOS to default configuration ...\nReinitializing NVRAM contents ...\nInitialization completed.\n\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now your disk is empty but the size have been increase. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">switch(boot)# dir\n16384 Sep 16 2020 10:53:54 lost+found\/\nUsage for bootflash: filesystem\n2783354880 bytes used\n50802970624 bytes free\n53586325504 bytes total<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this time, the best way is to copy the NXOS image from USB or TFTP to bootflash and the reload.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On the old version of N9K, the size for \/bootflash was around 7.5G. This size could be an issue with the new version. Example with the old size : bash-4.2$ df -h | grep bootflash \/dev\/sda4 7.5G 3.2G 4.3G 43% \/bootflash \/dev\/loop9 190M 1.6M 178M 1% \/bootflash\/.rpmstore\/patching bash-4.2$ sudo fdisk -l WARNING: GPT (GUID Partition [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[4,29],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-cisco","category-nxos"],"_links":{"self":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=583"}],"version-history":[{"count":2,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":585,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions\/585"}],"wp:attachment":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}