]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
snort: Update urls for rules download (2.9.7.0) in 'ids.cgi'
[ipfire-2.x.git] / src / install+setup / install / main.c
index 52b5c8ceae0b5096ebd551143b723eb7bb7d3088..309e006c9d3927fd6ed0792ade6e911ae841159e 100644 (file)
@@ -12,7 +12,7 @@
 #include "install.h"
 #define _GNU_SOURCE
  
-#define INST_FILECOUNT 15000
+#define INST_FILECOUNT 21000
 #define UNATTENDED_CONF "/cdrom/boot/unattended.conf"
 #define LICENSE_FILE   "/cdrom/COPYING"
 
@@ -124,8 +124,6 @@ int main(int argc, char *argv[])
        }
 
        // Load common modules
-       mysystem("/sbin/modprobe iso9660"); // CDROM
-//     mysystem("/sbin/modprobe ext2"); // Boot patition
        mysystem("/sbin/modprobe vfat"); // USB key
        
        /* German is the default */
@@ -323,10 +321,10 @@ int main(int argc, char *argv[])
                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;
                
@@ -372,7 +370,14 @@ int main(int argc, char *argv[])
 
        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]);
@@ -537,7 +542,7 @@ int main(int argc, char *argv[])
                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:");