Re: identifying a boot loader
- From: Daniel Chicayban Bastos <dbastos+0@xxxxxxxxxx>
- Date: Tue, 12 May 2009 12:59:26 +0000 (UTC)
Probably due to my fault, somehow I posted a draft of my message
instead of the final version. I'm hopefully posting a correct one now.
In article <slrngv0dia.a1u.dbastos@xxxxxxxxxxxxxxxxxxxxxx>,
Daniel Chicayban Bastos wrote:
In article <13e18$49ec9706$cef881f4$17481@xxxxxxxxxxxxxxxxx>,
Lew Pitcher wrote:
On April 20, 2009 10:12, in comp.unix.questions, Daniel C. Bastos
(dbast0s@xxxxxxxxxxxx) wrote:
In article <b4f71$49ec7150$cef881f4$18593@xxxxxxxxxxxxxxxxx>,
Lew Pitcher wrote:
On April 20, 2009 04:30, in comp.unix.questions, Daniel C. Bastos
(dbast0s@xxxxxxxxxxxx) wrote:
I'm also looking for a more appropriate newsgroup to post this. Feel
free to set a followup-to.
I'm trying to identify a particular bootloader used by a system called
Mikrotik (http://www.mikrotik.com/). It boots a Linux kernel. It is
not LILO nor GRUB because the word LILO and GRUB do not appear during
boot, and that seems to be a mark of these.
Apparently (from the website you point to), the boot loader is
"RouterBOOT" version 2.9. It appears to be a proprietary boot loader
embedded in the hardware of the router, and not a general purpose "disk"
boot loader.
(*) Observation 0
By the way, the boot loader, whatever it is, is a x86 boot loader,
since I'm using an x86 type of machine. I can remove the disk from the
machine, put it in another x86 machine, and it still works and boots
in the same way.
Also, I'm switched my investigations to the version 3.13 of the
system; this means the bootloader, which I offered in some http link
in previous messages, does not apply anymore. Even the boot loader
remains in 3.13, I've replaced the boot loader with grub anyway.
Version 3.13 brings three kernels, namely vmlinuz, vmlinuz-smp,
vmlinuz-xen. The -smp one seems to be the default one.
[...]
I may be wrong about which bootloader /you/ found (or did not find ;-) ),
but it appears that "RouterBOOT" is what Mikrotik uses for their router
hardware. I don't know what boot loader they use for their "Intel/AMD PC"
downloadable software. Which do you have?
I am not using a routerboard. I'm using, as you suspect, their system
in a usual Intel computer. This doesn't seem to matter, however, as
they say that RouterOS is what's used in either one of these two
categories (routerboard, PC).
In any case, my final objective is to add a kernel module to their
kernel, or even replace the entire kernel, but now I'm curious about
how their system is booting.
(*) Observation 1
By the way, the system comes with two partitions: /dev/hda1 and
/dev/hda2. In /dev/hda1, we find initrd, kernels, et cetera; we can
delete all those kernels and initrds and the system still boots fine.
(*) Observation 2
Their bootloader passes
ro root=100 MBR=00000001 sid=5343697396414314293941BA
to the kernel.
If I overwrite the bootloader with grub, I need to input at least a
root= parameter such as root=100 or root=/dev/hda2, and the MBR=
parameter is also required. Otherwise, one of their programs called
`loader' which loads and unloads a kernel module called qwink, will
return 1, and the system will not finish its initialization properly.
See, for instance,
http://felinemenace.org/~andrewg/MikroTik_Router_Security_Analysis_Part2/
What does the value 100 in root=100 mean exactly?
(*) An operation
I wondered how hard it would be to run this system in a scsi disk. At
least one of the kernels they include in their version 3.13 brings
scsi support, but it turns out that their init program, included in
the initrd, looks for an IDE disk disk and tries to mount it.
I cloned the IDE disk to a SCSI one and booted to see
ERROR: could not find disk!
Please attach it somewhere else.
I added an empty IDE disk to the machine and booted to see
ERROR: could not mount disk!
In their original initrd, there is an init program at the root.
%pwd
/home/dbastos/mtik/2/rd0
%file init
init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
%
%strings init
WVS1
SVh+
read
mknod
ext3
/sysroot
ext2
tmpfs
/sysroot/initrd
none
/sysroot/initrd/dev
/sysroot/initrd/dev/root
ERROR: could not find disk!
Please attach it somewhere else.
/sysroot/initrd/dev/boot
ERROR: could not mount disk!
/sbin/init
execve
/dev/hda
/dev/hdb
/dev/hdc
/dev/hdd
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/xvda
In other words, any chance of booting this system in a SCSI disk will
require replacing this init program in the initrd. Without the source
code, it is not clear what this init is trying to do. Any thoughts?
.
- Follow-Ups:
- Re: identifying a boot loader
- From: Bill Marcum
- Re: identifying a boot loader
- Prev by Date: Re: identifying a boot loader
- Next by Date: Re: identifying a boot loader
- Previous by thread: Re: identifying a boot loader
- Next by thread: Re: identifying a boot loader
- Index(es):
Relevant Pages
|