Andreas's picture

I came across turnkey while trying to find a solution for this issue, and ended up posting on the blog.

But the forum is the better place for this, so I will repost what I am trying to do.



I'm trying to convert a virtual machine with MikroTik Router OS into a bootable configured ISO of the configured OS. ISO --> Virtual Machine --> ISO of the VM


Link to the Installation ISO:


I've managed to properly follow the instructions here:

I had my own gotcha when trying to mount the raw image. There is some offseting that needs to be accounted for.

I found that information gleaned from here:


Basically have to mount the RAW image with and offset of 512 to id the filesystem (ext2) properly.

/sbin/fdisk -l -u mikrotik.raw

This will actually mount an image properly, so just modify it as the Gotcha above for partitions.

mount -o loop,offset=512 mikrotik.raw /mnt/mikro/


The two partitions are /boot and /

The first is /boot the second is / 



I've copied files from the / partition, and ran the script tklpatch-prepare-cdroot but the script bombs out about at: 

tklpatch-prepare-cdroot Mikrotik/
# preparing cdroot
basename: missing operand
Try `basename --help' for more information.
cp: omitting directory `Mikrotik//boot/'


I'm just stuck now, I don't know how to (or if I need to) properly add both partitions to the image nor will the script run on the rootfs gleaned from one of the partitions.

If anyone can help I would appreciate this. If someone wants to try it themselves, the specifications for the Virtual Machine are 

Virtual Machine

Type - Other Linux 2.6 32 bit,

Storage - Needs less than 100 megabytes.

Memory - 128 or more.

Jeremy Davis's picture

But going from the extra info you've supplied here my guess would be the fact that it has multiple partitions (the tute only applies to single partition virtual HDDs). I'm sure it's possible to do what you are trying to but I have no idea about that, or other possible mods you may need to make to get it to work right.

Like I said in my other post, have you tried asking them directly? If anyone would know if/how it could be done it'd surely be them!?

Add new comment