2024-12-21 16:01:13


r00t.cz


Satellites

My Software

Hardware

Misc stuff

Links

Running Mikrotik Netinstall from CF card

Page: Misc.MikrotikNetinstallFromCF - Last Modified : Mon, 27 Aug 18

Why?

It sucks to just throw away such a great board like RB800 just because main ethernet port doesn't work. Main problem is that BIOS can only boot from main port and and no other port. So if flash gets corrupted and your main CPU LAN port is dead, it's pretty much bricked. Well... NO MORE!

How to

1. First, download Mikrotik netinstall.exe
2. Open the EXE in Resource hacker and you will see various binary resources under RCData. These are the network boot kernels for various supported architectures. Save them all to disk (right click - save as bin file)
3. Find correct kernel to use. Easiest is to grep them for CPU related strings, like "e300" - CPU of RB600. For PPC, CPU types are listed just after "cputable.c" string

Resource numberArchitecture
129PPC e300c
130PPC e500
131MIPS RB5xx?
135PPC ppc470
136TILE
137ARM
138MIPS RB4xx/7xx

(Note: these numbers might change in every netinstall version, so don't rely on them)
4. Convert BIN file to kernel: These resource files have extra 4 bytes at the beginning you have to skip. Use DD like: dd if=129.bin of=129.krnl bs=4 skip=1 where 128.bin is the resource you saved and 129.krnl is output kernel image.
5. Get 16MB or bigger CF card and delete all partitions on it
6. Using linux "fdisk" or other disk editor, create single partition that's big enough to hold your netinstall kernel bin file (doesn't need to be exact size, just same or bigger... but not too big either as it's copied to RAM on boot!).
7. No need to format it, but you HAVE TO set partition type to 0x27 otherwise it will not boot
8. Now use DD to copy netinstall kernel file into partition, ie. something like: dd if=129.krnl of=/dev/sda1. Formatting it FAT16 and copying file to it WILL NOT WORK, don't be stupid.
9. Insert CF card to Routerboard and set it to boot from CF card in BIOS. Also make sure you have netinstall running on PC, connected to any LAN port on the Routerboard:

Select boot device:
   e - boot over Ethernet
   n - boot from NAND, if fail then Ethernet
 * c - boot from CompactFlash only
   1 - boot Ethernet once, then NAND
   2 - boot Ethernet once, then CompactFlash
   o - boot from NAND only
   b - boot chosen device
   f - boot Flash Configure Mode
   3 - boot Flash Configure Mode once, then NAND
your choice: b - boot chosen device
Booting CF
Loading kernel... done
setting up elf image... OK
jumping to kernel code

At this point usual netinstall should run an appear on serial console

And Routerboard should appear in device list in netinstall and you will be able to reinstall it normally.


All content on this webpage is published for personal use only.
You are using any software downloaded from this page at your own risk. Some software may be illegal to use in your country.


© r00t 2009-2021 (email: r00t@<this domain>)