switching from floppy to hard drive
switching from floppy to hard drive
I went on and off with OS dev and I am in the mood to completely redo my OS as I wasn't that far. I plan on switching from my floppy compatible boot loader and kernel with hard drive compatible ones but I don't know how to start. Also if I create one that works with a hard drive and burn it to a cd or DVD would it boot? Would I have to make two boot loaders or make one that detects which one it is being booted from and execute the correct lines of code.
Re: switching from floppy to hard drive
Write boot loader and make your kernel independent of boot device, then write boot device driver.feare56 wrote:I went on and off with OS dev and I am in the mood to completely redo my OS as I wasn't that far. I plan on switching from my floppy compatible boot loader and kernel with hard drive compatible ones but I don't know how to start.
It's possible in "hard disk emulation" mode but I don't recommend to use such mode. Also you can use CD/DVD booting to boot from real hard disk without rewriting MBR/stage 1 boot loader on that disk (in testing purposes).Also if I create one that works with a hard drive and burn it to a cd or DVD would it boot?
I recommend to use separate stage 1 boot loaders for every type of boot device/FS.Would I have to make two boot loaders or make one that detects which one it is being booted from and execute the correct lines of code.
If you have seen bad English in my words, tell me what's wrong, please.
Re: switching from floppy to hard drive
I got so far in designing a file system for the hard disk, but then the question arose as to how the hard disk would be formatted so that my file system could sit on it. The answer which came back was the same way every other operating system does it - with a program loaded from the installation floppy disk/CD of course. So now I am contenting myself with loading from a CD, and a formatting program for the hard disk is well down the line.feare56 wrote:I went on and off with OS dev and I am in the mood to completely redo my OS as I wasn't that far. I plan on switching from my floppy compatible boot loader and kernel with hard drive compatible ones but I don't know how to start. Also if I create one that works with a hard drive and burn it to a cd or DVD would it boot? Would I have to make two boot loaders or make one that detects which one it is being booted from and execute the correct lines of code.
Re: switching from floppy to hard drive
It's not necessary in early stages. You can use some existing file systems and option "Keep current FS" in setup program. Even if you have no distribution CD you can install your OS from other OS using special setup program or "by hand". For example, I have setupmbr and setupldr for Windows. Moreover, I'm working on support for NTFS to include it in setupldr and read-only NTFS driver but still not planning to include that support in setup program.
If you have seen bad English in my words, tell me what's wrong, please.