Community discussions

MikroTik App
 
manuelritter
newbie
Topic Author
Posts: 41
Joined: Wed Sep 16, 2009 4:10 pm

Boot RouterOS with grub2

Fri Nov 04, 2011 2:38 pm

Hello,

for testing environment, i would like to have a computer with RouerOS and Debian 6 .
Every system works fine, RouerOS on primary master (hd0) and Debian on secondary master (hd1)
If i change the boot disk in bios, i can switch the OS, but i have no luck to do in grub2
I manually added this to grub.cfg
menuentry 'RouterOS'{
   set root='(hd0,msdos1)'
   linux	/boot/vmlinuz root=/dev/sda1 ro (also 2,3...)
   initrd	/boot/initrd.rgz
}
But i got file not found from
 linux	/boot/vmlinuz root=/dev/sda1 ro
Can anyone help me?

Best regards
Manuel Ritter
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Boot RouterOS with grub2

Sat Nov 05, 2011 6:38 pm

maybe you'd better use virtual machine for RouterOS?..
 
glucz
Member Candidate
Member Candidate
Posts: 123
Joined: Wed Jun 06, 2007 10:25 pm

Re: Boot RouterOS with grub2

Sun Nov 06, 2011 10:32 pm

To be honest, the question has merit ... I sometimes have to install ROS on remote PC's. I have used Xen, KVM, VMware or Virtualbox (whatever was available) and up to version 4.x this woked well. However 5.x runs very badly in Virtualized environments. VMware seems to be the most stable ... the rest range from terrible to unusable... So for 5.x it is best to install directly to the hardware. It would be nice if someone figured out a way to image ROS to a second disk and have grub load it.
 
manuelritter
newbie
Topic Author
Posts: 41
Joined: Wed Sep 16, 2009 4:10 pm

Re: Boot RouterOS with grub2

Thu Nov 17, 2011 5:26 pm

No idea for RouterOS with grub2?

Got one step forward.
menuentry 'RouterOS'{
   set root='(hd0,msdos1)'
   linux	/vmlinuz root=/dev/sda2
   initrd	/initrd.rgz
}
vmlinuz and initrd.rgz where found in root on sda1, system seems to be on sda2

Now it tries to boot, but got kernel panic
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Regards
Manuel Ritter
 
Norman
just joined
Posts: 7
Joined: Thu Jun 05, 2008 10:02 pm

Re: Boot RouterOS with grub2

Mon Dec 29, 2014 6:29 am

Old topic.
But a workaround to this is to have Grub chainload onto the Mikrotik bootloader.

Install Mikrotik RouterOS onto a properly sized disk.
Load up parted (livecd) change the size of your partition, move it on the disk as you see fit.

Install grub at proper MBR and setup to chainload onto the other partition.
Voila, there you got it.

License survives as the partition is intact (although moved), routerOS boots as it lets the original bootloader boot.

Personally I setup RouterOS as a smaller partition of say 12GB , Linux or any other system tools I need on other partitions that is installed AFTER the initial RouterOS install.
Then I have grub2 on a separate USB stick to hande bootloading or chainloading.

Who is online

Users browsing this forum: GoogleOther [Bot] and 224 guests