diff --git a/plugins/ipod/Makefile.am b/plugins/ipod/Makefile.am
index c391390..5f10b58 100644
--- a/plugins/ipod/Makefile.am
+++ b/plugins/ipod/Makefile.am
@@ -46,7 +46,10 @@ uixml_DATA = ipod-ui.xml
 
 plugin_DATA = $(plugin_in_files:.rb-plugin.in=.rb-plugin)
 
-EXTRA_DIST = $(uixml_DATA) $(plugin_in_files)
+gladedir = $(plugindir)
+glade_DATA = ipod_init.glade
+
+EXTRA_DIST = $(uixml_DATA) $(plugin_in_files) $(glade_DATA)
 
 CLEANFILES = $(plugin_DATA)
 DISTCLEANFILES = $(plugin_DATA)
diff --git a/plugins/ipod/ipod_init.glade b/plugins/ipod/ipod_init.glade
new file mode 100644
index 0000000..4c79956
--- /dev/null
+++ b/plugins/ipod/ipod_init.glade
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
+<glade-interface>
+  <widget class="GtkDialog" id="ipod_init">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">iPod detected</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="border_width">12</property>
+            <property name="n_rows">4</property>
+            <property name="n_columns">2</property>
+            <property name="column_spacing">12</property>
+            <property name="row_spacing">12</property>
+            <child>
+              <widget class="GtkComboBox" id="model_combo">
+                <property name="visible">True</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="text">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Rhythmbox has detected a device that is probably an uninitialised or corrupted iPod. It must be initialised before Rhythmbox can use it, but this will destroy any song metadata already present. If you wish Rhythmbox to initialise the iPod, please fill in the information below. If the device is not an iPod, or you do not wish to initialise it, please click cancel.</property>
+                <property name="wrap">True</property>
+                <property name="selectable">True</property>
+              </widget>
+              <packing>
+                <property name="right_attach">2</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="device_info">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="xalign">0</property>
+                <property name="label">...</property>
+                <property name="selectable">True</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="name_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Device:</property>
+              </widget>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Model:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">model_combo</property>
+              </widget>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">_Name:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">name_entry</property>
+              </widget>
+              <packing>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options"></property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="initialise_button">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label" translatable="yes">_Initialise</property>
+                <property name="use_underline">True</property>
+                <property name="response_id">-3</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/plugins/ipod/rb-ipod-plugin.c b/plugins/ipod/rb-ipod-plugin.c
index 29e2536..9d25fe4 100644
--- a/plugins/ipod/rb-ipod-plugin.c
+++ b/plugins/ipod/rb-ipod-plugin.c
@@ -225,9 +225,9 @@ rb_ipod_plugin_source_deleted (RBiPodSource *source, RBIpodPlugin *plugin)
 static RBSource *
 create_source_cb (RBRemovableMediaManager *rmm, GnomeVFSVolume *volume, RBIpodPlugin *plugin)
 {
-	if (rb_ipod_is_volume_ipod (volume)) {
+	if (rb_ipod_is_volume_ipod (volume, RB_PLUGIN (plugin))) {
 		RBSource *src;
-		src = RB_SOURCE (rb_ipod_source_new (plugin->shell, volume));
+		src = RB_SOURCE (rb_ipod_source_new (plugin->shell, RB_PLUGIN (plugin), volume));
 
 		plugin->ipod_sources = g_list_prepend (plugin->ipod_sources, src);
 		g_signal_connect_object (G_OBJECT (src),
diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c
index 259076b..71d9a25 100644
--- a/plugins/ipod/rb-ipod-source.c
+++ b/plugins/ipod/rb-ipod-source.c
@@ -54,6 +54,8 @@
 #include "rb-ipod-static-playlist-source.h"
 #include "rb-util.h"
 #include "rhythmdb.h"
+#include "rb-dialog.h"
+#include "rb-glade-helpers.h"
 #include "rb-cut-and-paste-code.h"
 
 #define CONF_STATE_PANED_POSITION CONF_PREFIX "/state/ipod/paned_position"
@@ -270,6 +272,7 @@ rb_ipod_source_dispose (GObject *object)
 
 RBRemovableMediaSource *
 rb_ipod_source_new (RBShell *shell,
+		    RBPlugin *plugin,
 		    GnomeVFSVolume *volume)
 {
 	RBiPodSource *source;
@@ -278,7 +281,7 @@ rb_ipod_source_new (RBShell *shell,
 	char *name;
 	char *path;
 
-	g_assert (rb_ipod_is_volume_ipod (volume));
+	g_assert (rb_ipod_is_volume_ipod (volume, plugin));
 
 	g_object_get (shell, "db", &db, NULL);
 	path = gnome_vfs_volume_get_device_path (volume);
@@ -980,7 +983,7 @@ rb_ipod_get_itunesdb_path (GnomeVFSVolume *volume)
 		return NULL;
 	}
 
-	result = itdb_get_itunes_dir(mount_point);
+	result = itdb_get_itunesdb_path(mount_point);
 
 	g_free (mount_point);
 	return result;
@@ -1004,30 +1007,261 @@ rb_ipod_volume_has_ipod_db (GnomeVFSVolume *volume)
 	return result;
 }
 
+enum {
+	COL_INFO = 0,
+};
+
+static gchar *ipod_info_to_string (const Itdb_IpodInfo *info)
+{
+    if (info->capacity >= 1) {   /* size in GB */
+        return g_strdup_printf ("%2.0f GB %s", info->capacity,
+                itdb_info_get_ipod_model_name_string (info->ipod_model));
+    } else if (info->capacity > 0) {   /* size in MB */
+        return g_strdup_printf ("%3.0f MB %s", info->capacity * 1024,
+                itdb_info_get_ipod_model_name_string (info->ipod_model));
+    } else {   /* no capacity information available */
+        return g_strdup_printf ("%s",
+                itdb_info_get_ipod_model_name_string (info->ipod_model));
+    }
+}
+
+static void
+set_cell (GtkCellLayout   *cell_layout,
+	  GtkCellRenderer *cell,
+	  GtkTreeModel    *tree_model,
+	  GtkTreeIter     *iter,
+	  gpointer         data)
+{
+	gboolean header;
+	gchar *text;
+	Itdb_IpodInfo *info;
+
+	gtk_tree_model_get (tree_model, iter, COL_INFO, &info, -1);
+	g_return_if_fail (info);
+
+	header = gtk_tree_model_iter_has_child (tree_model, iter);
+
+	if (header) {
+		text = g_strdup (
+			itdb_info_get_ipod_generation_string (info->ipod_generation));
+	} else {
+		text = ipod_info_to_string (info);
+	}
+
+	g_object_set (cell,
+		"sensitive", !header,
+		"text", text,
+		NULL);
+	g_free (text);
+}
+
+static gboolean
+model_equals (gconstpointer a, gconstpointer b)
+{
+	const Itdb_IpodInfo *lhs = (const Itdb_IpodInfo *)a;
+	const Itdb_IpodInfo *rhs = (const Itdb_IpodInfo *)b;
+
+	return ((lhs->capacity == rhs->capacity) 
+	    	  && (lhs->ipod_model == rhs->ipod_model) 
+		  && (lhs->ipod_generation == rhs->ipod_generation));
+}
+
+static guint
+model_hash (gconstpointer item)
+{
+	const Itdb_IpodInfo *info = (Itdb_IpodInfo *)item;
+	guint to_hash;
+	to_hash = info->ipod_model*65536 + info->ipod_generation*1024 + info->capacity;
+	return g_int_hash (&to_hash);
+}
+
+static void
+_setup_model_combo (GtkWidget *combo, const char *mount_path)
+{
+	const Itdb_IpodInfo *table;
+	const Itdb_IpodInfo *ipod_info;
+	Itdb_IpodGeneration generation;
+	Itdb_Device *device;
+	GtkTreeStore *store;
+	GtkCellRenderer *renderer;
+	GtkTreeIter *ipod_iter;
+	gboolean info_found;
+	GHashTable *added_models;
+
+	table = itdb_info_get_ipod_info_table ();
+	device = itdb_device_new ();
+	itdb_device_set_mountpoint (device, mount_path);
+	itdb_device_read_sysinfo (device);
+	ipod_info = itdb_device_get_ipod_info (device);
+	ipod_iter = NULL;
+
+	added_models = g_hash_table_new (model_hash, model_equals);
+	store = gtk_tree_store_new (1, G_TYPE_POINTER);
+	info_found = TRUE;
+	for (generation = ITDB_IPOD_GENERATION_FIRST; info_found; generation++) {
+		GtkTreeIter iter;
+		const Itdb_IpodInfo *model_info;
+
+		info_found = FALSE;
+		for (model_info = table; model_info->model_number; model_info++) {
+			if (model_info->ipod_generation == generation) {
+				GtkTreeIter iter_child;
+				char *model_name;
+
+				if (g_hash_table_lookup_extended (added_models,
+							          model_info,
+								  NULL, NULL)) {
+					/* We already have a model with a
+					 * the same user-visible name 
+					 */
+					continue;
+				}
+				if (!info_found) {
+					gtk_tree_store_append (store, &iter, NULL);
+					gtk_tree_store_set (store, &iter,
+							    COL_INFO, model_info,
+							    -1);
+					info_found = TRUE;
+				}
+				gtk_tree_store_append (store, &iter_child, &iter);
+				model_name = ipod_info_to_string (model_info);;
+				gtk_tree_store_set (store, &iter_child,
+						    COL_INFO, model_info,
+						    -1);
+				g_hash_table_insert (added_models,
+						     (gpointer)model_info,
+						     NULL);
+				if (model_info == ipod_info) {
+					rb_debug ("found matching iPod model: %s", model_name);
+					ipod_iter = gtk_tree_iter_copy (&iter_child);
+				}
+
+				g_free (model_name);
+			}
+		}
+	}
+	g_hash_table_destroy (added_models);
+	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (store));
+	g_object_unref (store);
+	gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo));
+
+	renderer = gtk_cell_renderer_text_new ();
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
+	gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
+					    renderer,
+					    set_cell,
+					    NULL, NULL);
+
+	if (ipod_iter) {
+		gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), ipod_iter);
+		gtk_tree_iter_free (ipod_iter);
+	} else {
+		/* the ipod wasn't found */
+	}
+
+	itdb_device_free (device);
+}
+
+static gboolean
+show_ipod_first_time_dialog (GnomeVFSVolume *volume, RBPlugin *plugin)
+{
+	/* could be an uninitialised iPod, ask the user */
+	GladeXML *xml;
+	GtkWidget *dialog;
+	GtkWidget *widget;
+	GtkWidget *device;
+	GtkTreeModel *tree_model;
+	GtkTreeIter iter;
+	int response;
+	char *uri;
+	char *glade_file;
+	char *mountpoint;
+	const Itdb_IpodInfo *info;
+	char *ipod_name;
+	GError *error = NULL;
+
+	uri = gnome_vfs_volume_get_activation_uri (volume);
+	mountpoint = g_filename_from_uri (uri, NULL, NULL);
+	g_free (uri);
+	if (mountpoint == NULL)
+		return FALSE;
+
+	/* create message dialog with model-number combo box
+	 * and asking whether they want to initialise the iPod
+	 */
+	glade_file = rb_plugin_find_file (plugin, "ipod_init.glade");
+	xml = glade_xml_new (glade_file, NULL, NULL);
+	g_free (glade_file);
+	dialog = glade_xml_get_widget (xml, "ipod_init");
+	widget = glade_xml_get_widget (xml, "model_combo");
+	_setup_model_combo (widget, mountpoint);
+
+	device = glade_xml_get_widget (xml, "device_info");
+	uri = gnome_vfs_volume_get_device_path (volume);
+	gtk_label_set_text (GTK_LABEL (device), uri);
+	g_free (uri);
+
+	response = gtk_dialog_run (GTK_DIALOG (dialog));
+	if (response != GTK_RESPONSE_ACCEPT) {
+		gtk_widget_destroy (dialog);
+		g_free (mountpoint);
+		return FALSE;
+	}
+
+	/* get model number and name */
+	tree_model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+	gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+	gtk_tree_model_get (tree_model, &iter, COL_INFO, &info, -1);
+	widget = glade_xml_get_widget (xml, "name_entry");
+	ipod_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));
+
+	gtk_widget_destroy (dialog);
+
+	rb_debug ("attempting to init ipod on '%s', with model '%s' and name '%s'",
+	  	  mountpoint, info->model_number, ipod_name);
+	if (!itdb_init_ipod (mountpoint, info->model_number, ipod_name, &error)) {
+		rb_error_dialog (NULL, _("Unable to initialise new iPod"), "%s", error->message);
+
+		g_free (mountpoint);
+		g_free (ipod_name);
+		g_error_free (error);
+		return FALSE;
+	}
+
+	g_free (mountpoint);
+	g_free (ipod_name);
+
+	return TRUE;
+}
+
 gboolean
