Questions tagged [ext2]

ext2 is a Linux filesystem.

ext2 is a filesystem mostly used under linux.

Other versions are ext, ext3 and ext4.

See Wikipedia for details on ext and ext2.

106 questions
2
votes
1 answer

Is ext2 inode 5 (EXT2_BOOT_LOADER_INO) used by any operating systems?

In ext2, there are a number of reserved inodes, such as inode 2 being the root directory. In the Linux ext2 header file, inode 5 is defined as a "Boot loader inode". Do any operating systems actually use this? How do you read from and write to this…
Mark Raymond
  • 906
  • 8
  • 22
2
votes
1 answer

Inode Data Structure Differences Between 128-byte Ext2 and 256-byte Ext3

Curious as to the inode data structure differences between 128-byte ext2 and 256-byte ext3 file-systems. I have been using this reference for ext2, 128-byte inodes: http://www.nongnu.org/ext2-doc/ext2.html#INODE-TABLE. I have been unable to find a…
iokevins
  • 1,427
  • 2
  • 19
  • 29
2
votes
1 answer

how can I check the mount count on a ext2 filesystem

With tune2fs one can set the maximum mount count -c (before e2fsck kicks in on boot) and also the actual (current) mount count -C. I'm looking for a way to read these two values.
Fredrik Wendt
  • 988
  • 1
  • 10
  • 17
2
votes
1 answer

how to print indirect block in ext2

I'm trying to print all the single indirect blocks in an ext2 file system. I can print the direct blocks easy enough (0-11) but I don't understand how to get to the single indirect blocks, and later the double and triple indirect blocks. If I look…
Matthew The Terrible
  • 1,589
  • 5
  • 31
  • 53
2
votes
0 answers

Embedded ext2 access library

Is there any os-independent read-write capable Ext2 FS access C library for embedded applications? I'm looking for something that is similar to what FatFS is for FAT16/32. I tried to port the corresponding Linux kernel filesystem module, but it is…
Eugene Pankov
  • 856
  • 1
  • 15
  • 30
2
votes
1 answer

Custom Kernel: Implement filesystem

As a out of course project, I am currently developing a kernel in an attempt to better understand all the aspects of an actual OS. So far, I am done setting up a flat physical memory model with support for paging and the basic interrupts (keyboard…
plaknas
  • 274
  • 4
  • 15
1
vote
1 answer

Ext2 Filesystem On A USB

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…
codesmith
  • 561
  • 1
  • 3
  • 17
1
vote
3 answers

Delay required between a file created via external program using system() and opening it via open()?

I'm trying to create a TAR archive from my program and then opening the archive for further processing. I have a 2 second delay between calling system() and open(). So far, it works fine, but I'm not sure why the 2 second delay is necessary or if…
Ioan
  • 2,382
  • 18
  • 32
1
vote
2 answers

Adding mount options to ext2 filesystem

I am modifying the ext2 filesystem for an assignment. I need to add a mount option which will remain in effect until the file system is unmounted. I've already added the option to the options enum and am handling the case where it is specified. The…
Anthony
  • 12,177
  • 9
  • 69
  • 105
1
vote
1 answer

How to read an inode table from an ext2 block group?

In writing an ext2 driver for my hobby OS, I ran into a problem reading the inode table from a block group descriptor. The third field of the block group descriptor is the block ID of the inode table for that group. In my case for the root directory…
Mr. Shickadance
  • 5,283
  • 9
  • 45
  • 61
1
vote
1 answer

What is the best file system for a small ramdisk under Linux?

An embedded Linux system I am working on has a 4MB ram disk. It is currently formatted with ext2. It seems that even when empty, there is only about 50% free space ! At the moment, it is used for about 50 smallish (1 or 2KB) files that total about…
Neil
  • 11,059
  • 3
  • 31
  • 56
1
vote
4 answers

What's wrong with linux/ext2_fs.h?

cat main.c #include #include #include int main(int argc, char** argv) { return (EXIT_SUCCESS); } Here is my output... gcc main.c In file included from main.c:3: /usr/include/linux/ext2_fs.h: In…
Eric Fossum
  • 2,395
  • 4
  • 26
  • 50
1
vote
1 answer

what is the form of filesystem like ext3, ext2, ext

i've read filesystem in wikipedia, linfo.org and a question on super user about "is filesystem a part of operating system" and i doubt my understanding. Wikipedia says: "ext is filesystem that is commonly used by linux kernel". SU's answer says:…
faza akbar
  • 11
  • 2
1
vote
1 answer

I have problems reading the superblock structure of an ext2 file system. Why does my code read the wrong value for the log2(block_size) field?

I try to write a bootloader for a ext2 formatted drive. I loaded the superblock to 0x7e00. Then I determined the block size by reading 24th byte. I shifted 1024 left with this value. But the cl register contains the wrong value. Memory dump (At…
Xorda
  • 51
  • 4
1
vote
0 answers

C/C++: Reading and writing inodes ext4

Basically, I am trying to create my own tool to quick format ext4 partitions. As far as I understand, the idea behind it is to find and overwrite existing inodes with empty ext2_inode structures. I thought that I could do it by simply calculating…
teveve
  • 31
  • 5