Question

I'm using the osdev wiki as a resource for programming an OS. So far I've got a 2 stage bootloader, with a very minimal 32-bit Protected mode kernel.

However, For the bootloader, I've been writing to a specific sector, and reading from a specific sector, and I've decided to do it the "right way", and use a file system, so I picked the ext2 file system, as the wiki has documentation on it. So I formatted my flash drive with ext2, using gparted on Ubuntu 11.10, and grabbed lde (linux disc editor), and ran it with my flash drive.

The problem is that, I don't see table as described on the ext2 page, I've looked at byte 1024 (0x400), among other places, and I can't seem to find the table. I went back into gparted, and it's still formatted. Also, lde says "unrecognized file system", even when I specify that it's ext2. Does a flash drive not use the standard ext2 file system, has the file system been changed so much that it resemble that described on the page, or am I just not looking in the right place?

Links:

Ext2 - http://wiki.osdev.org/Ext2

OsDev Wiki - http://wiki.osdev.org/Main_Page

Was it helpful?

Solution

As stated in the comments, I've answered my question. My problem wasn't with formatting my flash drive, or the way the flash drive is used, or anything else technical. The problem was that when I was using my disc editor, I told it to read the drive itself (/dev/sdb), and I needed to use the partition (/dev/sdb1). When I looked at the partition, I looked at 0x400 (the start of the superblock), and the superblock was indeed where it was supposed to be. I also compared the superblock, and several of the other blocks / inodes with the ones on my hard drive, and the format was the same, but not the data, as to be expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top