Modify

Opened 9 years ago

Closed 5 years ago

Last modified 4 years ago

#4238 closed defect (fixed)

Sysupgrade generates broken fs

Reported by: hamvil Owned by: acinonyx
Priority: highest Milestone: Barrier Breaker 14.07
Component: base system Version: Kamikaze trunk
Keywords: sysupgrade broken fs Cc:

Description

it looks like the sysupgrade command works only if i do not ask to save the conf files (-n option). Otherwise after rebooting i get the following error:

List of all partitions:
0300 990864 hda driver: ide-disk

0301 4504 hda1
0302 49360 hda2

No filesystem could mount root, tried: ext2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2)

It seems that the problem is with this line:

mtd jffs2write "$CONF_TAR" rootfs

where CONF_TAR is /tmp/conffiles.tgz

I'm calling sysupgrade with the url of the new image.

sysupgrade http://x.x.x.x/openwrt-x86-ext2.image

Attachments (1)

x86_ext2_sysupgrade_norestore.patch (898 bytes) - added by hugelshofer2006@… 9 years ago.
do not restore config if currently ext2 is being used

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by Acinonyx <acinonyxs@…>

It seems that sysupgrade treats ext2 the same as jffs2 when writing the config tar.

I've made some modifications to sysupgrade: After dumping the image, it attmepts to re-mount /dev/root partition and copy sysupgrade.tgz there. But I have run into a problem. Something is accessing the old root after pivot and cannot read-write mount the upgraded partition.

comment:2 Changed 9 years ago by hugelshofer2006@…

I can confirm this behaviour. Using sysupgrade with ext2 results in a corrupted filesystem.

I added a patch which prevents the corruption by omiting the restoration of the config files. By default it warns and aborts the upgrade if "-n" is not specified.

This is not the final solution, but at least protects users from unexptected data loss and non-booting devices.

#3321 is related, as it discusses how an upgrade on ext2 could be implemented (see final paragraph).

Changed 9 years ago by hugelshofer2006@…

do not restore config if currently ext2 is being used

comment:3 Changed 9 years ago by hugelshofer2006@…

Took a while until uploads worked again after the migration to the new system. In the mean time I created a patch which solves the problem by storing the configuration in /dev/hda1 and restoring it from preinit.arch (see #3321). The latter is probably favourable over the patch here which simply prevents ending up with a corrupted system.

comment:4 Changed 8 years ago by thepeople

  • Owner changed from developers to nbd
  • Status changed from new to assigned
  • Version set to Kamikaze trunk

comment:5 Changed 5 years ago by florian

  • Owner changed from nbd to acinonyx

comment:6 Changed 5 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with r32465

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.