Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-21 Thread Philip Prindeville
Sorry for being dense: where is the overlay filesystem during all of this? 
/dev/sda4?

On 4/12/12 8:28 PM, Adam Gensler wrote:
 I think the layout of the x86 filesystem needs to change in order to 
 support sysupgrade properly. Personally I'm using an alix2 board with 
 the ext4 filesystem (trunk image). I've not had much luck getting 
 reliable sysupgrades when using a pure ext4 filesystem. It works only 
 sporadically. More often than not the file system ends up corrupted.
 
 I've been tinkering with the following layout:
 
 /dev/sda1 = boot partition, contains two copies of the kernel, vmlinuz 
 and vmlinuz2
 
 /dev/sda2 = root partition, contains ext4 file system
 
 /dev/sda3 = second root partition, contains ext4 file system
 
 The grub menu.lst would be modified such that vmlinuz would use rootfs 
 /dev/sda2. vmlinuz2 would use root in /dev/sda3.
 
 When it is time to upgrade the image, the inactive rootfs partition 
 would be the one upgraded. /dev/sda1 would be mounted, the correct 
 kernel overwritten, and menu.lst updated to default to the new kernel.
 
 This would allow the system to remain fully operational during an 
 upgrade, no ramdisk needed.
 
 I've got this part working so far, albeit via manual partition creation 
 and upgrades. I'm hacking around in 
 target/linux/x86/image/gen_image_x86.sh and 
 target/linux/x86/image/Makefile to make the extra partition creation 
 automatic, an initial duplicate copy of the rootfs, and the appropriate 
 menu.lst entries.
 
 Presumably once this infrastructure is in place it should be possible to 
 mount the upgraded rootfs and extract the sysupgrade backup tarball onto 
 it. That's just a theory though, I haven't gotten that far.
 
 Thoughts?
 
 Adam
 
 
 On 4/10/12 6:24 PM, Philip Prindeville wrote:
 Just a reminder that this bounty is still unclaimed.

 On 2/10/12 3:11 PM, Philip Prindeville wrote:
 Sysupgrade currently doesn't allow updating software in place without 
 clobbering the existing config (stored on the ext4 overlay filesystem that 
 immediately follows the jffs2 filesystem).

 I've spoken to various interested parties using x86 hardware, and we'd like 
 to see if anyone is interested in doing bounty work to support sysupgrade 
 on x86.

 Thanks,

 -Philip
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-13 Thread David Woodhouse
For a start, this isn't really about x86, is it? It's about systems
which use block-based storage instead of flash?

This is for anything which makes the mistake of using CompactFlash or SD
instead of letting the OS have real access to the flash.

There are x86 systems (like OLPCv1, anything with a DiskOnChip, etc.)
with real flash, and there are non-x86 systems which unfortunately use
SD. Although perhaps OpenWrt hasn't reached the latter yet.

So whatever the solution, it *shouldn't* be specific to the x86 target,
surely?

On Thu, 2012-04-12 at 22:28 -0400, Adam Gensler wrote:
 When it is time to upgrade the image, the inactive rootfs partition 
 would be the one upgraded. /dev/sda1 would be mounted, the correct 
 kernel overwritten, and menu.lst updated to default to the new kernel.

Sounds like you'd be a lot better off using btrfs snapshots for that.

Take a snapshot before upgrade, mount that snapshot and untar the new
system image into it. Then reboot mounting that snapshot as root.

