Questions tagged [debugfs]
ext2/ext3/ext4 file system debugger
35 questions
1 vote
1 answer
57 views
How to dump the lost+found content from an ext4 img file that cannot be mounted using debugfs in linux and keep the folder hierarchy?
How to dump the lost+found content from an ext4 img file that cannot be mounted using debugfs in linux and keep the folder hierarchy? My ext4 disk was failing. I made a disk image. I tried e2fsck and ...
1 vote
0 answers
278 views
How to trace DMA transactions by using dma_debug?
I am currently working on some PCI-e device stuff, that requires me to get the trace for DMA transactions on a specific (say GPU or NIC ) PCI card. After doing some research I found a useful post by ...
1 vote
1 answer
129 views
Why can the mount points of debugfs and sysfs be overlapped?
The mount point for debugfs is /sys/kernel/debug, and the mount point for sysfs is /sys/, why can these 2 mount points be overlapped without interference?
0 votes
1 answer
705 views
Why debugfs is mounted on /sys/kernel/debug?
As far as I know, /sys/ is for sysfs, why debugfs is mounted under the /sys/ directory? Why not just mount it under /debug/ to make it clearer?
0 votes
1 answer
350 views
Weird debugfs behavior
I'm playing with debugfs. I first created a file: debugfs -w /dev/vda1 > write /etc/hosts /a/b/c/d And the file system is broken: [root@linux2 /]# ls -l ls: cannot access /a/b/c/d: No such file or ...
0 votes
1 answer
321 views
debugfs on a NAS
# debugfs -R 'stat <INODE>' /dev/sdaX or # debugfs -R 'stat FILENAME' /dev/sdaX> display file creation time etc. How to run this command if the DEVICE is a NAS mounted e.g. on /MOUNTPOINT/VOL-...
2 votes
0 answers
895 views
How can I modify a file creation time in btrfs
I wanted to have snapshots on my filesystem. Since the btrfs-convert tool is not available anymore, I was forced to convert my filesystem by copying it file-by-file on a new file-system. However, I ...
0 votes
0 answers
249 views
Where are my inodes used (advanced, debugfs, etc)
I made a copy of an ext4 volume with many errors and fscked it, before making an extensive comparison in order to make sure no data was lost in the process. since there were all kind of codings in the ...
3 votes
1 answer
3k views
debugfs not working | file not found by ext2_lookup
$sudo blkid /dev/sda1: UUID="F959-61DE" TYPE="vfat" PARTUUID="950b18a0-1501-48b4-92ef-ba1dd15aaf21" /dev/sda2: UUID="6dfcfc23-b076-4eeb-8fba-a1261b4ea399" TYPE=&...
1 vote
1 answer
1k views
Reading stale file data with debugfs cat
I'm trying to read the contents of a file using the file's inode. This works fine: echo "First line" > data.txt sync sudo debugfs -R "cat <$(stat -c %i data.txt)>" /dev/...
0 votes
0 answers
348 views
Can't copy file with debugfs command
I'm playing around with debugfs command: # debugfs -w /dev/sda1 -R "write /etc/passwd /test" debugfs 1.45.5 (07-Jan-2020) Allocated inode: 24 But /test is not created: # cat /test cat: /...
0 votes
0 answers
3k views
"Bad magic number in super-block while opening filesystem" when trying to open a disk partition with debugs
I'm trying to trace some I/O on my Linux virtual machine. The capture gives me LBAs which I need to map to the file name. I'm trying to use debugfs for that. For example, I want to see what file LBA=...
1 vote
1 answer
984 views
creating a debugfs file that is used to read/write u32 value
I'm trying to create a file with the following specifications. The file "myfile" in a debugfs sub-directory is to be read only by any user, and when read, should return the current value of ...
4 votes
3 answers
4k views
Copying or restoring crtime for files/directories on ext4fs filesystem
I wonder if there are ways to copy or restore crtime (creation time) for inodes/files/directories in Linux in 2020. I've accidentally deleted a folder while I still have a full disk backup, but ...
1 vote
1 answer
336 views
How to enlarge an ext3/ext4 filesystem through debugfs?
I’m in a situation where I want to enlarge the default size of an ext4 filesystem used by the firmware. The problem is resize2fs is doing extra things like clearing some filesystems features and ...