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
1
vote
1 answer

How do I read ext2 root directory from mapped memory?

I'm making a Remote Filesystem Server for my university and I'm having some trouble with reading the root directory... Here's the thing: I've read the root inode (inode 2) and it has consistent data, I mean that, for example, owner user Id field is…
Vladimir
  • 393
  • 3
  • 16
0
votes
1 answer

storing references of children's of a directory

In a project, the program must store references/identifiers of each child of a directory in its variables(say a stack). i.e the program must not perform pathlookup again for every child once a directory is read. I am not very sure how to do that.…
Lipika Deka
  • 3,774
  • 6
  • 43
  • 56
0
votes
4 answers

improving small file read times with USB2 attached ext2 volume

I'm a more experienced Windows programmer than I am a Linux programmer. Apologies if I'm missing something obvious. I need to read >10,000 small files (~2->10k) on a USB2 attached ext2 volume running Linux. The distro is a custom and runs…
stuck
  • 2,264
  • 2
  • 28
  • 62
0
votes
2 answers

What code is run to manage the file systems in Linux/UNIX?

For a OS project, I am creating a ext2 file system image and mounting it. This means that I am writing out a 1 MB file with block information and then using it as the mount target. For example, assume there is a file called base.img: fsck.ext2…
user129393192
  • 797
  • 1
  • 8
0
votes
0 answers

Decoding a given image of a floppy disk that has an ext2 filesystem

**the image has some files on it and I have been able to read the names but I couldn't get the content of all files at once , I have been able to find the root directory content with the inode number but what if the directory changed ? NOTE: I am…
rama
  • 1
  • 1
0
votes
1 answer

Remove ext2 file with rootfs while it's already mounted

What happens after mounting filesystem from file? Example: I have rootfs.ext2 file which is located in data directory and mounted under /mnt directory mount rootfs.ext2 /mnt After removing rootfs.ext2 I still can use files under /mnt directory, cat…
0
votes
1 answer

Using ext2 file system variant on Linux

I'm a newbie to kernel programming, and I'm stuck on something, so I'd appreciate some help. I appologize in advance if something similar was asked before, I did not find any relevant post, and could find explanations on the web which were simple…
user331398
  • 179
  • 2
  • 9
0
votes
1 answer

in ext2File system pulling super block& group descriptor is easy.ButWhat abt pulling specific inode as there can be mny inodes each may relate 2 file

So to pull super block in file system (i.e. if my sda storage is ext2 formatted) is easy. I just need to skip 1024 bytes to get the super block fro sda storage lseek(fd, 1024, SEEK_SET); read(fd, &super_block, sizeof(super_block)); and to pull the…
user786
  • 3,902
  • 4
  • 40
  • 72
0
votes
0 answers

__u32 type not found in linux is it userspace alternative to __le32

I am trying to read super block, group descriptor and inodes struct info of ext2 formatted disk image. So I like to know can I access these info_s with my userspace structures? So I like to create struct_s that maps to ext2 struct namely these…
user786
  • 3,902
  • 4
  • 40
  • 72
0
votes
1 answer

Is there any fast way to examine ext2/3/4 free inodes (on an unmounted disk) ? and/or why do they not all have the same "bad type" status

Using debugfs to check free inodes (list got from dumpe2fs), I observed that most of them have a bad type status, except for a few ones which are regular. I'd like to check them all to see how many and which of them have a different…
Camion
  • 1,264
  • 9
  • 22
0
votes
1 answer

open-file-description table is not like what Tanenbaum described in Ubuntu?

In the book Modern Operating System, the author explained that if the shell script has two commands, p1 and p2 and each takes turn writing into a file x, the position where p1 finishes will be remembered by p2, as they are using the same…
0
votes
0 answers

Segmentation fault after calling, but a very similar function does not get a segmentation fault error

For one of my CS classes we are creating a mini EXT2 file system. In this program I have to make the functions mkdir and creat. In both these functions we call a function called iput which looks like this: int iput(MINODE *mip) { // dispose of…
0
votes
1 answer

What are the essential differences Between ext2 - ext3 and ext3 - ext4?

i really want to know the essential differences between those filesystems, for example the inodes pointer Structure and so on! Thank you
3logy
  • 2,634
  • 8
  • 46
  • 99
0
votes
2 answers

Using open() on a thumb drive

I have an EXT2 partition on my usb thumb drive and I can't get the C function open() to return anything other than -1. Partition manager says that the partition is located at /dev/sdb2 and my code says int fd = open("/dev/sdb2", O_RDONLY); But…
Eric Fossum
  • 2,395
  • 4
  • 26
  • 50
0
votes
1 answer

Compile file which includes ext2fs.h

So I am writing a C file which includes /extfs/ext2fs.h. I am trying to call the function ext2fs_open(). I can clearly see that the header file ext2fs.h has that particular function. In fact, if I pass in the incorrect number of arguments, it even…
Catie
  • 555
  • 5
  • 12
  • 23