Updating UBIFS rootfilesystem
Hi,
is there an elegant way to update an UBIFS rootfilesystem?
Let's say I have enough flash space for my actual rootfilesystem (rootfs1) and a new version (rootfs2). So while running from rootfs1 I updated rootfs2 volume with a new rootfilesystem.
Now my idea was to use ubirename to exchange the volume names so that after next reboot rootfs1 'points' to the new filesystem and rootfs2 contains the old one (ready for deletion or further updates).
As expected ubirename reports "Device or resource busy" probably because it cannot rename mounted volumes. Of course I could tell my bootloader to mount rootfs2 after a reboot. But isn't there a more elegant way? ubirename really looks like the right way ....
Any ideas?
Matthias
Quoted 7 lines · Matthias Fuchs
Hi,
is there an elegant way to update an UBIFS rootfilesystem?
Let's say I have enough flash space for my actual rootfilesystem (rootfs1) and a new version (rootfs2). So while running from rootfs1 I updated rootfs2 volume with a new rootfilesystem.
I you cannot update a mounted fs - you have to unmount it first. If you are able to do this, you should be able to ubirename.
Signature · 2 lines
Best Regards, Artem Bityutskiy
Quoted 11 lines · Artem Bityutskiy
Quoted 7 lines · Matthias Fuchs
Hi,
is there an elegant way to update an UBIFS rootfilesystem?
Let's say I have enough flash space for my actual rootfilesystem (rootfs1) and a new version (rootfs2). So while running from rootfs1 I updated rootfs2 volume with a new rootfilesystem.
I you cannot update a mounted fs - you have to unmount it first. If you are able to do this, you should be able to ubirename.
So I was thinking that a ubirename is not really an update and expected the rename op to work even on a mounted fs.
I solved the issue by booting an initramfs first. There I do the rename "rootfs2" exists and then switch root
Quoted 11 lines · Artem Bityutskiy
Quoted 7 lines · Matthias Fuchs
Hi,
is there an elegant way to update an UBIFS rootfilesystem?
Let's say I have enough flash space for my actual rootfilesystem (rootfs1) and a new version (rootfs2). So while running from rootfs1 I updated rootfs2 volume with a new rootfilesystem.
I you cannot update a mounted fs - you have to unmount it first. If you are able to do this, you should be able to ubirename.
So I was thinking that a ubirename is not really an update and expected the rename op to work even on a mounted fs.
I solved the issue by booting an initramfs first.
There I do the rename "rootfs2" -> "rootfs1" and then switch root to "rootfs1".
Matthias
Quoted 6 lines · Matthias Fuchs
Quoted 5 lines · Artem Bityutskiy
Quoted 4 lines · Matthias Fuchs
Hi,
is there an elegant way to update an UBIFS rootfilesystem?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Let's say I have enough flash space for my actual rootfilesystem (rootfs1) and a new version (rootfs2). So while running from rootfs1 I updated rootfs2 volume with a new rootfilesystem.
I you cannot update a mounted fs - you have to unmount it first. If you are able to do this, you should be able to ubirename.
So I was thinking that a ubirename is not really an update and expected the rename op to work even on a mounted fs.
I agree, it would be very nice to be able to rename a mounted file system, although I don't know if there is something internal to UBI which would conflict with that. For instance, when doing 'df', it reports the UBI volume name (such as "ubi0:rootfs") and I don't know if it's possible to change the corresponding string once the file system has been mounted.
/Ricard
Signature · 3 lines
Ricard Wolf Wanderlöf ricardw(at)axis.com Axis Communications AB, Lund, Sweden www.axis.com Phone +46 46 272 2016 Fax +46 46 13 61 30
Quoted 5 lines · Ricard Wanderlof
I agree, it would be very nice to be able to rename a mounted file system, although I don't know if there is something internal to UBI which would conflict with that. For instance, when doing 'df', it reports the UBI volume name (such as "ubi0:rootfs") and I don't know if it's possible to change the corresponding string once the file system has been mounted.
Well, may be it is possible. It is a matter of someone experimenting with this if he really needs it.
Signature · 2 lines
Best Regards, Artem Bityutskiy