On Wed, Oct 29, 2003 at 09:06:54PM -0000, Russell Gower wrote:
I'm trying to use filo to boot from a cdrom which is on hdb, it looks to me
that using boot: hdb1 should do it but i'm getting Unsupported sector size
2352.
I found a solution to this in the SCSI CD-ROM driver of Linux.
It just treats weird sector sizes like this as 2048.
Linux IDE CD driver doesn't even see the sector size reported by the drive
and always uses 2048.
Russel, can you try this patch and see it helps?
--
Takeshi
Index: drivers/ide.c
===================================================================
RCS file: /home/ts1/cvsroot/filo/drivers/ide.c,v
retrieving revision 1.19
diff -u -r1.19 ide.c
--- drivers/ide.c 29 Oct 2003 08:19:48 -0000 1.19
+++ drivers/ide.c 30 Oct 2003 17:23:14 -0000
@@ -974,7 +974,20 @@
| (uint32_t) buf[6] << 8
| (uint32_t) buf[7] << 0;
debug("block_len=%u\n", block_len);
- if (block_len != IDE_SECTOR_SIZE && block_len != CDROM_SECTOR_SIZE) {
+
+ switch (block_len) {
+ case CDROM_SECTOR_SIZE:
+ case IDE_SECTOR_SIZE:
+ /* ok */
+ break;
+ case 0:
+ case 2340:
+ case 2352:
+ /* Some CD drives report weird sector sizes.
+ * These values are taken from linux/drivers/scsi/sr.c */
+ block_len = CDROM_SECTOR_SIZE;
+ break;
+ default:
printf("Unsupported sector size %u\n", block_len);
return -1;
}