I don't believe this. After all that help in your other thread about MBR's and partition's, it appears you don't even have a filesystem. You told me your boot sector used ext2. You aren't even taking into consideration the relative offset of the partition for your "second stage".
Instead of worrying about a usb drive, worry about getting something to boot from a floppy first, (use BOCHS, it's your friend)
Custom BootSector Booting Into Stage2 [Problems]
Re: Custom BootSector Booting Into Stage2 [Problems]
neon, I apologize for what is about to come, and I realize that you probably laugh at my Idiocy, and I also realize that my Idiocy grows tiring...
but I have tried all that you have stated, I even set my bootloader to be read into 0x500 (as is your preference) it still doesn't function.
To all, I am direly sorry for all grief/ignorance/stupidity that I may have caused/displayed during this conversation. I am indeed a novice at OSDev, and rightly, should not even be here. My only relative programming experience has been with small bouts of Assembly, and sufficience C/C++.
Thanks to all who contributed and have drove to point home to me that I should rather not be doing this now. I think that I will give GRUB a try for this purpose. After I have taken a long break.
Sorry...Sorry...Sorry...Sorry......
but I have tried all that you have stated, I even set my bootloader to be read into 0x500 (as is your preference) it still doesn't function.
Kubeos, I am sorry. I do indeed have my USB drive formatted to use ext2, but I was stupid enough not to consider that I should code the bootsector to use ext2.kubeos wrote:I don't believe this. After all that help in your other thread about MBR's and partition's, it appears you don't even have a filesystem. You told me your boot sector used ext2. You aren't even taking into consideration the relative offset of the partition for your "second stage".
Instead of worrying about a usb drive, worry about getting something to boot from a floppy first, (use BOCHS, it's your friend)
To all, I am direly sorry for all grief/ignorance/stupidity that I may have caused/displayed during this conversation. I am indeed a novice at OSDev, and rightly, should not even be here. My only relative programming experience has been with small bouts of Assembly, and sufficience C/C++.
Thanks to all who contributed and have drove to point home to me that I should rather not be doing this now. I think that I will give GRUB a try for this purpose. After I have taken a long break.
Sorry...Sorry...Sorry...Sorry......
Re: Custom BootSector Booting Into Stage2 [Problems]
Hello,
There is no need to apologize - you have not done anything wrong. If you are a novice, this is just the place for you - you cant give up that easily
If you want to get into a bootloader, just practice with it and learn real mode assembly language. Learn how to parse ext2, load, and run your "second stage bootloader". If this might be too hard right now, just use an existing one or follow a tutorial to help you set up a working framework that you can build off of.
Whatever you choose, good luck with your endeavors
There is no need to apologize - you have not done anything wrong. If you are a novice, this is just the place for you - you cant give up that easily
If you want to get into a bootloader, just practice with it and learn real mode assembly language. Learn how to parse ext2, load, and run your "second stage bootloader". If this might be too hard right now, just use an existing one or follow a tutorial to help you set up a working framework that you can build off of.
Whatever you choose, good luck with your endeavors
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
Re: Custom BootSector Booting Into Stage2 [Problems]
I didn't see any post that you have debugged your code. You probably just test it and if it is not working, you seek us for solution. Soon you will stuck in another place and no one will help. Read the OSDev wiki page about debugging and try to look where are YOU mistake and fix the code by your own.
ALCA OS: Project temporarity suspended!
Current state: real-mode kernel-FS reader...
Current state: real-mode kernel-FS reader...
-
- Posts: 1
- Joined: Fri May 20, 2011 3:03 pm
Re: Custom BootSector Booting Into Stage2 [Problems]
I don't know for certain, but as I understand it you cannot rely on the contents of dl for the boot drive number when you boot from a USB stick.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Custom BootSector Booting Into Stage2 [Problems]
Necromancy alert...
If that happens, the BIOS is broken by definition.you cannot rely on the contents of dl for the boot drive number