Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12273 closed defect (no_response)

Sysupgrade Fails

Reported by: wink15987@… Owned by: developers
Priority: response-needed Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Trying to do a sysupgrade on a new build works OK for the first few times. Then it stops working entirely with the error

"/sbin/sysupgrade: exec: line 175: /bin/busybox: not found"

I modified /lib/upgrade/common.sh to echo out info..

pivot() { # <new_root> <old_root>
echo "2a"
echo "nr= $1"
ls -la $1
ls -la $1/*
        mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
        mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \
        mount -o move /proc $1/proc && \

echo "2b"
echo "or= $2"
ls -la $2
ls -la $2/*
        pivot_root $1 $1$2 || {
        umount $1 $1
                return 1
        }
echo "2c"
ls -la /*

echo "2d"
        mount -o move $2/sys /sys
echo "2e"
        mount -o move $2/dev /dev
        mount -o move $2/tmp /tmp
        mount -o move $2/overlay /overlay 2>&-
        return 0
}

Which produces the following information.

2a
nr= /tmp/root
drwxr-xr-x    7 root     root           140 Jan  1 00:01 .
drwxrwxrwt   11 root     root           400 Jan  1 00:01 ..
drwxr-xr-x    2 root     root           360 Jan  1 00:01 bin
drwxr-xr-x    2 root     root            60 Jan  1 00:01 etc
drwxr-xr-x    3 root     root           160 Jan  1 00:01 lib
drwxr-xr-x    2 root     root           100 Jan  1 00:01 sbin
drwxr-xr-x    3 root     root            60 Jan  1 00:01 usr
/tmp/root/bin:
drwxr-xr-x    2 root     root           360 Jan  1 00:01 .
drwxr-xr-x    7 root     root           140 Jan  1 00:01 ..
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 ash -> /bin/busybox
-rwxr-xr-x    1 root     root        412712 Jan  1 00:01 busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 cat -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 cp -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 dd -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 grep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 ls -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 mount -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 mv -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 sh -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 sleep -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 sync -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 tar -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 umount -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 vi -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 zcat -> /bin/busybox

/tmp/root/etc:
drwxr-xr-x    2 root     root            60 Jan  1 00:01 .
drwxr-xr-x    7 root     root           140 Jan  1 00:01 ..
-rw-r--r--    1 root     root            35 Jan  1 00:01 resolv.conf

/tmp/root/lib:
drwxr-xr-x    3 root     root           160 Jan  1 00:01 .
drwxr-xr-x    7 root     root           140 Jan  1 00:01 ..
-rwxr-xr-x    1 root     root          7065 Jan  1 00:01 functions.sh
-rwxr-xr-x    1 root     root       1257604 Jan  1 00:01 libc.so.6
-rwxr-xr-x    1 root     root         30192 Jan  1 00:01 libcrypt.so.1
-rw-r--r--    1 root     root         91880 Jan  1 00:01 libgcc_s.so.1
-rwxr-xr-x    1 root     root        153072 Jan  1 00:01 libm.so.6
drwxr-xr-x    2 root     root            80 Jan  1 00:01 upgrade

/tmp/root/sbin:
drwxr-xr-x    2 root     root           100 Jan  1 00:01 .
drwxr-xr-x    7 root     root           140 Jan  1 00:01 ..
-rwxr-xr-x    1 root     root         15832 Jan  1 00:01 mtd
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 pivot_root -> /bin/busybox
lrwxrwxrwx    1 root     root            12 Jan  1 00:01 reboot -> /bin/busybox

/tmp/root/usr:
drwxr-xr-x    3 root     root            60 Jan  1 00:01 .
drwxr-xr-x    7 root     root           140 Jan  1 00:01 ..
drwxr-xr-x    2 root     root           200 Jan  1 00:01 bin
2b
or= /mnt
drwxr-xr-x    2 root     root             3 Oct  5  2012 .
drwxr-xr-x    1 root     root             0 Jan  1  1970 ..
ls: /mnt/*: No such file or directory
2c
/sbin/sysupgrade: line 175: ls: not found
2d
/sbin/sysupgrade: line 175: busybox: not found
2e
/sbin/sysupgrade: line 175: busybox: not found
/sbin/sysupgrade: line 175: busybox: not found
/sbin/sysupgrade: line 175: busybox: not found
/sbin/sysupgrade: line 175: umount: not found
/sbin/sysupgrade: line 175: grep: not found
/sbin/sysupgrade: exec: line 175: /bin/busybox: not found

Attachments (0)

Change History (14)

comment:1 Changed 5 years ago by anonymous

Looks like all the files are not being listed/copied over.

Anyone? I have posted about this several times in various places.

comment:2 follow-up: Changed 5 years ago by florian

You did not give any background on your type of system: OpenWrt revision, hardware platform, local modifications if any...

comment:3 follow-up: Changed 5 years ago by jow

  • Priority changed from highest to response-needed

comment:4 Changed 5 years ago by anonymous

trunk release, hw is ALIX from PCENGINES, only local modifications are php files added.

new info...upon initial boot up you get...

####### BOOT #########
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
none on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
root on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/tmp/root)
####### BOOT #########

Then provided you get lucky you should get the "GOOD" list below after the file checks.

####### GOOD #########
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
none on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
root on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on /tmp/root type overlayfs (ro,noatime,lowerdir=/,upperdir=/tmp/root)
/dev/mtdblock1 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
####### GOOD #########

But upon reboot, or sometimes after a little bit of time, the list looks like "BAD". At this point, sysupgrade will fail everytime.

###### BAD ########
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
none on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock1 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
###### BAD ########

comment:5 in reply to: ↑ 2 Changed 5 years ago by anonymous

Replying to florian:

You did not give any background on your type of system: OpenWrt revision, hardware platform, local modifications if any...

Looks like something is up with the mount points. The addition of a few packages such as uhttpd and php have all been done via menuconfig.

comment:6 Changed 5 years ago by anonymous

Just to confirm how to reproduce it. I tried different revisions of trunk, but the original problem reported was from r32706.

Flash CF, boot up. After the first boot is completed you end up with the "GOOD" mount points as listed above. If you do a sysupgrade -v <file> it goes without a problem.

If you reboot, then you end up with the "BAD" mount points, and it will always error out with the originally reported problem.

As long as its the first boot, AND you see the "GOOD" mount points, you can sysupgrade. If you reboot at all, you see the "BAD" mount points, and it will always fail.

comment:7 in reply to: ↑ 3 Changed 5 years ago by anonymous

Replying to jow:

Can I get the status changed? Responses given.

comment:8 Changed 5 years ago by anonymous

Created a workaround...

After first boot and a reboot, if I want to sysupgrade I create /tmp/root and then run "/etc/init.d/done boot" which then allows sysupgrade each time.

comment:9 follow-up: Changed 5 years ago by anonymous

can you make a "ldd busybox" and paste the result here

comment:10 follow-up: Changed 5 years ago by anonymous

(i don't see any ld* in your /lib)

comment:11 in reply to: ↑ 10 Changed 5 years ago by anonymous

Replying to anonymous:

(i don't see any ld* in your /lib)

yup, without the workaround, its not there. with the workaround, its there.

comment:12 in reply to: ↑ 9 Changed 5 years ago by anonymous

Replying to anonymous:

can you make a "ldd busybox" and paste the result here

next time i look at it. for now the workaround is functioning and its been months.

comment:13 Changed 5 years ago by nbd

  • Resolution set to no_response
  • Status changed from new to closed

comment:14 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.