I wanted to know what are the advantages and disadvantages of each one and in which device it is better to use one or the other.
- https://openwrt.org/docs/techref/filesystems
- http://www.linux-mag.com/id/7357/
- https://en.wikipedia.org/wiki/Ext4
The main difference is that you must used a compressed file system on most embedded devices, because they do not have enough space to hold the file system uncompressed.
Okay. I'm going to use Ext4 on x86. Is there any way in this system to be able to rename the "factory state"?
What do you mean by the phrase: "factory state"?
(If this is question is not related to filesystems, you may wish to open another thread, and mark this one as solved.)
That's where SquashFS comes in more handy. While you can opt for ext4 on x86 targets that have enough storage, SquashFS being read-only means you can effectively reset your device (factory state just wipes the overlay partition which stores settings and packages you added after flashing). With the ext4 images, to my knowledge, you get none of that, since your root filesystem is just a writable ext4 partition.
Of course, using sysupgrade -F
with a fresh image would do the same as a factory reset (minus the wear on your storage ).
To be able to restart the system as it comes from the factory. At least, as it started for the first time.
And is not there something similar for Ext4?
I understand. As @Borromini noted, resetting the device to default is much easier on SquashFS.
As he noted, I likewise beleive that such wouldn't be possible on an ext4 based device, without using sysupgrade -f.
And how could I use that command for that purpose?
sysupgrade -f /path/to/firmware.image
is the "sledgehammer" of "replace this filesystem with that in the firmware supplied on the line".
With ext4, I personally would use a backup regimen with tar
and/or rsync
and be able to "go back" as I needed for specific files, rather than the whole thing.
- Login to the router via SSH
cd /tmp
wget http://downloads.openwrt.org/releases/18.06.1/targets/foo/foo-ext4.bin
sysupgrade -f foo-ext4.bin
("Foo" is a placeholder, you would download the appropriate firmware for you device.)
Ok, and finally, is there any speed advantage of using Ext4 instead of SquashFS or vice versa?
You know, you could ask all your questions at once.
btrfs has filesystem snapshots, though I don't know if it's supported by openwrt as a root fs. Perhaps you could mount a btrfs after initial boot.
I do not understand. I am new at this.
I hope that your questions were answered.
If not, what are you having trouble understanding?
I already understand more or less what I asked. What I do not understand is what he said
dlakelan.
I'm saying that if you are looking for a filesystem that can be set up with a read-only snapshot that can be reverted, then btrfs is capable of this kind of thing. I assume this is only for x86 based devices with lots of storage space, because I have no idea how that would work on a typical embedded router device.
If you don't understand what I'm talking about already, then this route is probably not for you. btrfs takes some knowledge to administer it has many many useful options, perhaps later in your learning you will find this useful.
That's why I have to read and learn before doing something. I always start with the practical part
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.