Questions tagged [ext2]

ext2 (second extended filesystem) is a file system that was commonly used by the Linux kernel, but has been largely replaced by ext3/ext4.

Filter by
Sorted by
Tagged with
0 votes
1 answer
208 views

Unable to edit the content of a mounted ext2 image

I have an image (from an Android phone) for which file gave the following info: file vendor-rw.img vendor-rw.img: Linux rev 1.0 ext2 filesystem data, UUID=64d47c8e-6f74-54ea-bbe7-ce29a05c4b04, volume ...
user avatar
  • 101
2 votes
2 answers
301 views

what is this “first inode” reported by dumpe2fs?

using dumpe2fs on some ext4 partition, I get in the initial data, that the first inode is #11. However, if I ls -i on this disk root partition, I get that it's inode number is #2 (as expected). So... ...
user avatar
  • 234
1 vote
0 answers
90 views

Calculate correctly the ext2 used blocks by the file system

What I'm trying achieve is, a safe shrinking of an ext2 file system and make sure I can cut/shrink the physical partition underneath to a safe minimum (without cutting file system blocks). I have ...
user avatar
  • 11
0 votes
1 answer
12 views

A question about ext2_sb_info

I study the ext2_sb_info structure (the memory data structure for ext2 superblock) and i noticed the existence of a field declared as u32 s_next_generation; I searched the web but it was not possible ...
user avatar
1 vote
1 answer
115 views

Inconsistent filesystem type reported after disabling journalling

In trying to understand why kworker flush uses 99% I/O and hangs file write on machine, I've disabled journalling on the ext4 data partitions using: tune2fs -O ^has_journal /dev/sdg1 After a reboot, ...
user avatar
  • 387
1 vote
0 answers
91 views

Is there a path length limit for the soft link in ext2 file system?

I am working on a project for the educational purpose which I wrote an ln Linux command in c for the ext2 file system. I was trying to handle the case where the length of the src path for ln -s is ...
user avatar
  • 11
1 vote
1 answer
213 views

why can gnome disks not format ext2 or ext3?

Why does the GUI tool for formatting disks have no option to format with ext2 and ext3 filesystems? Why would a tool used for formatting exclude these filesystems? What is the rationale behind this ...
user avatar
  • 11
4 votes
4 answers
596 views

Making bit identical ext2 filesystems

I'm preparing an image file for a linux system. I need to be able to run my script that creates the image and have the output be bit-for-bit identical each time. I do the normal procedure, by making ...
user avatar
  • 151
0 votes
1 answer
43 views

Can files survive partition table and file system recreation?

By GNU parted I created new DOS partition table, one partition and by mkfs.ext2 ext2 file system on that partition. I copied some files to that partition. After that I again created new DOS partition ...
user avatar
1 vote
0 answers
597 views

All ext4 files got deleted and the journal can't be found! Is there any way to recover it?

All of the files on my usb stick were deleted by accident (rm -r) but I'm having trouble recovering. When I try to run ext4magic it says "filesystem has no journal" and it mounts as ext2 only. I ...
user avatar
3 votes
0 answers
183 views

Why do ext2 inodes only have 12 direct blocks?

I'm currently writing a hobby file-system for fun. I was wondering if anyone knows why or where I could get information on the design philosophy of ext2. Specifically, I was wondering why each inode ...
user avatar
1 vote
1 answer
71 views

Can I use a Linux boot stick to check a windows system? [closed]

I have tried casper-rw and ext2. The following questions are where I'm at: Can I use a Linux boot stick to check the desktop windows partition for viruses and/or rootkits? If not, why? How is a ...
user avatar
0 votes
1 answer
155 views

How to convert USB driver from ext3 to ext2 without losing data?

This USB driver has two partitions, one is ext3 and another NTFS. Now I want to convert the ext3 partition to ext2, is it possible? The partition has around 200G data and I have no spare disk or ...
user avatar
  • 185
1 vote
3 answers
8k views

How to format a usb flash drive to Ext2?

When I use a GUI environment, I have there only ext4, NTFS, FAT and other, but I need to type their name. I tried one time to type there ext2, but it seems it gets stuck. I was waiting a lot and it ...
user avatar
4 votes
1 answer
77 views

Why does creating a file need at least five separate disk I/Os in Unix FFS?

In The Design and Implementation of a Log-Structured File System, It says: It takes at least five separate disk I/Os, each preceded by a seek, to create a new file in Unix FFS: two different ...
user avatar
  • 173
2 votes
1 answer
131 views

How exactly is ext2 upwards-compatible?

I read somewhere that an operating system which knows nothing about ext3 and ext4 (i.e. antique Linux version) is able to read/write to ext4, and it detects any ext4 file system as ext2. I am not ...
user avatar
  • 1,606
1 vote
0 answers
124 views

i_blocks of struct ext2_inode

