file attributes
2024-11-14
我们常见的文件:mode、owner、类型、大小、修改时间。是file status,使用stat()系统调用和stat命令进行统计。而file attributes是文件属性,是一个32位的flags。这个属性只存在于ext4等部分文件系统。使用chattr命令,来设置文件属性。chattr +-
zram: Compressed RAM based block devices
2024-11-14
装了个fedora 41,显示 SWAP使用的是 /dev/zram0 设备,卸载:sudo dnf remove zram-generator-defaults。后,就没有zram了。zram是个啥东西呢?原来是一个压缩存储到内存的块设备,特别适合作为swap。安装zram:modprobe zr
build custom kernel module on linux
2024-11-15
最近在fedora 41上开发fuse文件系统。需要编译fuse内核模块,加一些调试信息。编译方法如下:1 确定内核版本$ uname -r6.11.4-301.fc41.x86_642 从国内清华镜像站克隆内核源码$ git clone https://mirrors.tuna.tsinghua.
umount other namespace mounts
2024-11-15
想要卸载内核模块fuse,发现其引用计数为3,无法卸载:$ lsmod | grep fusefuse 233472 3查看使用fuse的挂载点:$ mount | grep fusefusectl on /sys/fs/fuse/connections type
build custom kernel for fedora 41
2024-11-18
由于工作需要调试内核,加点打印,本文讲述如何编译了一个自己的内核,并且安装1 下载内核源码repository:https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git branch:linux-6.11.y2 打fedora的patchre
repack initramfs on fedora 41
2024-11-18
最近在调试fuse,需要在启动的时候不加载fuse。可是initramfs里面加载了,于是需要修改initramfs。把fuse模块删除。1 解压主img:$ cp /boot/initramfs-6.11.8.img .$ mkdir img$ cpio -i -D img -F initramf
fuse inode reference count
2024-11-27
文件系统是通过inode id来操作文件的。目录树的维护,也是通过parent inode id + name的方式维护。每个inode id对应的inode有一个reference count,当refrence count减为0的时候,内核就不会再缓存该inode了,意味着在再次获得该inode
windows samba登录失败问题调试
2024-11-27
samba配置修改几次后,改回来,windows登录不上了。使用调试发现:$ sudo smbd --foreground --no-process-group --debug-stdout -d 10 2>&1 | tee smbd.logwindows会使用旧的用户名登陆。我们需要重置windo
glibc's free() never return heap memory to kernel
2024-11-29
看下面一段测试程序:12345678910111213141516171819202122232425262728293031#include #include #include static void print_mem(){
port latest linux 6.6 to mediatek mt7981b soc from scratch, part 3
2024-12-1
前面两个part,tiny内核基本ok了,能看到串口输出,part 3将创建一个rootfs,并拉起相关的外设子系统。1 rootfs由于mtd还没有拉起来,因此先使用initramfs作为rootfs。开启相关内核选项。+CONFIG_BLK_DEV_INITRD=y+CONFIG_RD_XZ=y
Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.