]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/install+setup/install/main.c
Add auto_fs & auto_fs4 kernel modules
[people/pmueller/ipfire-2.x.git] / src / install+setup / install / main.c
index 852819b176bd606878d061896114a1705a0adcc4..2042a350006ff6a8b5be57ff992fa122bd2038df 100644 (file)
@@ -448,11 +448,11 @@ int main(int argc, char *argv[])
                "/bin/touch /harddisk/lib/modules/%s-ipfire/modules.dep",
                KERNEL_VERSION);
        mysystem(commandstring);
-       snprintf(commandstring, STRING_SIZE, 
+/*     snprintf(commandstring, STRING_SIZE, 
                "/bin/touch /harddisk/lib/modules/%s-ipfire-smp/modules.dep",
                KERNEL_VERSION);
        mysystem(commandstring);
-
+*/
        /* Rename uname */
        rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
 
@@ -475,7 +475,6 @@ int main(int argc, char *argv[])
        
        if (fstype == REISER4) {
                replace("/harddisk/etc/fstab", "FSTYPE", "reiser4");
-               replace("/harddisk/etc/mkinitcpio.conf", "MODULES=\"", "MODULES=\"reiser4 ");
                replace("/harddisk/boot/grub/grub.conf", "MOUNT", "rw");
        } else if (fstype == REISERFS) {
                replace("/harddisk/etc/fstab", "FSTYPE", "reiserfs");
@@ -497,12 +496,20 @@ int main(int argc, char *argv[])
                }
                replace("/harddisk/etc/fstab", "FSTYPE", "ext3");
                NOJOURNAL:
-               replace("/harddisk/etc/mkinitcpio.conf", "MODULES=\"", "MODULES=\"ext3 ");
                replace("/harddisk/boot/grub/grub.conf", "MOUNT", "ro");
        }
 
        replace("/harddisk/boot/grub/grub.conf", "KVER", KERNEL_VERSION);
 
+       /* Build the emergency ramdisk with all drivers */
+       mysystem("cp -f /harddisk/etc/mkinitcpio.conf /harddisk/etc/mkinitcpio.conf.org");
+
+       replace("/harddisk/etc/mkinitcpio.conf", " autodetect ", " ");
+       snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s-emergency.img -k %s-ipfire", KERNEL_VERSION, KERNEL_VERSION);
+       runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
+
+       mysystem("cp -f /harddisk/etc/mkinitcpio.conf.org /harddisk/etc/mkinitcpio.conf");
+
        /* mkinitcpio has a problem if ide and pata are included */
        if ( scsi_disk==1 ) {
            /* Remove the ide hook if we install sda */
@@ -515,9 +522,9 @@ int main(int argc, char *argv[])
        /* Going to make our initrd... */
        snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s.img -k %s-ipfire", KERNEL_VERSION, KERNEL_VERSION);
        runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
-       snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s-smp.img -k %s-ipfire-smp", KERNEL_VERSION, KERNEL_VERSION );
+/*     snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s-smp.img -k %s-ipfire-smp", KERNEL_VERSION, KERNEL_VERSION );
        runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
-
+*/
        sprintf(string, "root=%s3", hdparams.devnode_part_run);
        replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
        mysystem("ln -s grub.conf /harddisk/boot/grub/menu.lst");