long root;
root = max / 2;
- if (root < 512) {
+ if (root < 256) {
return 0;
}
if (root > 2048) {
if (strstr (line, "unattended") != NULL) {
unattended = 1;
}
- // Loading the cdrom-filesystem
+ // Loading the cdrom-filesystem and ext2
mysystem("/sbin/modprobe iso9660");
+ mysystem("/sbin/modprobe ext2");
+
+ // Loading the via_rhine driver because it isn't detected correctly (sometimes)
+ mysystem("/sbin/modprobe via-rhine");
}
if (unattended) {
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,
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;
}
replace("/harddisk/etc/fstab", "FSTYPE", "reiserfs");
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..."))
+ {
+ errorbox("(TR) Unable to create journal. Going back to ext2.");
+ 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..."))
+ {
+ errorbox("(TR) Unable to create journal. Going back to ext2.");
+ replace("/harddisk/etc/fstab", "FSTYPE", "ext2");
+ goto NOJOURNAL;
+ }
replace("/harddisk/etc/fstab", "FSTYPE", "ext3");
+ NOJOURNAL:
replace("/harddisk/etc/mkinitcpio.conf", "MODULES=\"", "MODULES=\"ext3 ");
replace("/harddisk/boot/grub/grub.conf", "MOUNT", "ro");
}
/* Going to make our initrd... */
- snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -v -g /boot/ipfirerd.img -k %s-ipfire", KERNEL_VERSION);
+ snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd.img -k %s-ipfire", KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
- snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -v -g /boot/ipfirerd-smp.img -k %s-ipfire-smp", KERNEL_VERSION);
+ snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-smp.img -k %s-ipfire-smp", KERNEL_VERSION);
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
sprintf(string, "root=%s3", hdparams.devnode_part_run);