I have mounted as /ext2 a separate partition (/dev/sda2), which is formatted as ext2 with a block size 1024. debugfs shows the following: [root@ /]# ls -ild /ext2 2 drwxr-xr-x. 3 root root 1024 Dec ...
user avatar
  • 479
0 votes
1 answer
3k views

How to calculate the "Inode blocks per group" on ext2 file system?

For studying, I assigned a size of 100M and formatted the drive as ext2. This is the output of dumpe2fs: [root@ ext2fs]# dumpe2fs /dev/sda2 dumpe2fs 1.42.9 (28-Dec-2013) Filesystem volume name: <...
user avatar
  • 479
0 votes
2 answers
4k views

Is it safe to fsck on critical disk data partition?

I have x86 based box running FreeBSD 10.1. I have made it dual boot with Red hat Linux as other OS. Now I'm migrating a UFS partition 'A' on a FreeBSD (10.1) to ext2 based partition on Linux. I'm ...
user avatar
2 votes
1 answer
908 views

Creating a ext2 partition on FreeBSD 10.1 running on x86 based box with MBR partitioning

I have old FreeBSD machine running on x86 based platform with below MBR partitioning pod0226-wsa115:rtestuser 1] uname -a FreeBSD pod0226-wsa115 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Mon Mar 10 15:25:...
user avatar
5 votes
1 answer
2k views

What is the most recent technique to implement quotas?

Is the quota approach still in use to limit the usage of disk space and/or the concurrency between users. Quota works with aquota.user files in the concerned directories AND some settings in /etc/...
user avatar
  • 335
1 vote
1 answer
326 views

How to change inode size on EXT2 file

I am running Ubuntu on my MacBook Pro as I need to reformat a hard drive to EXT2 with iNode size of 128 to use for DCP delivery.
user avatar
0 votes
1 answer
705 views

Migrate Ubuntu 16.04 to larger drive and convert to BTRFS and add swap

I'm able to dd my Ubuntu installation from an SD card to my finally-arrived SSD and boot it, but as soon as I resize the partition (using gparted from a livecd), it stops booting. I've tried ...
user avatar
  • 115
2 votes
0 answers
515 views

fsck on an ext2 filesystem. “…directory corrupted” [closed]

UPDATE: Fixed! The final directory entry in a block must point to the end of the block that it is in (I did this by adjusting the length of the final block to span the remainder of the block). I'm ...
user avatar
  • 21
1 vote
0 answers
629 views

Does FreeBSD have problems using ext2fs with external USB hard drives that have a sector size of 4096 Bytes?

I have two identical 1TB external USB-disks which I have formatted under Linux using ext2fs. If I run lsusb in Linux I get the lines: Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. Bus 004 ...
user avatar
  • 735
3 votes
2 answers
2k views

Are hard links for directories possible on ext2/3/4 filesystems?

I've read that the command (and perhaps the system call, too) for creating hard links will not let one create hard links for directories. I also understand that hard links can pose problems for path-...
user avatar
  • 3,458
0 votes
2 answers
324 views

ext2 filesystem

I have a question about ext2 of file system. I need to know really well about this. And I think I sort of understand everything on it. But there is a thing bothering me. As you can see from the first ...
user avatar
2 votes
2 answers
514 views

Embedded device, log partition, what file system is more resilient and uses less reads/writes?

I have an embedded Linux device with a read-only file system. I have another partition that is used to store an archive of logs. This partition will be written to a lot. What linux partition should I ...
user avatar
1 vote
1 answer
169 views

Is it reasonable to use a journaling FS on a filesystem image that is stored on a filsystem that already provides journaling?

I need a filesystem image to put 150k files there, so they should be easily relocatable, i.e. mounted as a folder, when in use, unmounted and copied somewhere when needed. Due to the large number of ...
user avatar
  • 872
2 votes
1 answer
247 views

Why this switch will effectively format disk to ext2 instead of ext4?

I'm formatting a disk with following command switches, I can format the disk to ext4. sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -t ext4 -b 4096 ... However, once I added this ...
user avatar
  • 451
1 vote
1 answer
2k views

how to resume GRUB2 upgrade apparently blocked by /boot filesystem type=ext2?

details As detailed here, the /boot on this Debian Jessie had filesystem type=ext2 $ mount | grep -e '^/dev/' /dev/sda3 on /boot type ext2 ... ... and was unable to upgrade its GRUB2 $ sudo apt-...
user avatar
  • 1,175
5 votes
3 answers
1k views

"write-once archive": ext2 vs ext4^has_journal vs

summary Suppose one is setting up an external drive to be a "write-once archive": one intends to reformat it, copy some files that will (hopefully) never be updated, then set it aside until I need to ...
user avatar
  • 1,175
3 votes
2 answers
814 views

Mount iSCSI ext2 Linux Partition on FreeBSD 10.2

