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
4
votes
2answers
153 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 ...
0
votes
1answer
28 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 ...
1
vote
0answers
68 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 ...
4
votes
0answers
99 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 ...
1
vote
1answer
62 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 ...
0
votes
1answer
35 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 ...
0
votes
3answers
1k 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 ...
4
votes
1answer
66 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 ...
2
votes
1answer
61 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 ...
1
vote
0answers
55 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 ...
0
votes
1answer
836 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: <...
0
votes
2answers
2k 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 ...
2
votes
1answer
461 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:...
4
votes
0answers
526 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/...
1
vote
1answer
217 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.
0
votes
1answer
595 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 ...
2
votes
0answers
306 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 ...
1
vote
0answers
364 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 ...
0
votes
2answers
899 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-...
0
votes
2answers
89 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 ...
2
votes
2answers
287 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 ...
1
vote
1answer
102 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 ...
2
votes
1answer
166 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 ...
0
votes
1answer
674 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-...
5
votes
3answers
954 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 ...
2
votes
2answers
575 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 ...
1
vote
1answer
951 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 ...
3
votes
1answer
84 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, ...
1
vote
1answer
62 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 ...
2
votes
0answers
96 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,...
0
votes
1answer
1k 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?
2
votes
0answers
83 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 ...
1
vote
1answer
93 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 ...
1
vote
1answer
1k 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 ...
13
votes
3answers
2k 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 ...
2
votes
1answer
161 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 ...
18
votes
4answers
14k 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 ...
3
votes
1answer
2k 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 ...
3
votes
2answers
3k 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 -...
1
vote
2answers
9k 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?
1
vote
1answer
596 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? ...
6
votes
1answer
5k 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 ...
0
votes
1answer
461 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 ...
7
votes
2answers
5k views

“Converting” a filesystem from ext3 to ext4

I've read on some Q&A on this website that one can "convert" an ext3 filesystem to ext4 without formatting, by issuing tune2fs -O extents,uninit_bg,dir_index /dev/dev-name And then running fsck. ...
6
votes
2answers
2k views

Reliable way to detect ext2 or ext3 or ext4?

I need to detect a filesystem type from a C/C++ program using the filesystem superblock. However, I don't see much differences between superblocks for ext2 and ext4. The s_rev_level field is the same (...
3
votes
1answer
2k views

Ext2 block structure: size of reserved GDT Blocks

In every publication I found about ext2, the structure of a block group is defined as following: Super Block: 1 block Group Descriptor: N blocks Data Bitmap: 1 block Inode Bitmap: 1 block Inode Table:...
0
votes
1answer
626 views

libext2fs gcc linking error

I am writing a C program which uses libext2fs: #include <ext2fs/ext2fs.h> int main(int argc, char *argv[]) { char *fsname = argv[1]; errcode_t err; ext2_filsys fs; err= ...
6
votes
2answers
2k views

zerofree verbose returns what?

zerofree -v /dev/sda1 returned 123642/1860888/3327744. The man page does not explain what those numbers are: http://manpages.ubuntu.com/manpages/natty/man8/zerofree.8.html I found some code on ...
5
votes
1answer
4k views

How can I dump the contents of a filesystem's superblock?

I understand that I can list the location of a filesystem's superblocks using the following commands. Example First get the device handle for the current directory. $ df -h . Filesystem ...
2
votes
1answer
599 views

Relation between “Block Size”and “Upper Limits” in ext2

A similar looking question asks for the reason why the upper file limit could be 2 TB in ext2. I am trying to understand but the Documentation on ext2 but find this hard. Please correct me if I'm ...