P
P
Ponteley2021-10-19 12:08:20
assembler
Ponteley, 2021-10-19 12:08:20

How to make a sector-by-sector write to a disk?

Now I'm developing my OS (for fun). Wrote the bootloader and a small part of the kernel. Do I understand correctly that after the BIOS has loaded the bootloader into memory, it, in turn, must read the disk sector-by-sector and load the read into memory. If so, how? With what program? me sector-by-sector to write os on a disk?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2021-10-19
@gbg

man dd

J
jcmvbkbc, 2021-10-19
@jcmvbkbc

Do I understand correctly that after the BIOS has loaded the bootloader into memory, it, in turn, must read the disk sector-by-sector and load the read into memory.

"Sector-by-sector read disk" is possible, for example, by understanding the structure of the file system and reading the file with the OS kernel. In this case, the sector numbers may not go one after another, but be determined by some service table of the file system, for example, FAT. In this case, the bootable kernel can be written simply as a file on the file system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question