Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I copied bootloader and kernel.bin there. Now i want to load kernel.bin. But before i must to find it's inode. First of all i need to load 2 inode for root directory. Trying to load block group descriptor from block group descriptor table, it is: 2 sectors (al), 0 cylinder (ch), 5 sector (cl), 0 head (dh) and buffer bx. After i read it, i get 'Number of directories in group' from this descriptor with
# create partition table with one partition
(echo "n"; echo "p"; echo ""; echo ""; echo ""; echo "w") | sudo fdisk -u -C10 -S63 -H16 zerOS.img
# use entire disk
sudo losetup /dev/loop0 zerOS.img
# destroy the partition table and use the entire disk as ext2
sudo mke2fs -b1024 /dev/loop0
# ...
# profit
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
In addition to what Combuster posted above, you can quite easily tell whether its a problem with creating the image or reading the image in your OS by examining the image file with a hex editor and seeing if what you expect to be in a certain place is actually there.
Furthermore, I'd recommend against having your ext2 driver work with CHS addressing - have it use LBA instead and then either use the extended read BIOS functions or convert to CHS somewhere in your block layer.
Which superblocks were you unable to find? The Ext2 one or the partition table one?
I also wouldn't normally trust a power of two in partition table offsets.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]