diff -Naurp grub.vanilla/ChangeLog grub/ChangeLog
--- grub.vanilla/ChangeLog	2005-03-15 17:54:24.000000000 +0100
+++ grub/ChangeLog	2005-03-16 22:56:04.917598152 +0100
@@ -1,3 +1,11 @@
+2005-03-16  Alban Crequy  <alban.crequy@apinc.org>
+
+	Fix a savedefault bug when /boot is on another partition than /.
+	* stage2/stage2.c: store the correct device & partition for the
+	/boot/grub/default file.
+	* stage2/builtins.c: use the correct device & partition for the
+	/boot/grub/default file.
+
 2005-03-15  Yoshinori K. Okuji  <okuji@enbug.org>
 
 	* stage2/fsys_fat.c (fat_mount): Ignore the 3rd bit of a media
diff -Naurp grub.vanilla/stage2/builtins.c grub/stage2/builtins.c
--- grub.vanilla/stage2/builtins.c	2005-03-16 21:15:59.000000000 +0100
+++ grub/stage2/builtins.c	2005-03-16 22:45:08.000000000 +0100
@@ -3079,7 +3079,7 @@ static struct builtin builtin_reboot =
 
 
 /* Print the root device information.  */
-static void
+void
 print_root_device (void)
 {
   if (saved_drive == NETWORK_DRIVE)
@@ -3112,6 +3112,38 @@ print_root_device (void)
   print_fsys_type ();
 }
 
+/* Print the current device information.  */
+void
+print_current_device (void)
+{
+  if (current_drive == NETWORK_DRIVE)
+    {
+      /* Network drive.  */
+      grub_printf (" (nd):");
+    }
+  else if (current_drive & 0x80)
+    {
+      /* Hard disk drive.  */
+      grub_printf (" (hd%d", current_drive - 0x80);
+      
+      if ((current_partition & 0xFF0000) != 0xFF0000)
+	grub_printf (",%d", current_partition >> 16);
+
+      if ((current_partition & 0x00FF00) != 0x00FF00)
+	grub_printf (",%c", ((current_partition >> 8) & 0xFF) + 'a');
+
+      grub_printf ("):");
+    }
+  else
+    {
+      /* Floppy disk drive.  */
+      grub_printf (" (fd%d):", current_drive);
+    }
+
+  /* Print the filesystem information.  */
+  print_fsys_type ();
+}
+
 static int
 real_root_func (char *arg, int attempt_mount)
 {
@@ -3289,8 +3321,16 @@ savedefault_func (char *arg, int flags)
     entryno = current_entryno;
 
   /* Open the default file.  */
-  saved_drive = boot_drive;
-  saved_partition = install_partition;
+  current_drive = saved_drive = savedefault_drive;
+  current_partition = saved_partition = savedefault_partition;
+
+  /* Debug */
+  grub_printf ("\nDefault file name: '%s'\n", default_file);
+  grub_printf (" will be open from ");
+  print_current_device();
+  grub_printf ("\n-- press a key ...\n");
+  getkey ();
+
   if (grub_open (default_file))
     {
       int len;
diff -Naurp grub.vanilla/stage2/shared.h grub/stage2/shared.h
--- grub.vanilla/stage2/shared.h	2005-03-16 22:04:57.000000000 +0100
+++ grub/stage2/shared.h	2005-03-16 22:45:11.000000000 +0100
@@ -632,6 +632,9 @@ extern int debug;
 extern unsigned long current_drive;
 extern unsigned long current_partition;
 
+extern unsigned long savedefault_drive;
+extern unsigned long savedefault_partition;
+
 extern int fsys_type;
 
 /* The information for a disk geometry. The CHS information is only for
@@ -863,6 +866,8 @@ struct builtin *find_command (char *comm
 void print_cmdline_message (int forever);
 void enter_cmdline (char *heap, int forever);
 int run_script (char *script, char *heap);
+void print_root_device (void);
+void print_current_device (void);
 #endif
 
 /* C library replacement functions with identical semantics. */
diff -Naurp grub.vanilla/stage2/stage2.c grub/stage2/stage2.c
--- grub.vanilla/stage2/stage2.c	2005-03-16 21:08:09.000000000 +0100
+++ grub/stage2/stage2.c	2005-03-16 22:45:10.000000000 +0100
@@ -886,6 +886,18 @@ cmain (void)
 	      char buf[10]; /* This is good enough.  */
 	      char *p = buf;
 	      int len;
+
+	      /* store savedefault partition location */
+	      savedefault_drive = current_drive;
+	      savedefault_partition = current_partition;
+
+	      /* Debug */
+	      grub_printf ("\nConfig file name: '%s'\n", config_file);
+	      grub_printf ("Default file name: '%s'\n", default_file);
+	      grub_printf (" will be open from ");
+	      print_current_device();
+	      grub_printf ("\n-- press a key ...\n");
+	      getkey ();
 	      
 	      len = grub_read (buf, sizeof (buf));
 	      if (len > 0)
