- /* Get device for the HD. This has to succeed. */
- if (!(hdletter = findidetype(IDE_HD)))
- {
- if (installtype == URL_INSTALL)
- {
- /* If we've done a PXE boot, we can skip the SCSI
- * floppy as we've already got the modules in our
- * instroot.gz */
- if (!(handle = fopen("/CDROMBOOT", "r")))
- {
- /* search img where it is on a mounted loop iso */
- sprintf(string, "images/scsidrv-%s.img", VERSION);
- if (!(checktarball(string)))
- {
- /* Couldn't find the SCSI drivers on the URL page,
- * so after 3 failed attempts, ask the user for the
- * SCSI drivers floppy disk. */
- errorbox(ctr[TR_NO_SCSI_IMAGE_FOUND]);
- sprintf(insertmessage, ctr[TR_INSERT_FLOPPY], NAME" SCSI");
- rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], insertmessage);
- if (rc != 1)
- {
- errorbox(ctr[TR_INSTALLATION_CANCELED]);
- goto EXIT;
- }
-
- if (runcommandwithstatus("/bin/tar -C / -xvzf /dev/floppy", ctr[TR_EXTRACTING_MODULES]))
- {
- errorbox(ctr[TR_UNABLE_TO_EXTRACT_MODULES]);
- goto EXIT;
- }
- } else {
- /* unpack... */
- snprintf(commandstring, STRING_SIZE,
- "/bin/wget -O - %s/%s | /bin/tar -C / -xvzf -",
- url, string);
- if (runcommandwithprogress(60, 4, title, commandstring,
- 4500, ctr[TR_INSTALLING_FILES]))
- {
- errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
- goto EXIT;
- }
- }
- } else
- fclose(handle);
- } else {
- if (ide_cdrom) {
- sprintf(string, "/bin/tar -C / -xvzf /cdrom/images/scsidrv-%s.img", VERSION);
- if (runcommandwithstatus(string, ctr[TR_EXTRACTING_MODULES]))
- {
- errorbox(ctr[TR_UNABLE_TO_EXTRACT_MODULES]);
- goto EXIT;
- }
- }
- }
-
- if (!scsi_cdrom) {
-
-#if 0 /* not yet */
- if (pcmcia)
- {
- /* trying to support SCSI pcmcia :-) */
- runcommandwithstatus("cardmgr -o -c /etc/pcmcia/scsi",
- ctr[TR_LOADING_PCMCIA]);
- if (try_scsi("sda"))
- pcmcia_disk = 1;
- }
-#endif
-
- /* try loading all SCSI modules with default options */
- /* Should expand this to allow options later though */
- if (!pcmcia_disk)
- runcommandwithstatus("/bin/probescsi.sh",
- ctr[TR_PROBING_SCSI]);
- }
-
- /* Need to clean this up at some point */
- if (!try_scsi("sda")) {
- if (!try_scsi("ida/c0d0")) {
- if (!try_scsi("cciss/c0d0")) {
- if (!try_scsi("rd/c0d0")) {
- if (!try_scsi("ataraid/d0")) {
- errorbox(ctr[TR_NO_HARDDISK]);
- goto EXIT;
- } else {
- raid_disk = 1;
- sprintf(harddrive, "ataraid/d0");
- }
- } else {
- raid_disk = 1;
- sprintf(harddrive, "rd/c0d0");
- }
- } else {
- raid_disk = 1;
- sprintf(harddrive, "cciss/c0d0");
- }
- } else {
- raid_disk = 1;
- sprintf(harddrive, "ida/c0d0");
- }
- } else {
- sprintf(harddrive, "sda");
- }
- scsi_disk = 1;
- } else
- sprintf(harddrive, "hd%c", hdletter);
-
- /* Make the hdparms struct and print the contents. */
- snprintf(hdparams.devnode, STRING_SIZE, "/dev/%s", harddrive);
- hdparams.module = 0;
-
- rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL],
- ctr[TR_PREPARE_HARDDISK], hdparams.devnode);
- if (rc != 1)