* Updating UBIFS rootfilesystem @ 2012-02-08 12:44 Matthias Fuchs 2012-02-13 13:57 ` Artem Bityutskiy 0 siblings, 1 reply; 6+ messages in thread From: Matthias Fuchs @ 2012-02-08 12:44 UTC (permalink / raw) To: linux-mtd@lists.infradead.org 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Updating UBIFS rootfilesystem 2012-02-08 12:44 Updating UBIFS rootfilesystem Matthias Fuchs @ 2012-02-13 13:57 ` Artem Bityutskiy 2012-02-24 8:14 ` Matthias Fuchs 2012-02-24 8:16 ` Matthias Fuchs 0 siblings, 2 replies; 6+ messages in thread From: Artem Bityutskiy @ 2012-02-13 13:57 UTC (permalink / raw) To: Matthias Fuchs; +Cc: linux-mtd@lists.infradead.org [-- Attachment #1: Type: text/plain, Size: 502 bytes --] On Wed, 2012-02-08 at 13:44 +0100, Matthias Fuchs wrote: > 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. -- Best Regards, Artem Bityutskiy [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Updating UBIFS rootfilesystem 2012-02-13 13:57 ` Artem Bityutskiy @ 2012-02-24 8:14 ` Matthias Fuchs 2012-02-24 9:47 ` Ricard Wanderlof 2012-02-24 8:16 ` Matthias Fuchs 1 sibling, 1 reply; 6+ messages in thread From: Matthias Fuchs @ 2012-02-24 8:14 UTC (permalink / raw) To: dedekind1; +Cc: linux-mtd@lists.infradead.org On 02/13/2012 02:57 PM, Artem Bityutskiy wrote: > On Wed, 2012-02-08 at 13:44 +0100, Matthias Fuchs wrote: >> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Updating UBIFS rootfilesystem 2012-02-24 8:14 ` Matthias Fuchs @ 2012-02-24 9:47 ` Ricard Wanderlof 2012-03-09 7:53 ` Artem Bityutskiy 0 siblings, 1 reply; 6+ messages in thread From: Ricard Wanderlof @ 2012-02-24 9:47 UTC (permalink / raw) To: Matthias Fuchs; +Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com On Fri, 24 Feb 2012, Matthias Fuchs wrote: > On 02/13/2012 02:57 PM, Artem Bityutskiy wrote: >> On Wed, 2012-02-08 at 13:44 +0100, Matthias Fuchs wrote: >>> 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 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 -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Updating UBIFS rootfilesystem 2012-02-24 9:47 ` Ricard Wanderlof @ 2012-03-09 7:53 ` Artem Bityutskiy 0 siblings, 0 replies; 6+ messages in thread From: Artem Bityutskiy @ 2012-03-09 7:53 UTC (permalink / raw) To: Ricard Wanderlof; +Cc: linux-mtd@lists.infradead.org, Matthias Fuchs On Fri, 2012-02-24 at 10:47 +0100, Ricard Wanderlof wrote: > 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. -- Best Regards, Artem Bityutskiy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Updating UBIFS rootfilesystem 2012-02-13 13:57 ` Artem Bityutskiy 2012-02-24 8:14 ` Matthias Fuchs @ 2012-02-24 8:16 ` Matthias Fuchs 1 sibling, 0 replies; 6+ messages in thread From: Matthias Fuchs @ 2012-02-24 8:16 UTC (permalink / raw) To: dedekind1; +Cc: linux-mtd@lists.infradead.org On 02/13/2012 02:57 PM, Artem Bityutskiy wrote: > On Wed, 2012-02-08 at 13:44 +0100, Matthias Fuchs wrote: >> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-09 7:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-08 12:44 Updating UBIFS rootfilesystem Matthias Fuchs 2012-02-13 13:57 ` Artem Bityutskiy 2012-02-24 8:14 ` Matthias Fuchs 2012-02-24 9:47 ` Ricard Wanderlof 2012-03-09 7:53 ` Artem Bityutskiy 2012-02-24 8:16 ` Matthias Fuchs
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox