--- fdisk.c.~1~	Sat Oct  6 16:02:21 2001
+++ fdisk.c	Wed Jan  9 17:05:22 2002
@@ -698,6 +698,29 @@
 }
 
 static void
+set_unique_mbr_signature(void)
+{
+	unsigned int signature;
+	int rc;
+	struct timeval tv;
+
+	memset(&tv, 0, sizeof(tv));
+	rc = gettimeofday(&tv, NULL);
+	if (rc == -1) {
+		perror("gettimeofday");
+		return;
+	}
+		
+	/* Write the time stamp to the disk.
+	   This is likely to be unique per disk per system */
+	signature =  tv.tv_usec;
+	store4_little_endian(&MBRbuffer[440], signature);
+	return;
+}
+
+
+
+static void
 create_doslabel(void) {
 	int i;
 
@@ -710,6 +734,8 @@
 	sgi_nolabel();  /* otherwise always recognised as sgi */
 	aix_label = osf_label = 0;
 	partitions = 4;
+	
+	set_unique_mbr_signature();
 
 	for (i = 510-64; i < 510; i++)
 		MBRbuffer[i] = 0;
@@ -1923,8 +1949,14 @@
 static void
 write_table(void) {
 	int i;
+	unsigned int signature;
 
 	if (dos_label) {
+		signature = read4_little_endian(&MBRbuffer[440]);
+		if (!signature) {
+			set_unique_mbr_signature();
+			set_changed(0);
+		}
 		for (i=0; i<3; i++)
 			if(ptes[i].changed)
 				ptes[3].changed = 1;
