mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: Christophe Saout <christophe@saout.de>
Cc: Walt H <waltabbyh@comcast.net>,
	arekm@pld-linux.org, linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] initrd with devfs enabled (Re: initrd and 2.6.0-test8)
Date: Sat, 18 Oct 2003 20:41:48 +0100	[thread overview]
Message-ID: <20031018194148.GE7665@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1066501993.4208.6.camel@chtephan.cs.pocnet.net>

	OK, that should do it - the problems happened if you had devfs
enabled; in that case late-boot code does temporary mount of devfs over
rootfs /dev, which made /dev/initrd inaccessible.  For setups without
devfs that didn't happen.

	Fix is trivial - put the file in question outside of /dev; IOW,
we simply replace "/dev/initrd" with "/initrd.image" in init/*.  It works
here; please check if it fixes all initrd problems on your boxen.

diff -urN B8/init/do_mounts_initrd.c B8-current/init/do_mounts_initrd.c
--- B8/init/do_mounts_initrd.c	Sat Oct 18 13:09:57 2003
+++ B8-current/init/do_mounts_initrd.c	Sat Oct 18 15:26:58 2003
@@ -109,12 +109,12 @@
 		 * 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 -urN B8/init/do_mounts_rd.c B8-current/init/do_mounts_rd.c
--- B8/init/do_mounts_rd.c	Sat Sep 27 22:05:01 2003
+++ B8-current/init/do_mounts_rd.c	Sat Oct 18 15:27:22 2003
@@ -185,7 +185,7 @@
 	else
 		devblocks >>= 1;
 
-	if (strcmp(from, "/dev/initrd") == 0)
+	if (strcmp(from, "/initrd.image") == 0)
 		devblocks = nblocks;
 
 	if (devblocks == 0) {
diff -urN B8/init/initramfs.c B8-current/init/initramfs.c
--- B8/init/initramfs.c	Sat Oct 18 13:09:57 2003
+++ B8-current/init/initramfs.c	Sat Oct 18 15:25:50 2003
@@ -497,7 +497,7 @@
 			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);

  reply	other threads:[~2003-10-18 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-18 16:27 initrd and 2.6.0-test8 Walt H
2003-10-18 17:52 ` viro
2003-10-18 18:22   ` viro
2003-10-18 18:33   ` Christophe Saout
2003-10-18 19:41     ` viro [this message]
2003-10-18 21:56       ` [PATCH] initrd with devfs enabled (Re: initrd and 2.6.0-test8) Arkadiusz Miskiewicz
2003-10-18 22:11         ` viro
2003-10-18 22:46           ` Arkadiusz Miskiewicz
2003-10-18 23:07       ` Valdis.Kletnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031018194148.GE7665@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=arekm@pld-linux.org \
    --cc=christophe@saout.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=waltabbyh@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome