#include "install.h"
#define _GNU_SOURCE
-#define INST_FILECOUNT 10700
+#define INST_FILECOUNT 21000
#define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
#define LICENSE_FILE "/cdrom/COPYING"
extern char *es_tr[];
extern char *de_tr[];
extern char *fr_tr[];
+extern char *nl_tr[];
extern char *pl_tr[];
extern char *ru_tr[];
+extern char *tr_tr[];
int main(int argc, char *argv[])
{
char discl_msg[40000] = "Disclaimer\n";
- char *langnames[] = { "Deutsch", "English", "Français", "Español", "Polski", "Русский", NULL };
- char *shortlangnames[] = { "de", "en", "fr", "es", "pl", "ru", NULL };
- char **langtrs[] = { de_tr, en_tr, fr_tr, es_tr, pl_tr, ru_tr, NULL };
+ char *langnames[] = { "Deutsch", "English", "Français", "Español", "Nederlands", "Polski", "Русский", "Türkçe", NULL };
+ char *shortlangnames[] = { "de", "en", "fr", "es", "nl", "pl", "ru", "tr", NULL };
+ char **langtrs[] = { de_tr, en_tr, fr_tr, es_tr, nl_tr, pl_tr, ru_tr, tr_tr, NULL };
char hdletter;
char harddrive[30], sourcedrive[5]; /* Device holder. */
char harddrive_info[STRING_SIZE]; /* Additional infos about target */
}
// Load common modules
- mysystem("/sbin/modprobe iso9660"); // CDROM
-// mysystem("/sbin/modprobe ext2"); // Boot patition
mysystem("/sbin/modprobe vfat"); // USB key
/* German is the default */
ctr[TR_CANCEL], NULL);
} else {
rc = 1;
- fstype = EXT3;
+ fstype = EXT4;
}
if (rc == 2)
goto EXIT;
swap_file = memory / 4;
/* Calculating Root-Size dependend of Max Disk Space */
- if ( disk < 756 )
- root_partition = 200;
- else if ( disk >= 756 && disk <= 3072 )
- root_partition = 512;
+ if ( disk < 2048 )
+ root_partition = 1024;
+ else if ( disk >= 2048 && disk <= 3072 )
+ root_partition = 1536;
else
root_partition = 2048;
/* Calculating the amount of free space */
- boot_partition = 20; /* in MB */
+ boot_partition = 64; /* in MB */
system_partition = disk - ( root_partition + swap_file + boot_partition );
fprintf(flog, ", boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
fclose(handle);
- snprintf(commandstring, STRING_SIZE, "/sbin/sfdisk -L -uM %s < /tmp/partitiontable", hdparams.devnode_disk);
+ if (disk < 2097150) {
+ // <2TB use sfdisk and normal mbr
+ snprintf(commandstring, STRING_SIZE, "/sbin/sfdisk -L -uM %s < /tmp/partitiontable", hdparams.devnode_disk);
+ } else {
+ // >2TB use parted with gpt
+ snprintf(commandstring, STRING_SIZE, "/usr/sbin/parted -s %s mklabel gpt mkpart boot ext2 1M 64M mkpart swap linux-swap 64M 1000M mkpart root ext4 1000M 5000M mkpart var ext4 5000M 100%% disk_set pmbr_boot on", hdparams.devnode_disk);
+ }
+
if (runcommandwithstatus(commandstring, ctr[TR_PARTITIONING_DISK]))
{
errorbox(ctr[TR_UNABLE_TO_PARTITION]);
mkdir("/harddisk/boot", S_IRWXU|S_IRWXG|S_IRWXO);
mkdir("/harddisk/var", S_IRWXU|S_IRWXG|S_IRWXO);
mkdir("/harddisk/var/log", S_IRWXU|S_IRWXG|S_IRWXO);
-
+
snprintf(commandstring, STRING_SIZE, "/bin/mount %s1 /harddisk/boot", hdparams.devnode_part);
if (runcommandwithstatus(commandstring, ctr[TR_MOUNTING_BOOT_FILESYSTEM]))
{
replace("/harddisk/boot/grub/grub.conf", "splashimage", "#splashimage");
replace("/harddisk/boot/grub/grub.conf", "#serial", "serial");
replace("/harddisk/boot/grub/grub.conf", "#terminal", "terminal");
- replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,38400n8 panic=10 ");
+ replace("/harddisk/boot/grub/grub.conf", " panic=10 ", " console=ttyS0,115200n8 panic=10 ");
/*inittab*/
replace("/harddisk/etc/inittab", "1:2345:respawn:", "#1:2345:respawn:");
fclose(flog);
newtFinished();
- if (unattended) {
- // Remove Setup autorun after boot
- if (system("rm -f /harddisk/etc/rc.d/rcsysinit.d/S75firstsetup"))
- printf("Unable to disable setup autorun.\n");
- }
-
if (system("/bin/umount /harddisk/proc"))
printf("Unable to umount /harddisk/proc.\n");
} else {