Hack-A-N900/Dump and Restore rootfs Image: Unterschied zwischen den Versionen
Hmw (Diskussion | Beiträge) (hinweis: ip an usb0 setzen) |
Hmw (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
Zeile 6: | Zeile 6: | ||
== Dump Image == | == Dump Image == | ||
Start usb recovery mode | Start usb recovery mode. After connecting your N900 to the PC, you might have to assign an IP address to your usb0 interface: | ||
<pre> | <pre> | ||
root@pc # ifconfig usb0 192.168.2.1 up | root@pc # ifconfig usb0 192.168.2.1 up | ||
</pre> | </pre> | ||
Log on to your n900 and make the rootfs read-only: | |||
<pre> | <pre> | ||
mount -o remount,ro / | mount -o remount,ro / |
Aktuelle Version vom 28. September 2012, 09:17 Uhr
With usb recovery mode just booting a very minimal system it is possible to detach (remount ro) the rootfs and grab an image. Most probably the easiest and safest way to backup your device. On the other hand this way you will consuming a lot of disk space when doing backups regulary. Anyway, before doing anything risky with your rootfs you should consider dumping an image like this.
Prerequisites
Dump Image
Start usb recovery mode. After connecting your N900 to the PC, you might have to assign an IP address to your usb0 interface:
root@pc # ifconfig usb0 192.168.2.1 up
Log on to your n900 and make the rootfs read-only:
mount -o remount,ro / # should fail touch somefile
Now dump the rootfs image. Keep in mind we are in recovery mode and the rootfs is read-only, so we dont have any storage available. We need to push it to a remote location.
# dump it to the pc with the hostname 'yourpc' via ssh dd if=/dev/mtd5 | ssh root@yourpc "cat > rootfs.img"
Restore Image
Start your n900 in flasher mode. Flash the image to your device:
./flasher-3.5 -r rootfs.img -f -R