Re: Big IDE HD unclipping and IBM drive
Yeah, get yourself one of those nifty add-in IDE controllers that CAN see drives greater than 32GB. S'What I did and it works fine. On Fri, 8 Dec 2000, Matan Ziv-Av wrote: > > Hi, > > > I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with > large disks. I use a jumper to clip it to 32GB size, so the bios can > boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, > and not the true size, and even trying to set the correct size with > WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, > Linux)? > > > -- Kelsey Hudson [EMAIL PROTECTED] Software Engineer Compendium Technologies, Inc (619) 725-0771 --- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive [solved]
On Sat, Dec 09, 2000 at 11:50:59AM +0200, Matan Ziv-Av wrote: > I use the attached program, which is a modification of setmax, Good! So we learned something again. I merged both versions of setmax.c and added text to the Large Disk HOWTO. See http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html#ss11.3 Comments are welcome. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive
On Fri, 8 Dec 2000, Matan Ziv-Av wrote: > Hi, > > I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with > large disks. I use a jumper to clip it to 32GB size, so the bios can > boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, > and not the true size, and even trying to set the correct size with > WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, > Linux)? I had the exact same problem. Jumper-clipping doesn't work, so the solution to this problem is applying the IDE patch to the kernel (www.linux-ide.org), and then use IBM's Disk Manager utilities to software-clip the drive (don't set the jumper). Software-clipping does exactly the same as hardware clipping, except that a jumper isn't involved, and the drive can be clipped back to full capacity. Each drive has a flash memory is once you do it you don't have to do it again. -- Dan Aloni [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive [solved]
OK, thanks to Andries Brouwer, who pointed me to IBM's dtla_spw.pdf, I solved the problem: The kernel (2.2.18-pre25 + ide.2.2.18-24.all.20001204.patch.bz2) already has support for unclipping. The problem is that the IBM drive does not work with the method used when clipped with the jumper. The solution is to use software clipping. IBM suggest to do that with their program that requires windows, 1.44 floppy drive and a BIOS that can boot with the drive. All three are unavailable for me. Instead, I use the attached program, which is a modification of setmax, to clip the drive. This requires only a working linux system where an extra IDE drive can be attached. I attached the drive to such a system, and ran ./ibmsetmax -m 66055248 (32GB). From then on, the drive is clipped, so award bios can boot with it, but it returns the correct value to READ_NATIVE_MAX, so the kernel unclipping procedure works. Thanks to Andries and Andre for their help, and I hope this helps others who want to use large disks with old bios. -- Matan Ziv-Av. [EMAIL PROTECTED] /* ibmsetmax.c - */ #include #include #include #include #ifndef HDIO_DRIVE_CMD_AEB #define HDIO_DRIVE_CMD_AEB 0x031e #endif #define INITIALIZE_DRIVE_PARAMETERS 0x91 #define READ_NATIVE_MAX_ADDRESS 0xf8 #define CHECK_POWER_MODE0xe5 #define SET_MAX 0xf9 #define LBA 0x40 #define VV 1 /* if set in sectorct then NOT volatile */ struct idecmdin { unsigned char cmd; unsigned char feature; unsigned char nsect; unsigned char sect, lcyl, hcyl; unsigned char select; }; struct idecmdout { unsigned char status; unsigned char error; unsigned char nsect; unsigned char sect, lcyl, hcyl; unsigned char select; }; unsigned int tolba(unsigned char *args) { return ((args[6] & 0xf) << 24) + (args[5] << 16) + (args[4] << 8) + args[3]; } void fromlba(unsigned char *args, unsigned int lba) { args[3] = (lba & 0xff); lba >>= 8; args[4] = (lba & 0xff); lba >>= 8; args[5] = (lba & 0xff); lba >>= 8; args[6] = (args[6] & 0xf0) | (lba & 0xf); } int get_identity(int fd) { unsigned char args[4+512] = {WIN_IDENTIFY,0,0,1,}; struct hd_driveid *id = (struct hd_driveid *)[4]; if (ioctl(fd, HDIO_DRIVE_CMD, )) { perror("HDIO_DRIVE_CMD"); fprintf(stderr, "WIN_IDENTIFY failed - trying WIN_PIDENTIFY\n"); args[0] = WIN_PIDENTIFY; if (ioctl(fd, HDIO_DRIVE_CMD, )) { perror("HDIO_DRIVE_CMD"); fprintf(stderr, "WIN_PIDENTIFY also failed - giving up\n"); exit(1); } } printf("lba capacity: %d sectors (%lld bytes)\n", id->lba_capacity, (long long) id->lba_capacity * 512); } /* * result: in LBA mode precisely what is expected * in CHS mode the correct H and S, and C mod 65536. */ unsigned int get_native_max(int fd, int slave) { unsigned char args[7]; int i, max; for (i=0; i<7; i++) args[i] = 0; args[0] = READ_NATIVE_MAX_ADDRESS; args[6] = (slave ? 0x10 : 0) | LBA; if (ioctl(fd, HDIO_DRIVE_CMD_AEB, )) { perror("HDIO_DRIVE_CMD_AEB failed READ_NATIVE_MAX_ADDRESS"); for (i=0; i<7; i++) printf("%d = 0x%x\n", args[i], args[i]); exit(1); } return tolba(args); } void set_max_address(int fd, int slave, int delta) { unsigned char args[7]; int i, nativemax; nativemax = get_native_max(fd, slave); printf("nativemax=%d (0x%x)\n", nativemax, nativemax); for (i=0; i<7; i++) args[i] = 0; args[0] = SET_MAX; args[1] = 0; args[2] = 1; /* non-volatile */ fromlba(args, delta-1); args[6] |= LBA; if (ioctl(fd, HDIO_DRIVE_CMD_AEB, )) { perror("HDIO_DRIVE_CMD_AEB failed SET_MAX"); for (i=0; i<7; i++) printf("%d = 0x%x\n", args[i], args[i]); exit(1); } } static char short_opts[] = "m:"; static const struct option long_opts[] = { { "max",required_argument, NULL, 'd' }, { NULL, 0, NULL, 0 } }; static char *usage_txt = "Call: ibmsetmax [-m D] DEVICE\n" "\n" "The call \"ibmsetmax -m D DEVICE\" will do a SET_MAX command\n" "to set the non-volatile maximum accessible sector number D sectors.\n" "\n" "The call \"setmax DEVICE\" will do a READ_NATIVE_MAX_ADDRESS\n" "command, and report the maximum accessible sector number.\n" "\n" "This is IDE-only. Probably DEVICE is /dev/hdx for some x.\n\n"; main(int argc, char **argv){ int fd, c; int
Re: Big IDE HD unclipping and IBM drive [solved]
OK, thanks to Andries Brouwer, who pointed me to IBM's dtla_spw.pdf, I solved the problem: The kernel (2.2.18-pre25 + ide.2.2.18-24.all.20001204.patch.bz2) already has support for unclipping. The problem is that the IBM drive does not work with the method used when clipped with the jumper. The solution is to use software clipping. IBM suggest to do that with their program that requires windows, 1.44 floppy drive and a BIOS that can boot with the drive. All three are unavailable for me. Instead, I use the attached program, which is a modification of setmax, to clip the drive. This requires only a working linux system where an extra IDE drive can be attached. I attached the drive to such a system, and ran ./ibmsetmax -m 66055248 (32GB). From then on, the drive is clipped, so award bios can boot with it, but it returns the correct value to READ_NATIVE_MAX, so the kernel unclipping procedure works. Thanks to Andries and Andre for their help, and I hope this helps others who want to use large disks with old bios. -- Matan Ziv-Av. [EMAIL PROTECTED] /* ibmsetmax.c - */ #include stdio.h #include fcntl.h #include getopt.h #include linux/hdreg.h #ifndef HDIO_DRIVE_CMD_AEB #define HDIO_DRIVE_CMD_AEB 0x031e #endif #define INITIALIZE_DRIVE_PARAMETERS 0x91 #define READ_NATIVE_MAX_ADDRESS 0xf8 #define CHECK_POWER_MODE0xe5 #define SET_MAX 0xf9 #define LBA 0x40 #define VV 1 /* if set in sectorct then NOT volatile */ struct idecmdin { unsigned char cmd; unsigned char feature; unsigned char nsect; unsigned char sect, lcyl, hcyl; unsigned char select; }; struct idecmdout { unsigned char status; unsigned char error; unsigned char nsect; unsigned char sect, lcyl, hcyl; unsigned char select; }; unsigned int tolba(unsigned char *args) { return ((args[6] 0xf) 24) + (args[5] 16) + (args[4] 8) + args[3]; } void fromlba(unsigned char *args, unsigned int lba) { args[3] = (lba 0xff); lba = 8; args[4] = (lba 0xff); lba = 8; args[5] = (lba 0xff); lba = 8; args[6] = (args[6] 0xf0) | (lba 0xf); } int get_identity(int fd) { unsigned char args[4+512] = {WIN_IDENTIFY,0,0,1,}; struct hd_driveid *id = (struct hd_driveid *)args[4]; if (ioctl(fd, HDIO_DRIVE_CMD, args)) { perror("HDIO_DRIVE_CMD"); fprintf(stderr, "WIN_IDENTIFY failed - trying WIN_PIDENTIFY\n"); args[0] = WIN_PIDENTIFY; if (ioctl(fd, HDIO_DRIVE_CMD, args)) { perror("HDIO_DRIVE_CMD"); fprintf(stderr, "WIN_PIDENTIFY also failed - giving up\n"); exit(1); } } printf("lba capacity: %d sectors (%lld bytes)\n", id-lba_capacity, (long long) id-lba_capacity * 512); } /* * result: in LBA mode precisely what is expected * in CHS mode the correct H and S, and C mod 65536. */ unsigned int get_native_max(int fd, int slave) { unsigned char args[7]; int i, max; for (i=0; i7; i++) args[i] = 0; args[0] = READ_NATIVE_MAX_ADDRESS; args[6] = (slave ? 0x10 : 0) | LBA; if (ioctl(fd, HDIO_DRIVE_CMD_AEB, args)) { perror("HDIO_DRIVE_CMD_AEB failed READ_NATIVE_MAX_ADDRESS"); for (i=0; i7; i++) printf("%d = 0x%x\n", args[i], args[i]); exit(1); } return tolba(args); } void set_max_address(int fd, int slave, int delta) { unsigned char args[7]; int i, nativemax; nativemax = get_native_max(fd, slave); printf("nativemax=%d (0x%x)\n", nativemax, nativemax); for (i=0; i7; i++) args[i] = 0; args[0] = SET_MAX; args[1] = 0; args[2] = 1; /* non-volatile */ fromlba(args, delta-1); args[6] |= LBA; if (ioctl(fd, HDIO_DRIVE_CMD_AEB, args)) { perror("HDIO_DRIVE_CMD_AEB failed SET_MAX"); for (i=0; i7; i++) printf("%d = 0x%x\n", args[i], args[i]); exit(1); } } static char short_opts[] = "m:"; static const struct option long_opts[] = { { "max",required_argument, NULL, 'd' }, { NULL, 0, NULL, 0 } }; static char *usage_txt = "Call: ibmsetmax [-m D] DEVICE\n" "\n" "The call \"ibmsetmax -m D DEVICE\" will do a SET_MAX command\n" "to set the non-volatile maximum accessible sector number D sectors.\n" "\n" "The call \"setmax DEVICE\" will do a READ_NATIVE_MAX_ADDRESS\n" "command, and report the maximum accessible sector number.\n" "\n" "This is IDE-only. Probably DEVICE is /dev/hdx for some x.\n\n"; main(int argc, char **argv){
Re: Big IDE HD unclipping and IBM drive
On Fri, 8 Dec 2000, Matan Ziv-Av wrote: Hi, I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with large disks. I use a jumper to clip it to 32GB size, so the bios can boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, and not the true size, and even trying to set the correct size with WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, Linux)? I had the exact same problem. Jumper-clipping doesn't work, so the solution to this problem is applying the IDE patch to the kernel (www.linux-ide.org), and then use IBM's Disk Manager utilities to software-clip the drive (don't set the jumper). Software-clipping does exactly the same as hardware clipping, except that a jumper isn't involved, and the drive can be clipped back to full capacity. Each drive has a flash memory is once you do it you don't have to do it again. -- Dan Aloni [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive [solved]
On Sat, Dec 09, 2000 at 11:50:59AM +0200, Matan Ziv-Av wrote: I use the attached program, which is a modification of setmax, Good! So we learned something again. I merged both versions of setmax.c and added text to the Large Disk HOWTO. See http://www.win.tue.nl/~aeb/linux/Large-Disk-11.html#ss11.3 Comments are welcome. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive
On Fri, Dec 08, 2000 at 11:24:56PM +0200, Matan Ziv-Av wrote: > I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with > large disks. I use a jumper to clip it to 32GB size, so the bios can > boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, > and not the true size, and even trying to set the correct size with > WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, > Linux)? Don't know where you found WIN_READ_NATIVE_MAX, or what program you tried in order to fiddle with these things. The ATA standard calls the command READ NATIVE MAX ADDRESS. So far I have seen success with READ_NATIVE_MAX_ADDRESS and SET_MAX_ADDRESS on Maxtor drives but do not offhand recall any reports on IBM DTLA drives. (Posted a few times a setmax.c utility that you can try.) You can also try to contact IBM support. Files like dtla_spw.pdf only mention that you can clip capacity using a jumper, but there is no hint that it would be possible to unclip using SET_MAX_ADDRESS. Be careful that you do not lock the disk. (The command only functions as a SET_MAX_ADDRESS when immediately preceded by a READ_NATIVE_MAX_ADDRESS.) Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive
On Fri, 8 Dec 2000, Matan Ziv-Av wrote: > > Hi, > > > I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with > large disks. I use a jumper to clip it to 32GB size, so the bios can > boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, > and not the true size, and even trying to set the correct size with > WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, > Linux)? Yep you have to use code/patches that are not in the standard kernel. Which kernel are you using? Andre Hedrick CTO Timpanogas Research Group EVP Linux Development, TRG Linux ATA Development - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Big IDE HD unclipping and IBM drive
Hi, I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with large disks. I use a jumper to clip it to 32GB size, so the bios can boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, and not the true size, and even trying to set the correct size with WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, Linux)? -- Matan Ziv-Av. [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive
On Fri, 8 Dec 2000, Matan Ziv-Av wrote: Hi, I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with large disks. I use a jumper to clip it to 32GB size, so the bios can boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, and not the true size, and even trying to set the correct size with WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, Linux)? Yep you have to use code/patches that are not in the standard kernel. Which kernel are you using? Andre Hedrick CTO Timpanogas Research Group EVP Linux Development, TRG Linux ATA Development - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Big IDE HD unclipping and IBM drive
On Fri, Dec 08, 2000 at 11:24:56PM +0200, Matan Ziv-Av wrote: I have an IBM drive, DTLA-307075 (75GB), and a bios that hangs with large disks. I use a jumper to clip it to 32GB size, so the bios can boot into linux. The problem is that WIN_READ_NATIVE_MAX returns 32GB, and not the true size, and even trying to set the correct size with WIN_SET_MAX fails. Is there a way to use this combination (Bios, HD, Linux)? Don't know where you found WIN_READ_NATIVE_MAX, or what program you tried in order to fiddle with these things. The ATA standard calls the command READ NATIVE MAX ADDRESS. So far I have seen success with READ_NATIVE_MAX_ADDRESS and SET_MAX_ADDRESS on Maxtor drives but do not offhand recall any reports on IBM DTLA drives. (Posted a few times a setmax.c utility that you can try.) You can also try to contact IBM support. Files like dtla_spw.pdf only mention that you can clip capacity using a jumper, but there is no hint that it would be possible to unclip using SET_MAX_ADDRESS. Be careful that you do not lock the disk. (The command only functions as a SET_MAX_ADDRESS when immediately preceded by a READ_NATIVE_MAX_ADDRESS.) Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/