I decided to switch from CentOS to FreeBSD 10 after I had a really good experience installing it on a Xserve G4 (PowerPC, that's a story for another day if anyone is interested). Anyway, my CentOS ...
user avatar
  • 934
2 votes
1 answer
2k views

Are there two inode tables used in locating the inode of a file in ext2?

From Tanenbaum's Modern Operating Systems, when trying to access a file in a ext2 file system in Linux, and then reaching the parent directory of the file, If the file is present, the system ...
user avatar
  • 90.6k
3 votes
1 answer
168 views

How do I control the modes of the root directory created with mke2fs?

mke2fs has a root_owner option. But it seems to lack an option to set the mode of the root directory. My goal is to create a file system, mount it (loopback), and fill it. If the owner is the root, ...
user avatar
0 votes
1 answer
67 views

Ext3 system calls during file creation and modification [closed]

I'm trying to learn more about Linux and its file system and I'm stuck on understanding the difference between the ext3 and ext2 file systems with regards to system calls during file creation and ...
user avatar
  • 1
2 votes
0 answers
114 views

How do distribution installers avoid ext2/3/4 initialization?

When I format a volume with ext4, I have two options regarding initialization. I can either use lazy_itable_init=1 (the default setting) to delay initialization until after the volume is first mounted,...
user avatar
  • 3,583
1 vote
1 answer
2k views

How can I convert a disk from ext4 to ext2?

I have Ubuntu with a root volume using ext4. I need to downgrade it so that it is using ext2. Is there a way to do that?
user avatar
1 vote
0 answers
114 views

What happens to directory entry when a file is renamed [closed]

What exactly happens to the directory entry when a file is renamed? Is it that the entry of the oldfile is flushed and the newfile is replaced at it's place or a completely new entry is made at the ...
user avatar
1 vote
1 answer
146 views

What is the purpose of ext2 dynamic node size?

I've looked in some documentation of ext2 and according to them (see sources) at rev 1.0 it is possible to set the size of the inodes but it doesn't clarify what is the purpose of the extra bytes ...
user avatar
  • 263
1 vote
1 answer
2k views

How much space does an inode occupy?

In Windows, when a file/folder is created, it is associated with an FRN (a unique number which is like an Index into the MFT). All the file metadata is stored in the MFT which occupies a reserved size ...
user avatar
13 votes
3 answers
3k views

Can the filesystem become inconsistent if interrupted when moving a file?

I have two folders on the same partition (EXT2) If I mv folder1/file folder2 and some interruption occur (e.g. power failure) could the file system ever end up being inconsistent? Isn't the mv ...
user avatar
2 votes
1 answer
376 views

Backup partition changed UUID without user interaction

I recently had to purchase a new hard drive. Since I was at it I bought two instead of one as they were on offer (both are the same model). Since there was a lot of space left on the second hard disk ...
user avatar
  • 407
21 votes
4 answers
22k views

What is the difference between "inode size" and "Bytes per inode"

Below information is taken from man page,I would like to know the difference between bytes-per-inode and Inode-size? -i bytes-per-inode Specify the bytes/inode ratio. mke2fs creates an inode for ...
user avatar
4 votes
2 answers
4k views

How to extract raw ext3 inode data from disk?

On an ext3 (or ext2/4, pick your flavor) filesystem, how would one extract raw byte data that corresponds to a particular inode directly from the hard drive? Is it possible given, say, an inode number ...
user avatar
3 votes
2 answers
5k views

Creating disk device in a file

I'm trying to create disk device in a file with: dd if=/dev/zero of=file.img bs=516096 count=1000 sudo losetup /dev/loop0 file.img (echo n; echo p; echo 1; echo ""; echo ""; echo w;) | sudo fdisk -u -...
user avatar
  • 627
3 votes
2 answers
14k views

Ext2 filesystem for /boot partition

Is the ext2 filesystem good for /boot partition? I set ext4 for / root partition, but wasn't sure which filesystem to select for the /boot partition, and I just set ext2. Does it matter in this case?
user avatar
  • 1,213
2 votes
1 answer
1k views

How are large directories stored (one inode or many?)

I've been studying up on the ext2 file system and inodes, and I'm not quite understanding a few things. How big is an inode? The output from tune2fs says its 256 for my system, so is that 256 byes? ...
user avatar
9 votes
1 answer
12k views

What is the difference between fsck options -y and -p?

The ext2/3/4 filesystem checker has two options that seem to be very similar, -p and -y. Both seem to perform an automatic repair, but the manpage states that -p can exit when it encounters certain ...
user avatar
  • 940
0 votes
1 answer
625 views

Is there any alternative to genext2fs in RHEL?

I am tryting to make initrd file system following [this tutorial][1] My host system is RHEL 6 64 bit. I am unable to get the required command: genext2fs No rpm is available for it, neither ...
user avatar
  • 1,196