flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
tom tobias 06 Feb 2005, 14:02
In addition to Menuet, a really good choice, in my opinion, another excellent alternative, with many useful attributes, particularly for self study, is Solos created by Bogdan:
http://www.hostileencounter.com/os/files/sol_os_src_2005_01_25.zip Unfortunately, NEITHER os, good as they both are, offers an opportunity to boot from hard disk, for whatever reason, (and there are some reasonable explanations, just none that satisfy me) and therefore, much of the discussion concerns instead, booting from floppy, as though it was 1985. You may wish to read through the posts of this OS section of flat assembler forum, as there are dozens of wizards on this forum, many of whom have addressed your question about booting from GRUB in previous postings. Hope you will submit your success, once you have attained your goal of booting your own kernel ![]() |
|||
![]() |
|
jeffwilson 06 Feb 2005, 18:10
Hello Tom.
For right now, I have decided to stick with the floppy disk method, and use an emulator. I decided that this would be good enough to get me basically going. I did some reading, and it turns out that there are some specifications that have to be met by the kernel in order for GRUB to boot it. The kernel has to conform to the Multiboot standard as defined in the GRUB documentation. Regards, Jeff. |
|||
![]() |
|
decard 06 Feb 2005, 18:18
MenuetOS can run from hard disk. Just visit its site.
|
|||
![]() |
|
ASHLEY4 07 Feb 2005, 01:00
Why not use this "bootprog" you can get it here: http://alexfru.chat.ru/epm.html#bootprog
it lets you boot your OS as a com/exe or bin file, from a floppy or hdd, just by putting it on the disk and naming it the name in the bootloader. eg: "MyKernel.exe" ![]() _________________ \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
crc 07 Feb 2005, 01:34
Quote: Why not use this "bootprog" you can get it here: http://alexfru.chat.ru/epm.html#bootprog bootprog doesn't support filesystems other than FAT for one, and for a microkernel-based OS, it doesn't provide a way to load multiple modules at boot time. GRUB is more flexible in the long run anyway... |
|||
![]() |
|
ASHLEY4 07 Feb 2005, 02:29
When your are talking floppy, then there is only one file sys "fat12", you can bury your head in the sand, with other sys, if you want
![]() Also linux supports fat12 etc. Do not make life, as a OS dev, any harder than it is, if i had a pound for every time i see this in a OS dev forum "I have a GRUB problem" or " BOCHS does not run my OS" i would be even richer than i am. Remember "KISS" _________________ \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
crc 07 Feb 2005, 02:43
Quote: When your are talking floppy, then there is only one file sys "fat12", you can bury your head in the sand, with other sys, if you want You can use filesystems other than FAT12 on a floppy. I've used Oberon's filesystem, MinixFS, ext2, and others on floppies. In fact, FAT is a rather limited filesystem even on floppies. Quote: Do not make life, as a OS dev, any harder than it is, if i had a pound for every time i see this in a OS dev forum "I have a GRUB problem" or " BOCHS does not run my OS" i would be even richer than i am It's not that hard to support GRUB. A few extra bytes at the start of a kernel, and you can use it easily. In fact, you could make a kernel that can be loaded from a raw floppy, bootprog, or GRUB fairly easily (I have done this). IMO, the flexibility that GRUB provides is worth a few extra minutes of typing. Quote: Remember "KISS" I do -- it's my guiding rule in coding. |
|||
![]() |
|
ASHLEY4 07 Feb 2005, 03:15
By saying there is only one file sys for floppy's, this does not mean others can not be used, it means to use another file sys, other than fat12 is just making life difficult, as every OS worth its salt supports it.
And for those that need a little more, they can use "alexfru" other program "OS LOADER" read about it here: http://alexfru.chat.ru/los4d_manual.html _________________ \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
crc 07 Feb 2005, 03:37
os loader is still less useful to me than grub. Consider:
a) I don't use Windows or DOS on this box, and don't even have FAT support built into my Linux kernel (it's a module) b) I boot my OSes using GRUB (including DOS/Windows on my other box thanks to the chainloading operation GRUB supports) c) GRUB works with my filesystems of choice d) COFF format as supported by OS LOADER is no better than using ELF (a cleaner format anyway) with GRUB. Or even a plain binary file with a couple extra header bytes... e) OS Loader doesn't support net booting for diskless systems |
|||
![]() |
|
bubach 07 Feb 2005, 10:21
agree not to agree..?
|
|||
![]() |
|
jeffwilson 07 Feb 2005, 12:48
Thanks for all the suggestions guys.
Recently I came accross this page: http://linuxgazette.net/issue77/krishnakumar.html The most useful part of this page is the C code that can be used to create a bootable floppy disk - it is quite useful for on-the-fly creation. You can either use it to write to a floppy image, or you can use it to write to a real floppy. Quote:
You can replace ./boot with the executable name of your kernel/loader/os, and you can replace /dev/fd0 with a floppy image name (e.g.; ./floppy.img). I have used this code both ways, and it works great either way. Compile with GCC - this code probably won't work on Windows systems. This code even adds the appropraite signatures to bytes 510 and 511. -Jeff |
|||
![]() |
|
bubach 07 Feb 2005, 13:47
Other great tools that many os-devers use is:
Partcopy and Rawrite. |
|||
![]() |
|
ASHLEY4 07 Feb 2005, 17:36
bubach wrote: agree not to agree..? ![]() _________________ \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
![]() |
|
jeffwilson 07 Feb 2005, 22:22
Hmm...I seem to have gotten a basic boot sector going on my floppy disk. I got it to write just a few short things to the screen; nothing much yet really, but its nice to know that something is going on.
![]() Now for the question -- where should my kernel take place? Should I have the small boot sector of my floppy disk call the kernel and then let it take over (I like the idea of this), or is there another way I should do this? I'm open to just about any ideas that you guys/gals can give me; I'd prefer some documentations, if anyone can provide some. ![]() By the way, I took a look at SolOS, gotta say it's pretty nice. It works much better in QEMU than MenuetOS does, and not to mention it's design fits my personallity more (basic and simple; im not the kind of person that likes fancy UI - that's why I don't use Windows ![]() Thanks for all the previous help. Any further help is appreciated. ![]() PS: About the link I posted previously - there are 3 parts to it, so if you are interested, here are the three parts (might be more; search google if you want to find more). Part I: http://linuxgazette.net/issue77/krishnakumar.html Part II: http://linuxgazette.net/issue79/krishnakumar.html Part III: http://linuxgazette.net/issue82/raghu.html -Jeff |
|||
![]() |
|
Dex4u 08 Feb 2005, 05:03
The way i do it, is the bootloader which fits in the boot sector of the floppy, looks for my kernel on the floppy, if it finds it, it loads it into memory and gives control to the kernel, as there is a basic fat12 in the bootloader, it can find the kernel any wear on the floppy, as it looks for a file by a certain name.
My kernel starts in realmode set up all things need for pmode and then moves to pmode. As i use a MZ exe format for my kernel, it is very easy to test and make changers to the kernel, you can just delete the kernel from windows or linux like any other file, and replace it with a new kernel.exe, also this way of booting lets me boot from Dos, if i want to. I like to keep things Small and simple and this design let me do that. Last edited by Dex4u on 06 Apr 2005, 15:47; edited 3 times in total |
|||
![]() |
|
jeffwilson 08 Feb 2005, 12:43
Dex,
That's exactly what I'm wanting to do with my bootloader. ![]() Cheers, Jeff. |
|||
![]() |
|
Dex4u 08 Feb 2005, 17:34
@jeffwilson, Here is the nasm code (easy converted to fasm):
EDITED LINK DEAD http://myfilebucket.com/u/ASHLEY40/BOOT12.ASM It can load a exe/com or bin file, you can assemble it as a bin file and write it to a floppys boot sector with rawrite or use the code as a tut ![]() Forum for DexOS: http://dex.7.forumer.com/ Last edited by Dex4u on 29 Mar 2005, 02:40; edited 3 times in total |
|||
![]() |
|
jeffwilson 08 Feb 2005, 21:40
Thanks alot for the code; looks well commented, will have to take a good look through it.
![]() -Jeff |
|||
![]() |
|
jeffwilson 09 Feb 2005, 21:57
Alright, after looking at many bootloaders and examples, I think I get the basic idea of how to boot the kernel, but yet I don't. I mean, I see many examples, but none of them give enough guidence on what does what.
Are there any tutorials out there can explain the entire process step by step? Or am I just going to have to poke around until I find a method that works? Another question I have is where the kernel will actually go? Should I put it right after the first sector and let it expand from there? I thought about doing a command like this to copy the kernel: dd if=kernel of=/dev/fd0 seek=512 Which will skip the first 512 bytes (sector 1), but I'm afraid that I do not know if this is the correct way to do it. Could someone please clarify for me? I'm a bit fogged up right now, but I have been poking around, and have gotten this far, and am in no condition to quit my attempts at getting a basic system going. I am currently still in real mode; I figured the kernel should be the one to switch to protective mode, not my bootloader. Any help is greatly, greatly appreciated. ![]() PS: Sorry if I have extended this thread beyond its limits; I have switched topics quite a bit throughout this topic... TIA, Jeff. |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.