Log in

No account? Create an account

May. 3rd, 2007

My Bootloader - Here's how it was done...

The bootloader is a small program that resides in the first 512 bytes of the partition containing the kernel of the OS and boots it. So, if we get hold of these 512 bytes, we can invoke the OS of our choice. GRUB provides us the option of installing it in the MBR or in the first 512 bytes of the active partition. On the contrary, Windoze bootloader, the ntldr can place itself only in the MBR. That's how it was designed, but clever engineers in the open-source community have made a work-around for this stigma, in GRUB and other clones.

First I had 2 Windoze installations. The ntldr worked fine. It was installed in the MBR. My challenge was to invoke the GRUB using ntldr. A rather simple task after I accomplished it! Just copy the first 512 bytes of the linux partition into a file, and then reference this file in boot.ini (the bible and the koran and what not, of the ntldr). It now thinks this reference is a windoze installation itself, when it reads the entry in the file. But the "file" is actually the loader for the GRUB. Now the big question is how to get hold of the first 512 bytes. Simple. use 'dd' command! It's too simple to use.

Messed up bootloader? Simple. First decide which one to be placed on the MBR. If it's GRUB, then simply run grub-install with the partition/ide- specific device identifier. eg. grub-install '(hd0)' installs grub onto the MBR. hd0 is the first HD, on the primary IDE. Suppose i need to restore ntldr to MBR. Simple. Run a recovery console from an XP installation disc and use the FIXMBR command. it "fixes" the windoze.

Cool, right? But very risky too. One wrong move, and your entire HDD will be wiped clean!

May. 1st, 2007

My Bootloader

I like tinkering with bootloaders. The other day, I played and played and played with my GRUB and ntldr, and in the end I screwed them all up. Yesterday night, or today early morn, I installed Debian Sarge 3.1. I had been running Ubuntu for quite some time, and I thought I'll tinker with the king of all linux distros. I had used debian, but had to move on to ubuntu when they released Edgy Eft. Nice way playing with the first 512 bytes of the active partition. That's where the boot loader resides. Hadn't it been for the dd tool in linux, things would've been pretty hectic. This magic tool is simple yet very powerful. Only thing you need is the root privilege. After letting the ntldr remain at the MBR for quite some time, I moved on to the first sector of the C drive. Just for a horror. Now I'm gonna revert the process and make ntldr invoke GRUB. I'd tried a couple of other bootloaders i could lay my hands on, thanks to Pravi.

Apr. 25th, 2007

Debian IS the best...

Even today, there's a misconception that Linux is for the geeks and gyros, and not for laymen. But the reality is totally different. Linux is more userfriendly than M$ products. The latest release of Debian, that is v4.0 Etch, is wonderful. It retains the stability associated with Linux and Debian in particular, and adds more than just stability to make things easier right from the first time the CD or DVD is inserted into the drive. Installation can be through local languages even. I think the only downside is the options being given to the user. Actually the complete Etch CD pack of 332 CDs is too much a layman can contemplate for doing something that will make his/her computer work. I found this link pretty helpful to decide which all to use, ie., download and what to look for...

Thanks to Pravi for this piece of info, and to +PLUS for helping me reach it.

The customization options are mind boggling. To be frank, I would say Linux will help us grow. It helps us get to know Linux better day by day, and automatically we get more and more attracted towards it. Particularly Debian! I used to be a great RedHat fan when I started using Linux, because the first Linux distro that came my way was RH9.0. I've tried many distros, but Debian is incomparable.