Jump to content











Photo
- - - - -

Where can I get a copy of mbr.lilo now?


Best Answer xpt , 10 August 2019 - 01:01 PM

Finally found one, from my old archive (pat myself on the back, :) )

 

 

Go to the full post


  • Please log in to reply
17 replies to this topic

#1 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 27 July 2019 - 04:00 PM

The Linux package lilo used to ship its own version of MBR (which is superior than MS' BTW), but not any more. 

 

In fact, I've searched "every corner of the earth" including hunting down the lilo's home page and opened its source package, but am still unable to find that mbr.lilo file that I used to have so easily. 

 

Anyone know where I can get a copy now, or have a copy yourself? Thx. 

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15076 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 27 July 2019 - 05:06 PM

Well, lets say that your definition of "every corner of the earth" differs from mine:

 

https://thestarman.p...mbr/LILOmbr.htm

according to the above the source is either in file first.s or mbr.s, but you can copy and paste from the page if you want just the mbr code (for Lilo 20).

 

You can compile mbr.s if you want the code for Lilo 22:

http://www.ibiblio.o...stem/boot/lilo/

 

Maybe the mbr.lilo file you remember was in a particular build of Lilo, ot of some other utility/booting tool, I don' t think it was ever part of the official release, I seem to remember it was always "embedded".

 

:duff:

Wonko

 

Also check:

https://web.archive....debian.org/ftp/

 

https://web.archive....org/ftp/archiv/



#3 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 27 July 2019 - 06:22 PM

Thanks Wonko for your reply. I was looking for the binary file, never know where it compiles from before, so I can't find what I don't know... anyway,

Found that EasyBCD might have one --  "I needed it for the now-released EasyBCD 1.5"

still digging for the binary file as I've never compiled assembly under Linux before, and am not very comfortable doing that myself...



#4 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 27 July 2019 - 06:33 PM

 

 


 

Maybe the mbr.lilo file you remember was in a particular build of Lilo, ot of some other utility/booting tool, I don' t think it was ever part of the official release, I seem to remember it was always "embedded".

 

 

 

 

Ahh..., I think you are right, no wonder I can't find it using "mbr.lilo" as the keyword. 

 

Now you've shown me the entirely new way of finding the answer... 



#5 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 27 July 2019 - 06:36 PM

Or maybe it is syslinux that provides a mbr image file within its package?
It's been quite a while since I did it before, so the memory is dim now... 



#6 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 27 July 2019 - 08:34 PM

saw

 

Installing LILO on a USB external hdd

https://www.linuxque...nal-hdd-738209/

 
and dismissed the idea to install it then get its image dump, and went with
 

Install a new mbr to your USB flash device

https://www.pendrive...b-flash-device/

 
instead. 
 


#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15076 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 July 2019 - 09:36 AM

Yep, but the "issue" AFAICU is that the Lilo, for *whatever* reasons doesn't use the "usual" (at least in the remaining zillion of similar tools) approach of having *somewhere* a copy of the "static" MBR code (possibly aligned to sector) that you can simply dd to the the MBR of the target, and it includes, according to the given reference:

https://thestarman.p...mbr/LILOmbr.htm

 

some "custom" or "customizable" fields, namely:

lba (optional)

Input Timeout
Boot Delay

TimeStamp

 

So, even if the Author had chosen to "store" it inside an executable in its "easily dd-able" form, those fields would need to be updated or they would be not valid (or not current).

 

If you get the "latest" lilo-22.8.bin.static.tar.gz, the MBR code is inside /sbin/lilo starting at offset 0x080144 (more generally search the file for the hex sequence B8C007 and look a little before for string "LILO" and again a few bytes before for FAEB, start from there and get 512 bytes, the magic bytes at the end 55AA are missing but that is easy to fix).

 

The above should be applicable to earlier versions as well, but you need of course the built binaries (that you can probably find in early versions of the various Linux distro's).

 

However - allow me - I have to disagree on the notion that this Lilo MBR is in any way "better" than any other, particularly the MS ones, simply because the MS ones have been surely tested on each and every possible PC hardware on the earth, and in any case, the "best" (IMHO) MBR code is the Syslinux one (either the original by Peter H. Anvin or the slightly modified version by Andrea Mazzoleni for makebootfat).

Both are so simple (and compact and well commented, and easy to build) that even myself managed to half-@§§edly modify/hack them to suit various experimental projects, in any case in my experience I have never found a PC that could not properly boot with them (or the MS ones).

 

:duff:

Wonko

 

P.S.: I personally use a 6' stick to NOT touch EasyBCD :ranting2: , it shouldn't (IMNSHO) even be mentioned on a serious technical board, as it is basically an assembly (mish-mash) of ripped off open source projects either mis-attributed or non-attributed and of proprietary (property of someone else, BTW) binaries, it includes non-redistributable files, managing to violate at the same time both all possible open source licenses AND the various MS licenses/EULA's (and BTW it is not like the Author - if we can call him so - behaves as a nice guy). 



#8 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 28 July 2019 - 01:58 PM

First off, totally agree with your opinion on the EasyBCD, I was desperately trying to find my answer, but when I take a closer look at it, I close its browser window within a second or two. 

 

Thanks for your suggestion/conformation that MBR code of the Syslinux is the best one. The reason I am specifically looking for lilo mbr is that, it has the advantage of being able to boot directly from extended partition. Do you know if Syslinux's MBR code can do that or not? Anyway, I believe syslinux  provides a mbr image file from one of its packages, or at least used to. I'll use that from now on. 

 

BTW, have you heard/experienced the following Debian/Ubuntu package at all? 

 

 

$ apt-cache show mbr

Package: mbr
Architecture: amd64
Version: 1.1.11-5.1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Santiago Garcia Mantinan <manty@debian.org>
Bugs: https://bugs.launchp...ubuntu/ filebug
Installed-Size: 47
Depends: libc6 (>= 2.4)
Filename: pool/universe/m/mbr/mbr_1.1.11-5.1_amd64.deb
Size: 19644
Description-en: Master Boot Record for IBM-PC compatible computers.
The MBR is used in booting operating systems from the hard disk. It
runs first, then transfers control to the operating system's loader
which transfers control to the kernel.

 

thx



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15076 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 July 2019 - 02:45 PM

The reason I am specifically looking for lilo mbr is that, it has the advantage of being able to boot directly from extended partition. Do you know if Syslinux's MBR code can do that or not? 

The issue is that a MBR code (a "normal" one) has to do two things:
1) do some initializations

2) chainload the PBR of the active, primary partition in the MBR

 

