long root;
root = max / 2;
- if (root < 512) {
+ if (root < 256) {
return 0;
}
if (root > 2048) {
fprintf(flog, "Couldn't open commandline: /proc/cmdline\n");
} else {
fgets(line, STRING_SIZE, cmdfile);
- if (strstr (line, "noide") == NULL) {
- fprintf(flog, "Initializing IDE controllers.\n");
- initialize_ide();
- } else {
- fprintf(flog, "Skipping IDE detection.\n");
- }
- if (strstr (line, "nousb") == NULL) {
- fprintf(flog, "Initializing USB controllers.\n");
- initialize_usb();
- } else {
- fprintf(flog, "Skipping USB detection.\n");
- }
+
// check if we have to make an unattended install
if (strstr (line, "unattended") != NULL) {
unattended = 1;
- }
- // Loading the cdrom-filesystem
- mysystem("/sbin/modprobe iso9660");
- }
-
- if (unattended) {
- runcommandwithstatus("/bin/sleep 10", "WARNING: Unattended installation will start in 10 seconds...");
- }
+ runcommandwithstatus("/bin/sleep 10", "WARNING: Unattended installation will start in 10 seconds...");
+ }
+ }
+
+ mysystem("/sbin/modprobe ide-generic");
+ mysystem("/sbin/modprobe generic");
+ mysystem("/sbin/modprobe ide-cd");
+ mysystem("/sbin/modprobe ide-disk");
+ mysystem("/sbin/modprobe uhci_hcd");
+ mysystem("/sbin/modprobe ohci_hcd");
+ mysystem("/sbin/modprobe ehci_hcd");
+ mysystem("/sbin/modprobe ohci1394");
+ mysystem("/sbin/modprobe sd_mod");
+ mysystem("/sbin/modprobe sr_mod");
+ mysystem("/sbin/modprobe usb-storage");
+ mysystem("/sbin/modprobe usbhid");
+
+ mysystem("/sbin/modprobe iso9660"); // CDROM
+ mysystem("/sbin/modprobe ext2"); // Boot patition
+ mysystem("/sbin/modprobe vfat"); // USB key
/* German is the default */
for (choice = 0; langnames[choice]; choice++)
ctr = langtrs[choice];
strcpy(shortlangname, shortlangnames[choice]);
- fprintf(flog, "Selected language: %s\n", shortlangname);
newtDrawRootText(14, 0, NAME " " VERSION " - " SLOGAN );
newtPushHelpLine(ctr[TR_HELPLINE]);
sprintf (title, "%s %s - %s", NAME, VERSION, SLOGAN);
+ // Starting hardware detection
+ runcommandwithstatus("/bin/probehw.sh", ctr[TR_PROBING_HARDWARE]);
+
if (!unattended) {
sprintf(message, ctr[TR_WELCOME], NAME);
newtWinMessage(title, ctr[TR_OK], message);
if (rc == 2)
goto EXIT;
- // Starting hardware detection
- runcommandwithstatus("/bin/probehw.sh", ctr[TR_PROBING_HARDWARE]);
-
/* CDROM INSTALL */
if (installtype == CDROM_INSTALL) {
switch (mysystem("/bin/mountsource.sh")) {
sprintf(message, ctr[TR_PREPARE_HARDDISK], hdparams.devnode_disk);
if (unattended) {
hardyn = 1;
+ } else {
+ yesnoharddisk[0] = ctr[TR_NO];
+ yesnoharddisk[1] = ctr[TR_YES];
+ yesnoharddisk[2] = NULL;
}
- yesnoharddisk[0] = ctr[TR_NO];
- yesnoharddisk[1] = ctr[TR_YES];
- yesnoharddisk[2] = NULL;
-
while (! hardyn) {
rc = newtWinMenu(title, message,
50, 5, 5, 6, yesnoharddisk,
goto EXIT;
if (!unattended) {
- sprintf(message, "(TR) Bitte waehlen Sie ihr Dateisystem aus:");
- rc = newtWinMenu("(TR) Dateisystemauswahl", message,
+ sprintf(message, ctr[TR_CHOOSE_FILESYSTEM]);
+ rc = newtWinMenu( ctr[TR_CHOOSE_FILESYSTEM], message,
50, 5, 5, 6, fstypes, &fstype, ctr[TR_OK],
ctr[TR_CANCEL], NULL);
} else {
swap_file = calc_swapsize(memory, maximum_free);
- if (maximum_free < 768 + swap_file ) {
- if (maximum_free < 768) {
+ if (maximum_free < 512 + swap_file ) {
+ if (maximum_free < 700) {
errorbox(ctr[TR_DISK_TOO_SMALL]);
goto EXIT;
}
if (!unattended) {
rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]);
- }
- else {
+ } else {
rc = 1;
}
boot_partition = 20; /* in MB */
current_free = maximum_free - boot_partition - swap_file;
- if (current_free < 768) {
+ if (current_free < 700) {
errorbox(ctr[TR_DISK_TOO_SMALL]);
goto EXIT;
}
errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
goto EXIT;
}
-
- /* Save USB controller type to modules.conf */
- write_usb_modules_conf();
/* Save language und local settings */
write_lang_configs(shortlangname);
replace("/harddisk/boot/grub/grub.conf", "MOUNT", "ro");
} else if (fstype == EXT3) {
snprintf(commandstring, STRING_SIZE, "tune2fs -j %s3", hdparams.devnode_part);
- if (runcommandwithstatus(commandstring, "(TR) Creating journal for ext3..."))
+ if (runcommandwithstatus(commandstring, ctr[TR_JOURNAL_EXT3]))
{
- errorbox("(TR) Unable to create journal. Going back to ext2.");
+ errorbox(ctr[TR_JOURNAL_ERROR]);
replace("/harddisk/etc/fstab", "FSTYPE", "ext2");
goto NOJOURNAL;
}
snprintf(commandstring, STRING_SIZE, "tune2fs -j %s4", hdparams.devnode_part);
- if (runcommandwithstatus(commandstring, "(TR) Creating journal for ext3..."))
+ if (runcommandwithstatus(commandstring, ctr[TR_JOURNAL_EXT3]))
{
- errorbox("(TR) Unable to create journal. Going back to ext2.");
+ errorbox(ctr[TR_JOURNAL_ERROR]);
replace("/harddisk/etc/fstab", "FSTYPE", "ext2");
goto NOJOURNAL;
}