flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Extended Partition Boot Sectors

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 23 Apr 2010, 21:39
ManOfSteel wrote:

It's exactly that.

Now check LBA location 0x3de1783.

Sorry. You clearly pointed out the answer, yet I failed to do as you instructed, next time I'll listen better.

Which do I put my loader in if I'm going to chainload from GRUB?
Post 23 Apr 2010, 21:39
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 23 Apr 2010, 21:51
i think the same as withou grub. the boot record (not master boot record) of the partition where your loader is.

MBR>GRUB>part table> ext part table> your part > loader
Post 23 Apr 2010, 21:51
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 23 Apr 2010, 22:08
So my loader should go in the boot record containing the extended partition table(the sector it took me forever to find)?
Post 23 Apr 2010, 22:08
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 23 Apr 2010, 22:21
no
it should be in the boot sector that is pointed to by the extended partition table.

then, it is like a 4 or 5th addressing level.

in simplified x86 ram style:

Code:

MBR:
grub
dd part1
dd part2
dd part3
dd part4

part1:
0
dd ext1
dd ext2
dd ext3
dd ext4

ext1:
loader
dd ext1
dd 0
dd 0
dd 0
    

of course, this is completelly false code, but the idea is there.

the MBR boots on grub
grud analyse partition table in MBR
it will analyse the partition table of part1 (hte one who don't have boot code (0)
it will find the ext1 prtition
and the ext1 partition will contain itself the id for its size, relative LBA will be 0

at this step, there will not be infinite boot nesting. the ext1 partition will not say to go to another partition, it will just say (as it is not the MBR) i am the valid partition.
this sort of strange design forced me to completelly ignore partition table and design my own partition table, and no matters if it don't work on PC others than mine. Very Happy


it is easy to understand, but hard to explain without a drawing.
Post 23 Apr 2010, 22:21
View user's profile Send private message Visit poster's website Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 25 Apr 2010, 06:27
I'm sorry edfed and ManOfSteel, but I still don't get it. It's definitely not your explanation's fault, it's my being dumb.Smile One more time, is it the Volume Boot Record or the Extended Boot Record that gets loaded it memory? I promise I'll never ask again. If I don't understand this time, I'll do like I should have a long time ago and quit osdeving.

btw, you should update your drawings thread, sure you've done some more awesome drawings since then.
Post 25 Apr 2010, 06:27
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 25 Apr 2010, 09:58
Both are loaded at one time or another but for different purposes.

The entire chain of the EBR is read by operating systems and boot managers that bother to understand extended/logical partitions, so that they can display the different partitions on the disk, give the user access to the files stored there, and possibly load an operating system stored on one of them.

The appropriate VBR may then be loaded so that the corresponding operating system starts running, since the VBR contains the bootloader for that operating system. This is only done if a boot manager is involved.

So again, have you tried dding the LBA location I mentioned earlier (0x3de1783) and moving through the EBR from there by following zhak's process?
Post 25 Apr 2010, 09:58
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 25 Apr 2010, 10:44
ManOfSteel wrote:

The appropriate VBR may then be loaded so that the corresponding operating system starts running, since the VBR contains the bootloader for that operating system. This is only done if a boot manager is involved.

THANK YOU!!!Smile I understand now.

ManofSteel wrote:

So again, have you tried dding the LBA location I mentioned earlier (0x3de1783) and moving through the EBR from there by following zhak's process?

Yeah, I finally got it after stupidly ignoring you telling me to repeat zhak(the first time) and then finding ~10 posts later that you had spoon fed the answer to me, but I hadn't listened. After finally getting the concept of a VBR and an EBR and their relation, I came to the question of which sector(EBR or VBR) gets executed as the bootloader. You just answered that, and again, thanks to you, edfed, and zhak.
Post 25 Apr 2010, 10:44
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 25 Apr 2010, 11:15
i thuink that if you don't practice it, you will not understand it.
then, the better way to learn is to do. Very Happy

please, reporting your experiments results. thanks.
Post 25 Apr 2010, 11:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.