The above is non-negotiable :w00t: :ph34r:

 

To be picky - as I am - what you mean is not "extended partition" but rather "logical volume inside extended partition".

 

Now, a number of operating systems have a bootloader that can be invoked directly bypassing the PBR.

 

So, (it depends on the actual OS) it is entirely possible to have a MBR that chainloads a file independently from where it resides on disk, BUT - usually - this involves EITHER hardcoding in the MBR area the extents where this file is residing (AFAICT this is also what Lilo does/did) which makes it cumbersome to "port" it to a different disk (or creates havoc if the file is moved) OR having MBR code that exceeds the 512 bytes size.

 

The good news are that it is perfectly possible to boot chainloading the PBR of a logical volume inside extended partition BUT a number of OS's will need to "correct" the "sectors before" in the PBR data.

 

The full explanation is here:

https://www.goodells...artitions.shtml

https://www.goodells...ot/ptable.shtml

 

Syslinux MBR code is "kosher", i.e. it is 512 bytes in size and loads the PBR of the active primary partition, than the PBR loads the Syslinux executable and this latter can chainload almost anything.

 

Grub4dos MBR is not "kosher" in the sense that it is larger than 512 bytes (it is actually 8192 bytes) but it loads grldr "directly" and from a booted instance of grldr you can chainload *anything*. Though nothing prevents from using an approach similar to Syslinux, a "normal" MBR and a PBR that invokes grldr.

 

The (lesser known) UMBR (still by Chenall, current maintainer of grub4dos together with Yaya) is 512 bytes in size and can boot a grldr (but the position of this file is hardcoded, so an "install" is needed).

 

