diff --git a/flash.h b/flash.h
index b765555..17392ec 100644
--- a/flash.h
+++ b/flash.h
@@ -394,7 +394,7 @@
 int map_flash_registers(struct flashchip *flash);
 
 /* layout.c */
-int show_id(uint8_t *bios, int size);
+int show_id(uint8_t *bios, int size, int force);
 int read_romlayout(char *name);
 int find_romentry(char *name);
 int handle_romentries(uint8_t *buffer, uint8_t *content);
diff --git a/flashrom.c b/flashrom.c
index e97f196..438e843 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -43,7 +43,7 @@
 char *chip_to_probe = NULL;
 struct pci_access *pacc;	/* For board and chipset_enable */
 int exclude_start_page, exclude_end_page;
-int force = 0, verbose = 0;
+int verbose = 0;
 int fd_mem;
 
 struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device)
@@ -99,7 +99,7 @@
 	return 0;
 }
 
-struct flashchip *probe_flash(struct flashchip *flash)
+struct flashchip *probe_flash(struct flashchip *flash, int force)
 {
 	volatile uint8_t *bios;
 	unsigned long flash_baseaddr, size;
@@ -111,7 +111,7 @@
 		}
 		printf_debug("Probing for %s %s, %d KB: ",
 			     flash->vendor, flash->name, flash->total_size);
-		if (!flash->probe) {
+		if (!flash->probe && !force) {
 			printf_debug("failed! flashrom has no probe function for this flash chip.\n");
 			flash++;
 			continue;
@@ -150,7 +150,7 @@
 		}
 		flash->virtual_memory = bios;
 
-		if (flash->probe(flash) == 1) {
+		if (force || flash->probe(flash) == 1) {
 			printf("Found chip \"%s %s\" (%d KB) at physical address 0x%lx.\n",
 			       flash->vendor, flash->name, flash->total_size,
 			       flash_baseaddr);
@@ -251,6 +251,7 @@
 	struct flashchip *flash, *flashes[3];
 	int opt;
 	int option_index = 0;
+	int force = 0;
 	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0;
 	int ret = 0, i;
 #ifdef __FreeBSD__
@@ -413,7 +414,7 @@
 	board_flash_enable(lb_vendor, lb_part);
 
 	for (i = 0; i < ARRAY_SIZE(flashes); i++) {
-		flashes[i] = probe_flash(i ? flashes[i - 1] + 1 : flashchips);
+		flashes[i] = probe_flash(i ? flashes[i - 1] + 1 : flashchips, 0);
 		if (!flashes[i])
 			for (i++; i < ARRAY_SIZE(flashes); i++)
 				flashes[i] = NULL;
@@ -427,6 +428,44 @@
 		exit(1);
 	} else if (!flashes[0]) {
 		printf("No EEPROM/flash device found.\n");
+		if (!force || !chip_to_probe) {
+			printf("If you know which flash chip you have, and if this version of flashrom\n");
+			printf("supports a similar flash chip, you can try to force read your chip. Run:\n");
+			printf("flashrom -f -r -c similar_supported_flash_chip filename\n");
+			printf("\n");
+			printf("Note: flashrom can never write when the flash chip isn't found automatically.\n");
+		}
+		if (force && read_it && chip_to_probe) {
+			printf("Force read (-f -r -c) requested, forcing chip probe success:\n");
+			flashes[0] = probe_flash(flashchips, 1);
+			if (!flashes[0]) {
+				printf("flashrom does not support a flash chip named '%s'.\n", chip_to_probe);
+				printf("Run flashrom -L to view the hardware supported in this flashrom version.\n");
+				exit(1);
+			}
+			size = flashes[0]->total_size * 1024;
+			buf = (uint8_t *) calloc(size, sizeof(char));
+
+			if ((image = fopen(filename, "w")) == NULL) {
+				perror(filename);
+				exit(1);
+			}
+			printf("Force reading flash...");
+			if (!flashes[0]->read)
+				memcpy(buf, (const char *)flashes[0]->virtual_memory, size);
+			else
+				flashes[0]->read(flashes[0], buf);
+
+			if (exclude_end_position - exclude_start_position > 0)
+				memset(buf + exclude_start_position, 0,
+				       exclude_end_position - exclude_start_position);
+
+			fwrite(buf, sizeof(char), size, image);
+			fclose(image);
+			printf("done\n");
+			free(buf);
+			exit(0);
+		}
 		// FIXME: flash writes stay enabled!
 		exit(1);
 	}
@@ -522,7 +561,7 @@
 		}
 
 		fread(buf, sizeof(char), size, image);
-		show_id(buf, size);
+		show_id(buf, size, force);
 		fclose(image);
 	}
 
diff --git a/layout.c b/layout.c
index 46fcc43..a738fb2 100644
--- a/layout.c
+++ b/layout.c
@@ -28,8 +28,6 @@
 char *mainboard_part = NULL;
 int romimages = 0;
 
-extern int force;
-
 #define MAX_ROMLAYOUT	16
 
 typedef struct {
@@ -43,7 +41,7 @@
 
 static char *def_name = "DEFAULT";
 
-int show_id(uint8_t *bios, int size)
+int show_id(uint8_t *bios, int size, int force)
 {
 	unsigned int *walk;
 
