Partitioning a CCR

Hi

found this
http://wiki.mikrotik.com/wiki/Manual:Partitions

Sounds like a best practices.

Now what happens to my installed CCR when i repartition will I wipe my working config or will it preserve it ?

THanks

Warning: the procedure erasing all data!

And remember to update bootloader (BIOS / Firmware) to last 3.x or you can not boot anymore the CCR until you use netinstall for repartition all.

so what does it boot into ?? will i need a console

The procedure (from my point of view):

Install on the board last RouterOS, install last BIOS [Firmware],
do this command on console:

/partitions repartition partitions=2;

when reboot you have one “just installed” partition and one empty called part0 and part1

copy running os to partition 2:

/partitions copy-to partition=part1

and now you have two working partition.

configure the os as you want, when done you can copy the config (also you can schedule that) from active partition for backup with:

/partitions save-config-to partition=part1


If for some problem you want boot from backup partition (when reboot) do this:

/partitions activate part1

You also can downgrade / upgrade single OS in the specific partition, like on the main partiton install 6.7 stable, and on second install 6.13 to test… :unamused:

It’s all simple, but must be partitioned first.

Will the configuration of first/original partition survive the repartitioning process? Will be possible to import backup after repartitioning to both partitions?

Will the configuration of first/original partition survive the repartitioning process?
Yes, but is ungaranted…

Will be possible to import backup after repartitioning to both partitions?
As normal on first, with save-config on the seconds (read my previous post)

when reboot you have one “just installed” partition and one empty called part0 and part1


yeah but what does it boot into … some default routeros ??

It will boot into the first available partition, which is set to active by default.
If you want to boot into another partition, Like rextended mentioned, you have to set it to active and reboot.

Hi

Sorry i am not being clear.

It says when you repartition you loose all data. I am wondering whats left then …

Do I need to unplug my ccr from the switch and connect a console or ?

You will not lose any data. Repartiton keeps your existing system as it is, it just shrinks it’s disk size.

great

I will still try it in the lab first though :slight_smile:

Thanks

I use it myself - I have 3 partitions:

  1. LIVE - Stable ROS
  2. BACKUP - Stable ROS - I backup config from LIVE before making major changes, if those changes fail miserably I boot into this partition as pure kind of restore point. Safe Mode does a similar thing but I like to have this handy as well
  3. TEST - New ROS - I will boot into a new RouterOS update to test if it works, if not revert back to the stable partition.

definitely, one thing I don’t like about safe mode is the buffer is not beg enough to do rewrite of all the firewall rules.

I would have a sticker on all the CCR’s … BEST PRACTICE PARTITION YOUR DEVICE.

what would be good is some sort of timer. so set timer to reboot to backup parititon, do work if all is okay stop timer else it reboots.

A

I’m working on scripting for this actually for that very reason, a run at start time script that if not disabled within 10 minutes or so of boot, will change to safe partition and reboot.

Edit: It definitely is good for the bigger devices, but some of the smaller mips devices dont have much HDD space to partition 3 ways lol. I do this on my RB1100AHx2’s and my CCR1036’s

You can select only needed packages (bad practice, is best use routeros-xxx-xxx.npk) for small hd devices.

But partiton 3 for test new version?
I think is better to not test the new version on distant devices…

Of course you test locally as much as you can but there is always the chance that the specific device on the other end may still have problems. Rather too much than not enough.

I’d like to try this feature, but I’m having issues on a CCR1036-12G-4S.

I’ve created 3 partitions, but if I “copy-to” from winbox or the console when I reboot after activating one of the two newly created partitions they fail with the message: kernel not found or data corrupted" and then fall back to part0.

Firmware is 3.13 and routeros is 6.13.

Do I need to netinstall into part1/2 instead?

tried this on my test box’s

very very simple

upgrade firmware to 3.13 rebooted
repartitioned to 4
reboot .. came up with current working config (nice work)
copied the current active partition to the other 4

very very simple, all done over the wire

Just for reference, on CCR1036-12G-4S (6.14 & 3.13fw) I can partition, copy-to and boot with 2 or 4 partitions created. However I get kernel failures and fallback to part0 if I try to use 3 partitions (a reformat and copy-to).

That should go into the docs as currently this is not clear at all:

http://wiki.mikrotik.com/wiki/Manual:Partitions currently states this very vague description:

repartition (integer) Will reboot the router and reformat the NAND, leaving only active partition.

–jeroen