Bootloader + kernel + floppy
Bootloader + kernel + floppy
Hi guys,
I have a very simpel Bootloader + kernel.
But how can i create a floppy (Virtual), With the bootloader + kernel.
I'm Using Ubuntu.
Thanx, David.
I have a very simpel Bootloader + kernel.
But how can i create a floppy (Virtual), With the bootloader + kernel.
I'm Using Ubuntu.
Thanx, David.
Re: Bootloader + kernel + floppy
Use dd.
Also I think there is a page on the wiki about this.
Also I think there is a page on the wiki about this.
Re: Bootloader + kernel + floppy
I'm new to ubuntu. I do not know much about it yet.garob wrote:Use dd.
Also I think there is a page on the wiki about this.
I've been hanging out on the wiki, only I know no good "search terms"
Re: Bootloader + kernel + floppy
Check the chapter "Working with Disk Images" on the entry page.
Hint: Being new to your environment is not a good precondition. Perhaps you should familiarize yourself with your new environment and toolchain first before trying your hand at OS development.
Hint: Being new to your environment is not a good precondition. Perhaps you should familiarize yourself with your new environment and toolchain first before trying your hand at OS development.
Every good solution is obvious once you've found it.
Re: Bootloader + kernel + floppy
ThanxSolar wrote:Check the chapter "Working with Disk Images" on the entry page.
Hint: Being new to your environment is not a good precondition. Perhaps you should familiarize yourself with your new environment and toolchain first before trying your hand at OS development.
I'm making a simple bootloader that says: 'Hello world'.
then more complicated.. etc..
-
- Member
- Posts: 155
- Joined: Fri Oct 27, 2006 5:11 am
- Location: Oberbayern
- Contact:
Re: Bootloader + kernel + floppy
1) Use 'mkdosfs -C mydisk.img 1440' to make the floppy image
2) Use 'dd' to write the bootloader to the disk, eg 'dd status=noxfer conv=notrunc if=myfirst.bin of=mydisk.img'
Guide here: http://mikeos.berlios.de/write-your-own-os.html
As others have said, you should be very familiar with the OS you're using first. You've chosen arguably the most advanced and complicated topic in programming, so you should be at least very proficient in the host OS first.
M
2) Use 'dd' to write the bootloader to the disk, eg 'dd status=noxfer conv=notrunc if=myfirst.bin of=mydisk.img'
Guide here: http://mikeos.berlios.de/write-your-own-os.html
As others have said, you should be very familiar with the OS you're using first. You've chosen arguably the most advanced and complicated topic in programming, so you should be at least very proficient in the host OS first.
M
MikeOS -- simple, well-documented x86 real-mode OS written in assembly language
http://mikeos.sourceforge.net
http://mikeos.sourceforge.net
Re: Bootloader + kernel + floppy
mkfloppy.zip
One example:
Last links:
[Solved] kernel.bin->floppy img with GRUB
[SOLVED]: Building floppy.img
One example:
Code: Select all
include "mkimage/mkfloppy.inc"
format binary as "ima"
file "mkimage/bootcode.bin",512
; fat1
db 0F0h,0FFh,0FFh,9*512-3 dup 0
; fat2
db 0F0h,0FFh,0FFh,9*512-3 dup 0
; root
dent io______sys,"IO SYS",FA_ARC+FA_SYS+FA_HID+FA_RO
dent autoexecbat,"AUTOEXECBAT",FA_ARC
dent config__sys,"CONFIG SYS",FA_ARC
dent setramd_bat,"SETRAMD BAT",FA_ARC
; ...
dent ebd_____sys,"EBD SYS",FA_ARC+FA_SYS+FA_HID+FA_RO
dent gcdrom__sys,"GCDROM SYS",FA_ARC
dent bcdw_cl_com,"BCDW_CL COM",FA_ARC
dent fdemuoffcom,"FDEMUOFFCOM",FA_ARC
dent keyb____com,"KEYB COM",FA_ARC
dent keybrd3_sys,"KEYBRD3 SYS",FA_ARC
rb 33*512-$
; data
stof io______sys,"content/io.sys"
stof autoexecbat,"4bcdw/autoexec.bat"
stof config__sys,"4bcdw/config.sys"
stof setramd_bat,"content/setramd.bat"
; ...
stof ebd_____sys,"content/ebd.sys"
stof gcdrom__sys,"4bcdw/gcdrom.sys"
stof bcdw_cl_com,"4bcdw/bcdw_cl.com"
stof fdemuoffcom,"4bcdw/fdemuoff.com"
stof keyb____com,"4bcdw/keyb.com"
stof keybrd3_sys,"4bcdw/keybrd3.sys"
times 2*80*18*512-$ db 0
[Solved] kernel.bin->floppy img with GRUB
[SOLVED]: Building floppy.img
If you have seen bad English in my words, tell me what's wrong, please.
- summersong
- Member
- Posts: 32
- Joined: Sat Mar 26, 2011 5:26 am
- Location: Moscow
Re: Bootloader + kernel + floppy
I use BFI and MKBT from nu2.nu:
http://www.nu2.nu/bfi/
http://www.nu2.nu/mkbt/
And RAM drive (F:).
Build script:
http://www.nu2.nu/bfi/
http://www.nu2.nu/mkbt/
And RAM drive (F:).
Build script:
@echo off
set MAKEPATH=F:\
del /Q %MAKEPATH%\*.*
rd /Q /S %MAKEPATH%\A
md %MAKEPATH%\A
md %MAKEPATH%\A\app
md %MAKEPATH%\A\sys
echo Public Domain>>%MAKEPATH%\A\sys\lic.txt
cls
echo.
echo boot.asm
TOOLS\fasm.exe boot.asm %MAKEPATH%\boot.bin
echo.
echo ldr.asm
TOOLS\fasm.exe ldr.asm %MAKEPATH%\A\sys\osldr.sys
TOOLS\bfi.exe -t=144 -f=%MAKEPATH%\floppy.img %MAKEPATH%\A
TOOLS\mkbt.exe %MAKEPATH%\boot.bin %MAKEPATH%\floppy.img
rem if exist %MAKEPATH%\floppy.img "TOOLS\Bochs\bochs-win64-cygwin.exe" -q -f bochs.bxrc
- 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: Bootloader + kernel + floppy
This question is in the FAQ, therefore I hereby copy-paste all the other parts of the wiki that have not been mentioned yet into this thread.