Community discussions

MikroTik App
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Partitioning a CCR

Mon Jun 02, 2014 3:15 am

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12557
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Partitioning a CCR

Mon Jun 02, 2014 3:27 am

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.
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Mon Jun 02, 2014 6:22 am

so what does it boot into ?? will i need a console
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12557
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Partitioning a CCR

Mon Jun 02, 2014 12:00 pm

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... :roll:

It's all simple, but must be partitioned first.
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Partitioning a CCR

Mon Jun 02, 2014 6:01 pm

Will the configuration of first/original partition survive the repartitioning process? Will be possible to import backup after repartitioning to both partitions?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12557
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Partitioning a CCR

Tue Jun 03, 2014 2:39 am

>>>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)
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Tue Jun 03, 2014 7:10 am

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 ??
 
Rudios
Forum Veteran
Forum Veteran
Posts: 977
Joined: Mon Mar 11, 2013 12:58 pm
Location: The Netherlands

Re: Partitioning a CCR

Tue Jun 03, 2014 8:30 am

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.
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Tue Jun 03, 2014 8:33 am

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 ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Partitioning a CCR

Tue Jun 03, 2014 8:46 am

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.
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Tue Jun 03, 2014 11:57 pm

great

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

Thanks
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 775
Joined: Mon May 27, 2013 2:05 am

Re: Partitioning a CCR

Wed Jun 04, 2014 2:27 am

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.
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Wed Jun 04, 2014 2:32 am

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
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 775
Joined: Mon May 27, 2013 2:05 am

Re: Partitioning a CCR

Wed Jun 04, 2014 7:02 am

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12557
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Partitioning a CCR

Wed Jun 04, 2014 12:59 pm

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...
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 775
Joined: Mon May 27, 2013 2:05 am

Re: Partitioning a CCR

Thu Jun 05, 2014 1:20 am

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.
 
normalcy
newbie
Posts: 42
Joined: Tue Jan 03, 2012 6:35 am
Location: Brisbane, Australia

Re: Partitioning a CCR

Thu Jun 05, 2014 9:41 am

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?
 
AlexS
Member Candidate
Member Candidate
Topic Author
Posts: 282
Joined: Thu Oct 10, 2013 7:21 am

Re: Partitioning a CCR

Sun Jun 08, 2014 6:15 am

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
 
normalcy
newbie
Posts: 42
Joined: Tue Jan 03, 2012 6:35 am
Location: Brisbane, Australia

Re: Partitioning a CCR

Tue Jun 10, 2014 6:29 am

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.
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).
 
jeroenp
Member Candidate
Member Candidate
Posts: 159
Joined: Mon Mar 17, 2014 11:30 am
Location: Amsterdam
Contact:

Re: Partitioning a CCR

Thu Oct 06, 2016 7:44 pm

You will not lose any data. Repartiton keeps your existing system as it is, it just shrinks it's disk size.
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

Who is online

Users browsing this forum: burca, garyjduk, Mosmos and 33 guests