| Both sides previous revision Previous revision Next revision | Previous revision |
| docs:techref:file_system [2018/02/22 13:37] – [OpenWrt File System Hierarchy / Memory Usage] html replaced by wiki syntax tmomas | docs:techref:file_system [2018/04/13 05:59] (current) – link updated tmomas |
|---|
| ^ Layer2 | @#de401d: | @#a11dde:mtd1 **//kernel//** 1280 KiB | @#378712:mtd2 **//rootfs//** 6720 KiB || @#1dbade: | @#ff00ff: | @#00ffff:up to 50% | @#00ffff:512 KiB | @#00ffff:remaining | | ^ Layer2 | @#de401d: | @#a11dde:mtd1 **//kernel//** 1280 KiB | @#378712:mtd2 **//rootfs//** 6720 KiB || @#1dbade: | @#ff00ff: | @#00ffff:up to 50% | @#00ffff:512 KiB | @#00ffff:remaining | |
| ^ mountpoint | @#de401d: | @#a11dde: | @#378712:/ || @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | | ^ mountpoint | @#de401d: | @#a11dde: | @#378712:/ || @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | |
| ^ filesystem | @#de401d: | @#a11dde: | @#378712:[[doc:techref:filesystems#overlayfs]] || @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | | ^ filesystem | @#de401d: | @#a11dde: | @#378712:[[docs:techref:filesystems#overlayfs]] || @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | |
| ^ Layer3 | @#de401d: | @#a11dde: | @#dea11d:1536 KiB | @#5ade1d:mtd3 **//rootfs_data//** 5184 KiB | @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | | ^ Layer3 | @#de401d: | @#a11dde: | @#dea11d:1536 KiB | @#5ade1d:mtd3 **//rootfs_data//** 5184 KiB | @#1dbade: | @#ff00ff: | @#00ffff: | @#00ffff: | @#00ffff: | |
| ^ mountpoint | @#de401d:none | @#a11dde:none | @#dea11d:/rom | @#5ade1d:/overlay | @#1dbade:none | @#ff00ff: | @#00ffff:/tmp | @#00ffff:/dev | @#00ffff: | | ^ mountpoint | @#de401d:none | @#a11dde:none | @#dea11d:/rom | @#5ade1d:/overlay | @#1dbade:none | @#ff00ff: | @#00ffff:/tmp | @#00ffff:/dev | @#00ffff: | |
| ^ filesystem | @#de401d:none | @#a11dde:none | @#dea11d:[[doc:techref:filesystems#squashfs|SquashFS]] | @#5ade1d:[[doc:techref:filesystems#JFFS2|JFFS2]] | @#1dbade:none | @#ff00ff: | @#00ffff:[[doc:techref:filesystems#tmpfs|tmpfs]] | @#00ffff:[[doc:techref:filesystems#tmpfs|tmpfs]] | @#00ffff: | | ^ filesystem | @#de401d:none | @#a11dde:none | @#dea11d:[[docs:techref:filesystems#squashfs|SquashFS]] | @#5ade1d:[[docs:techref:filesystems#JFFS2|JFFS2]] | @#1dbade:none | @#ff00ff: | @#00ffff:[[docs:techref:filesystems#tmpfs|tmpfs]] | @#00ffff:[[docs:techref:filesystems#tmpfs|tmpfs]] | @#00ffff: | |
| ==== Mount Points ==== | ==== Mount Points ==== |
| * <color magenta>''/''</color> this is your entire root filesystem, it comprises ''/rom'' and ''/overlay''. Please ignore ''/rom'' and ''/overlay'' and use exclusively ''/'' for your daily routines! | * <color magenta>''/''</color> this is your entire root filesystem, it comprises ''/rom'' and ''/overlay''. Please ignore ''/rom'' and ''/overlay'' and use exclusively ''/'' for your daily routines! |
| * <color magenta>''/rom''</color> contains all the basic files, like ''busybox'', ''dropbear'' or ''iptables''. It also includes default configuration files used when booting into [[docs:user-guide:troubleshooting:failsafe_and_factory_reset|OpenWrt Failsafe mode]]. It does not contain the Linux kernel. All files in this directory are located on the SqashFS partition, and thus cannot be altered or deleted. But, because we use overlay_fs filesystem, so called //overlay-whiteout//-symlinks can be created on the JFFS2 partition. | * <color magenta>''/rom''</color> contains all the basic files, like ''busybox'', ''dropbear'' or ''iptables''. It also includes default configuration files used when booting into [[docs:guide-user:troubleshooting:failsafe_and_factory_reset|OpenWrt Failsafe mode]]. It does not contain the Linux kernel. All files in this directory are located on the SqashFS partition, and thus cannot be altered or deleted. But, because we use overlay_fs filesystem, so called //overlay-whiteout//-symlinks can be created on the JFFS2 partition. |
| * <color magenta>''/overlay''</color> is the writable part of the file system that gets merged with ''/rom'' to create a uniform ''/''-tree. It contains anything that was written to the router after [[docs:user-guide:installation:generic.flashing|installation]], e.g. changed configuration files, additional packages installed with ''[[docs:user-guide:additional-software:opkg]]'', etc. It is formated with JFFS2.\\ Rather than deleting the files, insert a whiteout, a special high-priority entry that marks the file as deleted. File system code that sees a whiteout entry for file F behaves as if F does not exist.\\ <code bash> | * <color magenta>''/overlay''</color> is the writable part of the file system that gets merged with ''/rom'' to create a uniform ''/''-tree. It contains anything that was written to the router after [[docs:guide-user:installation:generic.flashing|installation]], e.g. changed configuration files, additional packages installed with ''[[docs:guide-user:additional-software:opkg]]'', etc. It is formated with JFFS2.\\ Rather than deleting the files, insert a whiteout, a special high-priority entry that marks the file as deleted. File system code that sees a whiteout entry for file F behaves as if F does not exist.\\ <code bash> |
| #!/bin/sh | #!/bin/sh |
| # shows all overlay-whiteout symlinks in the directory /overlay | # shows all overlay-whiteout symlinks in the directory /overlay |