OpenWrt Forum Archive

Topic: upgrade x86 image

The content of this topic has been archived on 22 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everybody,
I am using an alix board with the current trunk version of openwrt. If I remember correctly upgrading to a newer version should work with dd if=openwrt-image of=/dev/devicename (in my case /dev/sda). However the system says that there is not enough space on the medium, which is a 2gb CF disk! When I remove it from the board and flash it like this in my computer everything works perfectly .... So what am I doing wrong? Its is realy annoying to open the box everytime I want to flash a new version and remove the card ...

Anny ideas?

Thanks a lot in advance,

Thorsten

I usually gzip the image .ext2.image file on my pc, scp it over to /tmp on the running OpenWrt and issue the commands

zcat /tmp/blah.image.gz | dd of=/dev/sda; reboot

No idea where you got the error message from, at least it wasn't "dd" I think. Maybe you tried to upload the uncompressed image to /tmp and it was too big. Storing the image on the cf card you're trying to overwrite is also a bad idea wink

~ JoW

Hi,
so wat I did was just
cat openwrt-ext2.image | of=/dev/sda
This just took one second (the image file is 54mb large) so I think something goes wrong / nothing happens. After rebooting I recognized thet the firmware was not copied...
The second thing I did was
dd if=/mnt/sdb1/openwrt-ext2.image of=/dev/sda which took roughly 2 min, after a reeboot the router did not start ...
Flashing the same file from my mac to the CF card over a card reader works perfect (the system boots fine)???

I also tried sysupgrade:

root@OpenWrt:~# sysupgrade -v -i /tmp/openwrt-x86-110609.image
Keep config files over reflash (Y/n): y
Edit config file list (y/N): n
Saving config files...
etc/rc.local
etc/firewall.user
etc/dropbear/dropbear_dss_host_key
etc/dropbear/dropbear_rsa_host_key
etc/dropbear/
etc/dropbear/dropbear_rsa_host_key
etc/dropbear/dropbear_dss_host_key
etc/group
etc/passwd
etc/config/webif_access_control
etc/config/updatedd
etc/config/ucitrack
etc/config/secrets.tdb
etc/config/lucid
etc/config/luci_statistics
etc/config/luci_hosts
etc/config/luci_ethers
etc/config/luci
etc/config/hd-idle
etc/config/crontabs
etc/config/timezone
etc/config/httpd
etc/config/wireless
etc/config/dropbear
etc/config/dhcp
etc/config/cron
etc/config/firewall
etc/config/samba
etc/config/ushare
etc/config/ntpclient
etc/config/fstab
etc/config/qos
etc/config/network
etc/config/system
etc/config/webif
etc/config/
etc/config/webif
etc/config/system
etc/config/network
etc/config/qos
etc/config/fstab
etc/config/ntpclient
etc/config/ushare
etc/config/samba
etc/config/firewall
etc/config/cron
etc/config/dhcp
etc/config/dropbear
etc/config/wireless
etc/config/httpd
etc/config/timezone
etc/config/crontabs
etc/config/hd-idle
etc/config/luci
etc/config/luci_ethers
etc/config/luci_hosts
etc/config/luci_statistics
etc/config/lucid
etc/config/secrets.tdb
etc/config/ucitrack
etc/config/updatedd
etc/config/webif_access_control
Switching to ramdisk...
mount: mounting /dev/root on /mnt failed: Device or resource busy
Performing system upgrade...
cat: write error: No space left on device
Refreshing partitions
Refreshing mtd partition rootfs ... Could not open mtd device: rootfs
Could not open mtd device: rootfs
Could not open mtd device: rootfs
Can't open device for writing!
Upgrade completed
Reboot (Y/n): yConnection to 192.168.1.1 closed by remote host.
Connection to 192.168.1.1 closed.
MacBook:~ Thorsten$


So what am I doing wrong?

Here a the specs of my system:

root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/sdb1 on /mnt/sdb1 type ext2 (rw,relatime,errors=continue)
root@OpenWrt:~#

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                48377     13986     31934  30% /
tmpfs                   128296       216    128080   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sdb1            307666352 227808172  64229624  78% /mnt/sdb1
root@OpenWrt:~#

thx,

Thorsten

(Last edited by thorstenk on 9 Nov 2009, 00:00)

If you're quoting the command you issued correctly, then it won't work; you left off the dd:

cat /my.image | dd of=/dev/sda

Try

dd if=/uncompressed.image of=/dev/sda

Or you can get images for each partition, so

The discussion might have continued from here.