mbr new
mbr new
hi programmer
i am used that code mbr for usb flash emulation hdd
my usb flash 8Gb
i am put that code in first sector
and 63 sector put bootloader
put here problem
that print (Invalid partition table!)
i am used dd here
sudo dd if=/mbr.bin bs=446 count=1 conv=notrunc of/dev/sdb1
sudo dd if=/boot.bin bs=512 conv=notrunc seek=63 of/dev/sdb1
i don't know what problem
i am used that code mbr for usb flash emulation hdd
my usb flash 8Gb
i am put that code in first sector
and 63 sector put bootloader
put here problem
that print (Invalid partition table!)
i am used dd here
sudo dd if=/mbr.bin bs=446 count=1 conv=notrunc of/dev/sdb1
sudo dd if=/boot.bin bs=512 conv=notrunc seek=63 of/dev/sdb1
i don't know what problem
- Attachments
-
- mbr&boot.rar
- (2.93 KiB) Downloaded 22 times
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: mbr new
maybe reason
0x0003DC00 ;Total Sectors in Partition
your have flash 8GB
That's probably an error
0x0003DC00 ;Total Sectors in Partition
your have flash 8GB
That's probably an error
- BASICFreak
- Member
- Posts: 284
- Joined: Fri Jan 16, 2009 8:34 pm
- Location: Louisiana, USA
Re: mbr new
I'm just going to reply with a bunch of links, I want you to read and fully understand.
http://forum.osdev.org/viewtopic.php?f=1&t=16944
http://www.catb.org/~esr/faqs/smart-questions.html
http://wiki.osdev.org/Required_Knowledge
http://wiki.osdev.org/Kernel_Debugging
http://wiki.osdev.org/Bochs
http://wiki.osdev.org/Qemu
http://wiki.osdev.org/GDB
TIP: Single step your code and find exactly what goes wrong and where... (I recommend Bochs myself)
We are not going to debug the code for you; but we will help you, if you help yourself.
But if I were to guess your Segment registers are incorrect.
Best Regards,
B!
http://forum.osdev.org/viewtopic.php?f=1&t=16944
http://www.catb.org/~esr/faqs/smart-questions.html
http://wiki.osdev.org/Required_Knowledge
http://wiki.osdev.org/Kernel_Debugging
http://wiki.osdev.org/Bochs
http://wiki.osdev.org/Qemu
http://wiki.osdev.org/GDB
TIP: Single step your code and find exactly what goes wrong and where... (I recommend Bochs myself)
We are not going to debug the code for you; but we will help you, if you help yourself.
But if I were to guess your Segment registers are incorrect.
Best Regards,
B!
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
BOS Expanded Commentary
Both under active development!
Sortie wrote:
- Don't play the role of an operating systems developer, be one.
- Be truly afraid of undefined [behavior].
- Your operating system should be itself, not fight what it is.
- 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: mbr new
Please don't post things here that are different from what you really run.sudo dd if=/mbr.bin bs=446 count=1 conv=notrunc of/dev/sdb1
You should also learn the difference between sdb and sdb1
Re: mbr new
Please learn how to describe your problems in English and stop posting junk.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: mbr new
While it would certainly be great to see problem description in proper English, I'm afraid you might be demanding unrealistically too much from the OP. The OP doesn't know what he doesn't know. It'll take time for him to learn some useful English and various bits of OS dev. I think, until then you have two options: coping with whatever he's capable of writing or ignoring his posts.Roman wrote:Please learn how to describe your problems in English and stop posting junk.
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: mbr new
How do we know that that's not what he really ran? Maybe he actually does store his mbr image in the root of his filesystem.Combuster wrote:Please don't post things here that are different from what you really run.sudo dd if=/mbr.bin bs=446 count=1 conv=notrunc of/dev/sdb1
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
- 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: mbr new
I know he probably does. But first and foremost, dd will tell you that command has syntax errors.
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
int 13h
hi
i am using that code for mbr
i am put that in first sector
ind put bootloader in sector=63
i follow that code part part
the mbr He was able to identifies flash( i am check that by using int 13h and dl=0x81)
but the mbr can't reading the bootloader
give me the error ((Missing Operating System))
note:i am using usb flash memory size 8GB
i am using that code for mbr
i am put that in first sector
ind put bootloader in sector=63
i follow that code part part
the mbr He was able to identifies flash( i am check that by using int 13h and dl=0x81)
but the mbr can't reading the bootloader
give me the error ((Missing Operating System))
note:i am using usb flash memory size 8GB
- Attachments
-
- mb.rar
- (4.25 KiB) Downloaded 19 times
Last edited by Combuster on Mon Feb 22, 2016 5:07 am, edited 1 time in total.
Reason: And please use the "reply" button instead of insistently recreating threads
Reason: And please use the "reply" button instead of insistently recreating threads
- 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: mbr new
I see two accounts posting nearly similar questions from the same /24 subnet. Can you try and stick to one account?
-
- Posts: 10
- Joined: Tue Feb 09, 2016 4:24 am
- Libera.chat IRC: swad-al-lail
Re: mbr new
Sorry
But we are from the same country
There is a difference in the questions
I have a small part in no job code
But we are from the same country
There is a difference in the questions
I have a small part in no job code
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: mbr new
I did consider that part - how do we know that dd didn't say the command has syntax errors? Nevertheless I agree with you - that's probably not the real command that he ran.Combuster wrote:I know he probably does. But first and foremost, dd will tell you that command has syntax errors.
I assume that they are different accounts otherwise they wouldn't be replying to each other's threads. I must admit though that I did consider for some time if they were the same user.Combuster wrote:I see two accounts posting nearly similar questions from the same /24 subnet. Can you try and stick to one account?
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Re: mbr new
You need to reformat your Flash with Windows or Linux.
Then you need to save the original MBR.
After that, you need to fill the following values because they are empty (they only contain 0).
You need to fill these values manually with the values of the original MBR or split the binary files and join the header into a new binary file.
Then you need to save the original MBR.
After that, you need to fill the following values because they are empty (they only contain 0).
You need to fill these values manually with the values of the original MBR or split the binary files and join the header into a new binary file.
Code: Select all
PT2_Status db 0x00
PT2_First_Head db 0x00
PT2_First_Sector db 0x00
PT2_First_Cylinder db 0x00
PT2_Part_Type db 0x00
PT2_Last_Head db 0x00
PT2_Last_Sector db 0x00
PT2_Last_Cylinder db 0x00
PT2_First_LBA dd 0x00000000
PT2_Total_Sectors dd 0x00000000
PT3_Status db 0x00
PT3_First_Head db 0x00
PT3_First_Sector db 0x00
PT3_First_Cylinder db 0x00
PT3_Part_Type db 0x00
PT3_Last_Head db 0x00
PT3_Last_Sector db 0x00
PT3_Last_Cylinder db 0x00
PT3_First_LBA dd 0x00000000
PT3_Total_Sectors dd 0x00000000
PT4_Status db 0x00
PT4_First_Head db 0x00
PT4_First_Sector db 0x00
PT4_First_Cylinder db 0x00
PT4_Part_Type db 0x00
PT4_Last_Head db 0x00
PT4_Last_Sector db 0x00
PT4_Last_Cylinder db 0x00
PT4_First_LBA dd 0x00000000
PT4_Total_Sectors dd 0x00000000
YouTube:
http://youtube.com/@AltComp126
My x86 OS/software:
https://sourceforge.net/projects/api-simple-completa/
Donate to get more food/programming resources/computers:
https://www.paypal.com/donate/?hosted_b ... QS2YTW3V64
http://youtube.com/@AltComp126
My x86 OS/software:
https://sourceforge.net/projects/api-simple-completa/
Donate to get more food/programming resources/computers:
https://www.paypal.com/donate/?hosted_b ... QS2YTW3V64