char commandstring[STRING_SIZE];
char mkfscommand[STRING_SIZE];
char *fstypes[] = { "Reiser4", "ReiserFS", "ext3", NULL };
- int fstype = REISER4;
+ int fstype = REISERFS;
int choice;
int i;
int found = 0;
mysystem("/sbin/modprobe ide-generic");
mysystem("/sbin/modprobe generic");
- mysystem("/sbin/modprobe ide-cd");
+ mysystem("/sbin/modprobe ide-cd_mod");
mysystem("/sbin/modprobe ide-disk");
mysystem("/sbin/modprobe uhci-hcd");
mysystem("/sbin/modprobe ohci-hcd");
ctr[TR_CANCEL], NULL);
} else {
rc = 1;
- fstype = REISER4; // Reiser4 is our standard filesystem. Love it or shut up!
+ fstype = REISERFS;
}
if (rc == 2)
goto EXIT;
"/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");
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");
}
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 */
/* 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");