This fixes initrd with devfs. With that combination the late-boot code
does temporary mount of devfs over rootfs /dev, which made /dev/initrd
inaccessible. For setups without devfs that didn't happen.
The fix is trivial - put the file in question outside of /dev; IOW,
we simply replace "/dev/initrd" with "/initrd.image" in init/*.
Confirmed to fix the problem by Valdis Kletnieks
* in that case the ram disk is just set up here, and gets
* mounted in the normal path.
*/
- if (rd_load_image("/dev/initrd") && ROOT_DEV != Root_RAM0) {
- sys_unlink("/dev/initrd");
+ if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
+ sys_unlink("/initrd.image");
handle_initrd();
return 1;
}
}
- sys_unlink("/dev/initrd");
+ sys_unlink("/initrd.image");
return 0;
}
else
devblocks >>= 1;
- if (strcmp(from, "/dev/initrd") == 0)
+ if (strcmp(from, "/initrd.image") == 0)
devblocks = nblocks;
if (devblocks == 0) {
return;
}
printk("it isn't (%s); looks like an initrd\n", err);
- fd = sys_open("/dev/initrd", O_WRONLY|O_CREAT, 700);
+ fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 700);
if (fd >= 0) {
sys_write(fd, (char *)initrd_start,
initrd_end - initrd_start);