-rb_ipod_is_volume_ipod (GnomeVFSVolume *volume)
+rb_ipod_is_volume_ipod (GnomeVFSVolume *volume, RBPlugin *plugin)
 {
 #ifdef HAVE_HAL
 	gchar *udi;
+	gboolean result;
 #endif
-	if (gnome_vfs_volume_get_volume_type (volume) != GNOME_VFS_VOLUME_TYPE_MOUNTPOINT) {
+	if (gnome_vfs_volume_get_volume_type (volume) != GNOME_VFS_VOLUME_TYPE_MOUNTPOINT)
 		return FALSE;
-	}
 
 #ifdef HAVE_HAL
 	udi = gnome_vfs_volume_get_hal_udi (volume);
-	if (udi != NULL) {
-		gboolean result;
+	if (udi == NULL)
+		return FALSE;
+
+	result = hal_udi_is_ipod (udi);
+	g_free (udi);
+	if (result == FALSE)
+		return FALSE;
 
-		result = hal_udi_is_ipod (udi);
-		g_free (udi);
-		if (result == FALSE) {
+#endif
+	if (!rb_ipod_volume_has_ipod_db (volume)) {
+		if (!show_ipod_first_time_dialog (volume, plugin)) {
 			return FALSE;
 		}
 	}
-#endif
 
-	return rb_ipod_volume_has_ipod_db (volume);
+	return TRUE;
 }
 
 #ifdef HAVE_HAL
diff --git a/plugins/ipod/rb-ipod-source.h b/plugins/ipod/rb-ipod-source.h
index d8bbe9f..7a729fc 100644
--- a/plugins/ipod/rb-ipod-source.h
+++ b/plugins/ipod/rb-ipod-source.h
@@ -34,6 +34,7 @@
 
 #include "rb-shell.h"
 #include "rb-removable-media-source.h"
+#include "rb-plugin.h"
 #include "rhythmdb.h"
 
 G_BEGIN_DECLS
@@ -55,11 +56,14 @@ typedef struct
 	RBRemovableMediaSourceClass parent;
 } RBiPodSourceClass;
 
-RBRemovableMediaSource *	rb_ipod_source_new		(RBShell *shell, GnomeVFSVolume *volume);
+RBRemovableMediaSource * rb_ipod_source_new		(RBShell *shell,
+							 RBPlugin *plugin,
+							 GnomeVFSVolume *volume);
 GType			rb_ipod_source_get_type		(void);
 GType                   rb_ipod_source_register_type    (GTypeModule *module);
 
-gboolean		rb_ipod_is_volume_ipod		(GnomeVFSVolume *volume);
+gboolean		rb_ipod_is_volume_ipod		(GnomeVFSVolume *volume,
+							 RBPlugin *plugin);
 
 void			rb_ipod_source_new_playlist	(RBiPodSource *source);
 void			rb_ipod_source_remove_playlist	(RBiPodSource *ipod_source,
