Or you could have the VBR look for the active partition. I don't think that would play nice with Grub, but I don't imagine you have Grub on your USB stick.

What has this to do with storing some LBA address in the boot sector? You can always have a separate VBR, see below.pranavappu007 wrote:The problem with me is I can't have a separate VBR as my VBR actually contains some "driver" code(actually more than that).
Do that, that's what I and the others are sayingpranavappu007 wrote:I might write a C program to modify the CHS/LBA location embedded in VBR to install to a partition, but not now.
That doesn't matter. As long as the remaining parts are loaded after the boot sector (0x7C00) into memory, you can store the rest anywhere on disk. For example:pranavappu007 wrote:Even though I say "Boot loader" or "kernel", it is all linked(not concatenated but actually linked by linker) and is one giant Binary file which contains everything to boot up and give prompt.
I would recommend against that because the OP wants to load the 2nd stage (kernel) from partitionless images too.eekee wrote:Or you could have the VBR look for the active partition.