Revert "installer: Create an initial initrd unconditionally."
authorSascha Wildner <saw@online.de>
Tue, 3 Mar 2015 18:15:20 +0000 (19:15 +0100)
committerSascha Wildner <saw@online.de>
Tue, 3 Mar 2015 18:15:20 +0000 (19:15 +0100)
This reverts commit 0c69777ed12f9dff4a80f46f9ef730837791cf33.

Due to shortcomings of the CD9660 filesystems, hardlinks end up
having different inode numbers on it, which leads to them being
treated like separate files when copying etc.

As a result, the initrd put together by mkinitrd from a CD9660
would end up being around 230MB large where it actually has to
be below 15MB.

We will solve this in nrelease instead, putting together the
initrd from the building machine.

usr.sbin/installer/dfuibe_installer/fn_install.c

index 78f29e5..d6dca2d 100644 (file)
@@ -644,13 +644,6 @@ fn_install_os(struct i_fn_args *a)
                            a->os_root, cmd_name(a, "CHFLAGS"),
                            a->os_root, pfs_mountpt[j]);
 
-       /* Create the rescue image. */
-       command_add(cmds, "%s%s -b %smnt/boot -t %smnt/tmp",
-           a->os_root, cmd_name(a, "MKINITRD"),
-           a->os_root, a->os_root);
-       command_add(cmds, "%s%s -rf %smnt/tmp/initrd",
-           a->os_root, cmd_name(a, "RM"), a->os_root);
-
        /* Do some preparation if encrypted partitions were configured */
        if (needcrypt) {
                command_add(cmds,
@@ -662,6 +655,11 @@ fn_install_os(struct i_fn_args *a)
                    a->os_root, cmd_name(a, "ECHO"),
                    a->os_root);
                if (use_hammer) {
+                       command_add(cmds, "%s%s -b %smnt/boot -t %smnt/tmp",
+                           a->os_root, cmd_name(a, "MKINITRD"),
+                           a->os_root, a->os_root);
+                       command_add(cmds, "%s%s -rf %smnt/tmp/initrd",
+                           a->os_root, cmd_name(a, "RM"), a->os_root);
                        command_add(cmds,
                            "%s%s 'initrd.img_load=\"YES\"' >>%smnt/boot/loader.conf",
                            a->os_root, cmd_name(a, "ECHO"),