Page 1 of 1
fat12 filesystem problem
Posted: Wed Feb 22, 2012 9:17 am
by huh
I chose the fat12 filesystem for my os to run on becaouse it was easy. So I wrote a bootloader which would boot to a file called init.bin, I found out that in fat12 it would be INIT BIN so in the filename string I wrote
I had made many error messages so I would know what type of error it is (if there at all was an error). I booted it up in qemu with
and it gave me a root dir error, so I dd'd it into a 512MB partition on my hdd and run qemu:
now there was no root dir error, only the file not found error, so I mounted /dev/sda6 and copied the init.bin file and run qemu again and it still said file not found, I said huh and changed the filename to what the bootloader is searching for: INIT BIN. I run qemu again and it still could not find the file. How do I make the bootloader load to init.bin???
Re: fat12 filesystem problem
Posted: Wed Feb 22, 2012 9:30 am
by Solar
huh wrote:I chose the fat12 filesystem for my os to run on becaouse it was easy.
Apparently not.
So I wrote a bootloader which would boot to a file called init.bin, I found out that in fat12 it would be INIT BIN...
How did you come to this conclusion?
...so...
...some ad-hoc trial-and-error following which I couldn't quite follow...
How do I make the bootloader load to init.bin???
FAT would be a good starting point. There are several links to further information included.
GRUB would be another option, and
Bare Bones could give you a jump start. However, I'd also check if you really, really meet the
Required Knowledge.
Re: fat12 filesystem problem
Posted: Wed Feb 22, 2012 9:33 am
by bubach
should be
you know FAT12 names are 8bytes +3bytes extension right? Not 6+3.
Re: fat12 filesystem problem
Posted: Wed Feb 22, 2012 3:18 pm
by VolTeK
huh wrote: I run qemu again and it still could not find the file. How do I make the bootloader load to init.bin???
hm.
huh wrote:I chose the fat12 filesystem for my os to run on becaouse it was easy
hmm...
Why are you here then?
At the beginning of every root directory entry is 11 bytes of file name for that entry.
Your Init should look like
INIT----BIN. Note, the - are actually spaces. If you read, you would know this.
Hell its probably not even the actual file system code, its probably your calculations since your using a hard disk.
Re: fat12 filesystem problem
Posted: Thu Feb 23, 2012 8:04 am
by brain
any chance of actually seeing more source than just one db instruction?
That would help a lot in diagnosing the issue. I've got working FAT32 in C so i could probably help you out with FAT12.