(Remember, in btrfs snapshots are more like branches; they're writeable
and the 'master' is just another snapshot that happens to be the one
that gets mounted by default when you don't specify otherwise.)

-- 
dwmw2


smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-13 Thread David Woodhouse
On Fri, 2012-04-13 at 10:24 +0100, David Woodhouse wrote:
 Sounds like you'd be a lot better off using btrfs snapshots for that.

Note that btrfs-progs from the git tree now has a '-r' option to create
an image from a given directly, much like genext2fs does.

-- 
dwmw2


smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-13 Thread Kaspar Schleiser

Hey,

well, and it only affects those installations that use ext4.
Using sqashfs and jffs2 is perfectly possibly on block devices. 
Sysupgrade works fine with them on x86.


Regards
Kaspar

On 04/13/2012 11:24 AM, David Woodhouse wrote:

For a start, this isn't really about x86, is it? It's about systems
which use block-based storage instead of flash?

This is for anything which makes the mistake of using CompactFlash or SD
instead of letting the OS have real access to the flash.

There are x86 systems (like OLPCv1, anything with a DiskOnChip, etc.)
with real flash, and there are non-x86 systems which unfortunately use
SD. Although perhaps OpenWrt hasn't reached the latter yet.

So whatever the solution, it *shouldn't* be specific to the x86 target,
surely?

On Thu, 2012-04-12 at 22:28 -0400, Adam Gensler wrote:

When it is time to upgrade the image, the inactive rootfs partition
would be the one upgraded. /dev/sda1 would be mounted, the correct
kernel overwritten, and menu.lst updated to default to the new kernel.


Sounds like you'd be a lot better off using btrfs snapshots for that.

Take a snapshot before upgrade, mount that snapshot and untar the new
system image into it. Then reboot mounting that snapshot as root.

(Remember, in btrfs snapshots are more like branches; they're writeable
and the 'master' is just another snapshot that happens to be the one
that gets mounted by default when you don't specify otherwise.)




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-13 Thread Adam Gensler
Not entirely. If you do sysupgrade -n, even with a squashfs image, the 
image isn't actually upgraded. The upgrade process skips writing the 
image file and proceeds with a reboot without having done anything.



On 4/13/12 8:03 AM, Kaspar Schleiser wrote:

Hey,

well, and it only affects those installations that use ext4.
Using sqashfs and jffs2 is perfectly possibly on block devices.
Sysupgrade works fine with them on x86.

Regards
Kaspar

On 04/13/2012 11:24 AM, David Woodhouse wrote:

For a start, this isn't really about x86, is it? It's about systems
which use block-based storage instead of flash?

This is for anything which makes the mistake of using CompactFlash or SD
instead of letting the OS have real access to the flash.

There are x86 systems (like OLPCv1, anything with a DiskOnChip, etc.)
with real flash, and there are non-x86 systems which unfortunately use
SD. Although perhaps OpenWrt hasn't reached the latter yet.

So whatever the solution, it *shouldn't* be specific to the x86 target,
surely?

On Thu, 2012-04-12 at 22:28 -0400, Adam Gensler wrote:

When it is time to upgrade the image, the inactive rootfs partition
would be the one upgraded. /dev/sda1 would be mounted, the correct
kernel overwritten, and menu.lst updated to default to the new kernel.


Sounds like you'd be a lot better off using btrfs snapshots for that.

Take a snapshot before upgrade, mount that snapshot and untar the new
system image into it. Then reboot mounting that snapshot as root.

(Remember, in btrfs snapshots are more like branches; they're writeable
and the 'master' is just another snapshot that happens to be the one
that gets mounted by default when you don't specify otherwise.)




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-12 Thread Adam Gensler
I think the layout of the x86 filesystem needs to change in order to 
support sysupgrade properly. Personally I'm using an alix2 board with 
the ext4 filesystem (trunk image). I've not had much luck getting 
reliable sysupgrades when using a pure ext4 filesystem. It works only 
sporadically. More often than not the file system ends up corrupted.


I've been tinkering with the following layout:

/dev/sda1 = boot partition, contains two copies of the kernel, vmlinuz 
and vmlinuz2


/dev/sda2 = root partition, contains ext4 file system

/dev/sda3 = second root partition, contains ext4 file system

The grub menu.lst would be modified such that vmlinuz would use rootfs 
/dev/sda2. vmlinuz2 would use root in /dev/sda3.


When it is time to upgrade the image, the inactive rootfs partition 
would be the one upgraded. /dev/sda1 would be mounted, the correct 
kernel overwritten, and menu.lst updated to default to the new kernel.


This would allow the system to remain fully operational during an 
upgrade, no ramdisk needed.


I've got this part working so far, albeit via manual partition creation 
and upgrades. I'm hacking around in 
target/linux/x86/image/gen_image_x86.sh and 
target/linux/x86/image/Makefile to make the extra partition creation 
automatic, an initial duplicate copy of the rootfs, and the appropriate 
menu.lst entries.


Presumably once this infrastructure is in place it should be possible to 
mount the upgraded rootfs and extract the sysupgrade backup tarball onto 
it. That's just a theory though, I haven't gotten that far.


Thoughts?

Adam


On 4/10/12 6:24 PM, Philip Prindeville wrote:

Just a reminder that this bounty is still unclaimed.

On 2/10/12 3:11 PM, Philip Prindeville wrote:

Sysupgrade currently doesn't allow updating software in place without 
clobbering the existing config (stored on the ext4 overlay filesystem that 
immediately follows the jffs2 filesystem).

I've spoken to various interested parties using x86 hardware, and we'd like to 
see if anyone is interested in doing bounty work to support sysupgrade on x86.

Thanks,

-Philip

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-04-10 Thread Philip Prindeville
Just a reminder that this bounty is still unclaimed.

On 2/10/12 3:11 PM, Philip Prindeville wrote:
 Sysupgrade currently doesn't allow updating software in place without 
 clobbering the existing config (stored on the ext4 overlay filesystem that 
 immediately follows the jffs2 filesystem).
 
 I've spoken to various interested parties using x86 hardware, and we'd like 
 to see if anyone is interested in doing bounty work to support sysupgrade on 
 x86.
 
 Thanks,
 
 -Philip
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-15 Thread Russell Senior
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:

Philip On 2/11/12 1:30 PM, Philip Prindeville wrote:
 On 2/11/12 3:21 AM, Russell Senior wrote:
 What kind of bounty are you talking about?
  Not sure. I'd need to know the extent of the work involved before
 I could say.
 
 Last time I tried sysupgrade on an alix it panicked the system and
 corrupted my overlay filesystem.

Philip How much are you thinking would be appropriate?

Personally, I lack intrinsic motivation when it comes to your problem,
since I never keep overlay fs's, but bake whatever i need into the
squashfs.  I'll acknowledge I may not reflect the general case.

My canonical incantation is:

  cd /tmp
  scp me@buildhost:img /tmp/
  sysupgrade -v -n img 

That's been working for me on net4521's, alix2's, atheros and brcm47xx
(although sysupgrading on brcm47xx-wgt634u from a circa r18xxx is
somewhat fragile).


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-14 Thread Philip Prindeville
On 2/11/12 1:30 PM, Philip Prindeville wrote:
 On 2/11/12 3:21 AM, Russell Senior wrote:
 What kind of bounty are you talking about?
 
 Not sure. I'd need to know the extent of the work involved before I could say.
 
 Last time I tried sysupgrade on an alix it panicked the system and corrupted 
 my overlay filesystem.

How much are you thinking would be appropriate?

-Philip


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-11 Thread Russell Senior
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:

Philip On 2/10/12 5:41 PM, Russell Senior wrote:
 Philip == Philip Prindeville
 philipp_s...@redfish-solutions.com writes:

Philip Sysupgrade currently doesn't allow updating software in place
Philip without clobbering the existing config (stored on the ext4
Philip overlay filesystem that immediately follows the jffs2
Philip filesystem).  I've spoken to various interested parties using
Philip x86 hardware, and we'd like to see if anyone is interested in
Philip doing bounty work to support sysupgrade on x86.
  What configuration gives you that?  I have built lots of squashfs
 images for alix2 and soekris 45xx and have yet to see an ext4, at
 least that I noticed.
 
 

Philip Or ext3, which ever.

Philip The point is that the overlay writable filesystem gets zapped
Philip when the image is updated.

The only overlay fs I've seen is jffs2.


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-11 Thread Russell Senior
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:

Philip On 2/10/12 5:41 PM, Russell Senior wrote:
 Philip == Philip Prindeville
 philipp_s...@redfish-solutions.com writes:

Philip Sysupgrade currently doesn't allow updating software in place
Philip without clobbering the existing config (stored on the ext4
Philip overlay filesystem that immediately follows the jffs2
Philip filesystem).  I've spoken to various interested parties using
Philip x86 hardware, and we'd like to see if anyone is interested in
Philip doing bounty work to support sysupgrade on x86.

Russell What configuration gives you that?  I have built lots of
Russell squashfs images for alix2 and soekris 45xx and have yet to
Russell see an ext4, at least that I noticed.

Philip Or ext3, which ever.

Philip The point is that the overlay writable filesystem gets zapped
Philip when the image is updated.

Have you looked at /sbin/sysupgrade and the stuff in /lib/upgrade/* ?

What kind of bounty are you talking about?


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-11 Thread Philip Prindeville
On 2/11/12 3:21 AM, Russell Senior wrote:
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:
 
 Philip On 2/10/12 5:41 PM, Russell Senior wrote:
 Philip == Philip Prindeville
 philipp_s...@redfish-solutions.com writes:

 Philip Sysupgrade currently doesn't allow updating software in place
 Philip without clobbering the existing config (stored on the ext4
 Philip overlay filesystem that immediately follows the jffs2
 Philip filesystem).  I've spoken to various interested parties using
 Philip x86 hardware, and we'd like to see if anyone is interested in
 Philip doing bounty work to support sysupgrade on x86.
 
 Russell What configuration gives you that?  I have built lots of
 Russell squashfs images for alix2 and soekris 45xx and have yet to
 Russell see an ext4, at least that I noticed.
 
 Philip Or ext3, which ever.
 
 Philip The point is that the overlay writable filesystem gets zapped
 Philip when the image is updated.
 
 Have you looked at /sbin/sysupgrade and the stuff in /lib/upgrade/* ?
 
 What kind of bounty are you talking about?

Not sure. I'd need to know the extent of the work involved before I could say.

Last time I tried sysupgrade on an alix it panicked the system and corrupted my 
overlay filesystem.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-10 Thread Jonathan Bither
I have a couple alix's in the office I can play with to try to help.

On 02/10/2012 06:11 PM, Philip Prindeville wrote:
 Sysupgrade currently doesn't allow updating software in place without 
 clobbering the existing config (stored on the ext4 overlay filesystem that 
 immediately follows the jffs2 filesystem).
 
 I've spoken to various interested parties using x86 hardware, and we'd like 
 to see if anyone is interested in doing bounty work to support sysupgrade on 
 x86.
 
 Thanks,
 
 -Philip
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-10 Thread Russell Senior
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:

Philip Sysupgrade currently doesn't allow updating software in place
Philip without clobbering the existing config (stored on the ext4
Philip overlay filesystem that immediately follows the jffs2
Philip filesystem).  I've spoken to various interested parties using
Philip x86 hardware, and we'd like to see if anyone is interested in
Philip doing bounty work to support sysupgrade on x86.

What configuration gives you that?  I have built lots of squashfs
images for alix2 and soekris 45xx and have yet to see an ext4, at
least that I noticed.


-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Sysupgrade x86 bounty

2012-02-10 Thread Philip Prindeville
On 2/10/12 5:41 PM, Russell Senior wrote:
 Philip == Philip Prindeville philipp_s...@redfish-solutions.com 
 writes:
 
 Philip Sysupgrade currently doesn't allow updating software in place
 Philip without clobbering the existing config (stored on the ext4
 Philip overlay filesystem that immediately follows the jffs2
 Philip filesystem).  I've spoken to various interested parties using
 Philip x86 hardware, and we'd like to see if anyone is interested in
 Philip doing bounty work to support sysupgrade on x86.
 
 What configuration gives you that?  I have built lots of squashfs
 images for alix2 and soekris 45xx and have yet to see an ext4, at
 least that I noticed.
 
 

Or ext3, which ever.

The point is that the overlay writable filesystem gets zapped when the image is 
updated.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel