Index: /branches/releng-9.0/nanobsd/tools/image
===================================================================
--- /branches/releng-9.0/nanobsd/tools/image	(revision 10962)
+++ /branches/releng-9.0/nanobsd/tools/image	(revision 10982)
@@ -45,9 +45,17 @@
   sleep $prompt_timeout
 
+  # Details and alive checkings
   ssh $host mount || exit 1
+  P=`ssh $HOST df / | grep '1a ' && echo "p2" || echo "p1"` || exit 1
+  echo "# Updating partition $P"
+
+  cat $img | ssh $host sh -x /tools/update$P || exit 1
+
   # Hack to make sure we update the fstab the right way when converting from
   # 8.X-RELEASE to 9.X-RELEASE. ad0 naming changed to ada0.
-  ssh $HOST 'echo NANO_DRIVE=ada0 > /etc/nanobsd.conf' || exit 1
-  cat $img | ssh $host /tools/update || exit 1
+  if [ "$P" = "p2" ]; then
+    ssh $HOST sed -i "" "s/ada0s1/ada0s2/" /mnt/conf/base/etc/fstab /mnt/etc/fstab || exit 1
+  fi
+
   if $do_reboot; then
     ssh $host reboot
