diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2003-10-20 07:34:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-20 07:34:10 -0700 |
| commit | 2393fb2f99df0fd3e1d1452787674f93c758aba5 (patch) | |
| tree | 6b9754fc05e11bc97bacaacd01209c7cf291f950 /init | |
| parent | d2c46c6c2cd9a23fb34021119d751adcd116566d (diff) | |
[PATCH] Fix initrd with devfs enabled
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
Diffstat (limited to 'init')
| -rw-r--r-- | init/do_mounts_initrd.c | 6 | ||||
| -rw-r--r-- | init/do_mounts_rd.c | 2 | ||||
| -rw-r--r-- | init/initramfs.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 9a0ab579ae4f..452b522cbcfa 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -109,12 +109,12 @@ int __init initrd_load(void) * 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; } diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index e500fb11033b..c4074ad08906 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -185,7 +185,7 @@ int __init rd_load_image(char *from) else devblocks >>= 1; - if (strcmp(from, "/dev/initrd") == 0) + if (strcmp(from, "/initrd.image") == 0) devblocks = nblocks; if (devblocks == 0) { diff --git a/init/initramfs.c b/init/initramfs.c index 42eda038009f..38d00d06ebd3 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -497,7 +497,7 @@ void __init populate_rootfs(void) 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); |
