On Wednesday 24 February 2010 09:58:05 Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Can you try the attached patch?
I think the patch is segfaulting because it always destroys the grub_disk_t structure when returning from the grub_raid_register function, even if that grub_disk_t has been successfully added to an array and will be used in the future. If I change the function so that it is not destroyed when successfully added, it all compiles and installs correctly, but then gives errors when booting with the USB drive attached, as before. I tried the function as follows: void grub_raid_register (grub_raid_t raid) { auto int hook (const char *name); int hook (const char *name) { grub_disk_t disk; struct grub_raid_array array; grub_dprintf ("raid", "Scanning for RAID devices on disk %s\n", name); disk = grub_disk_open (name); if (disk && (disk->total_sectors != GRUB_ULONG_MAX) && (! grub_raid_list->detect (disk, &array)) && (! insert_array (disk, &array, grub_raid_list->name))) return 0; /* This error usually means it's not raid, no need to display it. */ if (grub_errno != GRUB_ERR_OUT_OF_RANGE) grub_print_error (); grub_errno = GRUB_ERR_NONE; if (disk) grub_disk_close (disk); return 0; } raid->next = grub_raid_list; grub_raid_list = raid; grub_device_iterate (&hook); } When rebooting, it gave this output: GRUB loading. Welcome to GRUB! error: fd0 cannot get C/H/S values. error: fd0 cannot get C/H/S values. Entering rescue mode... grub rescue> I think that before, it only listed the error line once, if that helps. Tom
signature.asc
Description: This is a digitally signed message part.