The (half-@§§ed) MBR I made (from Syslinux/makebootfat original code) is 512 bytes in side and can boot *any* volume (be it primary or logical) but the position of this volume needs to be hardcoded (and can even be NOT any of the partition entries in the MBR or EMBR) so an "install" is needed (AND if a logical volume is used the "sectors before" need normally to be corrected).

 

I already gave you the references for these two:

http://reboot.pro/to...pt-under-linux/

 

The MBLDR is 512 bytes and allows choosing which volume to boot from (both primary and logical) at boot time:

http://mbldr.sourceforge.net/

(I seem to remember that - like the partnew function of grub4dos - it corrects the "sectors before" of logical volumes but it needs to be checked)

 

:duff:

Wonko



#10 ady

ady

    Frequent Member

  • Advanced user
  • 165 posts

Posted 28 July 2019 - 08:03 PM

FWIW, Syslinux includes a "normal" (and "kosher", as per Wonko's "definition" :) MBR and several other alternatives. See:

* www.syslinux.org/wiki/index.php/Mbr

* www.syslinux.org/wiki/index.php/Isohybrid#MBR_selection


Other than using one of the alternative MBR files included in Syslinux, if you happen to have Syslinux installed in the "active" partition then you could use chain.c32 in order to boot some logical partition. Or, use "altmbr.bin".

It all depends on your actual scenario, use-case and needs. My point: there are several alternative methods.


On a (minor) side-note, the http://ms-sys.sf.net/program provides the possibility of installing one of several MBR codes, among other options.

The MBR from TestDisk might be of interest too (used by "install-mbr", and one of the alternatives offered by the ms-sys tool). But, to boot a logical partition it might need some "assistance" (IIRC).



#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15076 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 July 2019 - 08:12 AM

FWIW, Syslinux includes a "normal" (and "kosher", as per Wonko's "definition" :) MBR and several other alternatives. See:

* www.syslinux.org/wiki/index.php/Mbr

* www.syslinux.org/wiki/index.php/Isohybrid#MBR_selection

That are all "kosher" in the sense that they fit in first sector anwyay and because they actually only chainload the bootsector (PBR) of a given partition, with the exception of a couple ones (of the "isohybrid" family) that instead will (or can) pass control to the first hard disk MBR.

 

:duff:

Wonko



#12 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 10 August 2019 - 01:01 PM   Best Answer

Finally found one, from my old archive (pat myself on the back, :) )

 

 

Attached Files



#13 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 10 August 2019 - 01:01 PM

Finally found one, from my old archive (pat myself on the back, :) )

 

 



#14 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 10 August 2019 - 01:02 PM

Finally found one, from my old archive (pat myself on the back, :) )

 

 



#15 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 10 August 2019 - 01:04 PM

where is my attachment? Tried 3 times, and never worked for me. 

and I don't seem to have the ability to delete those duplicates myself... 



#16 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 13 August 2019 - 12:36 PM

try again...



#17 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15076 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 13 August 2019 - 03:21 PM

Hmmm.

Can't you edit one of the previous posts you made?

I.e. do you see an "Edit" button on the bottom right of yout posts?

Then, what happens if you click on it?
Do you see in the lower part of the browser window an "Attach Files"?
There should be a "Select" button (it may be different, in Italian I have "Sfoglia") and below it a larger button "Attach This File" with next to it "You can upload up to 2.44MB of files (Max. single file size: 2.44MB)" or somethign like that.

What EXACT file are you trying to upload?

If it is a binary, compress it in a .zip (better) or .7z archive, it is entirely possible that the board software/protection/antivirus/whatever doesn't like your uncompressed file.

:duff:
Wonko

#18 xpt

xpt

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    Canada

Posted 16 August 2019 - 12:09 AM

Thanks -- that "Attach This File" button doesn't look like a button at all in my browser more a label saying "doing attach here" to me. Stupid me. Thanks!

 

Now, how to delete posts? Can you help deleting those those duplicates for me please? (I was trying on the "try again..." one but didn't find the "delete")






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users