* kinit problem with cciss root device
@ 2006-06-06 22:40 Bjorn Helgaas
2006-06-06 23:25 ` H. Peter Anvin
2006-06-06 23:44 ` H. Peter Anvin
0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2006-06-06 22:40 UTC (permalink / raw)
To: hpa; +Cc: linux-kernel, iss_storagedev, Mike Miller
kinit converts "root=/dev/cciss/c0d0p1" to "cciss.c0d0", which
doesn't exist under /sys/block because register_disk() converts
"cciss/c0d0" to "cciss!c0d0" (note "!", not ".").
I don't know whether it's the *right* fix, but the patch below
makes things work. It still doesn't make kinit exactly match
the register_disk() behavior because register_disk() only changes
the first "/" in the string.
This was a nuisance to debug because when it failed, the only
output I got was this:
...
Adding console on ttyS0 at I/O port 0x3f8 (options '115200')
Time: tsc clocksource has been installed.
Freeing unused kernel memory: 260k freed
argc == 4
Kernel panic - not syncing: Attempted to kill init!
argv[0]: "/ini
So you might consider something like the "drain output" hunk below,
which allowed all the useful messages to get out.
Index: work-mm8/usr/kinit/kinit.c
===================================================================
--- work-mm8.orig/usr/kinit/kinit.c 2006-06-05 19:04:46.000000000 -0600
+++ work-mm8/usr/kinit/kinit.c 2006-06-06 14:19:59.000000000 -0600
@@ -317,5 +317,10 @@
if (mnt_sysfs)
umount2("/sys", 0);
+ /*
+ * Allow time for messages to drain before kernel panics
+ * because init is exiting.
+ * */
+ sleep(10);
exit(ret);
}
Index: work-mm8/usr/kinit/name_to_dev.c
===================================================================
--- work-mm8.orig/usr/kinit/name_to_dev.c 2006-06-05 19:04:46.000000000 -0600
+++ work-mm8/usr/kinit/name_to_dev.c 2006-06-06 14:19:02.000000000 -0600
@@ -151,7 +151,7 @@
for (p = s; *p; p++)
if (*p == '/')
- *p = '.';
+ *p = '!';
res = try_name(s, 0);
if (res)
return res;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: kinit problem with cciss root device
2006-06-06 22:40 kinit problem with cciss root device Bjorn Helgaas
@ 2006-06-06 23:25 ` H. Peter Anvin
2006-06-06 23:38 ` H. Peter Anvin
2006-06-06 23:44 ` H. Peter Anvin
1 sibling, 1 reply; 4+ messages in thread
From: H. Peter Anvin @ 2006-06-06 23:25 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-kernel, iss_storagedev, Mike Miller
Bjorn Helgaas wrote:
>
> So you might consider something like the "drain output" hunk below,
> which allowed all the useful messages to get out.
>
Hm. That's rather ugly. Anyone knows if TCFLSB works on /dev/console?
>
> Index: work-mm8/usr/kinit/kinit.c
> ===================================================================
> --- work-mm8.orig/usr/kinit/kinit.c 2006-06-05 19:04:46.000000000 -0600
> +++ work-mm8/usr/kinit/kinit.c 2006-06-06 14:19:59.000000000 -0600
> @@ -317,5 +317,10 @@
> if (mnt_sysfs)
> umount2("/sys", 0);
>
> + /*
> + * Allow time for messages to drain before kernel panics
> + * because init is exiting.
> + * */
> + sleep(10);
> exit(ret);
> }
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: kinit problem with cciss root device
2006-06-06 23:25 ` H. Peter Anvin
@ 2006-06-06 23:38 ` H. Peter Anvin
0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2006-06-06 23:38 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Bjorn Helgaas, linux-kernel, iss_storagedev, Mike Miller
H. Peter Anvin wrote:
> Bjorn Helgaas wrote:
>>
>> So you might consider something like the "drain output" hunk below,
>> which allowed all the useful messages to get out.
>>
>
> Hm. That's rather ugly. Anyone knows if TCFLSB works on /dev/console?
>
That should of course have been TCSBRK(1), as in tcdrain().
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kinit problem with cciss root device
2006-06-06 22:40 kinit problem with cciss root device Bjorn Helgaas
2006-06-06 23:25 ` H. Peter Anvin
@ 2006-06-06 23:44 ` H. Peter Anvin
1 sibling, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2006-06-06 23:44 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-kernel, iss_storagedev, Mike Miller
Bjorn Helgaas wrote:
> kinit converts "root=/dev/cciss/c0d0p1" to "cciss.c0d0", which
> doesn't exist under /sys/block because register_disk() converts
> "cciss/c0d0" to "cciss!c0d0" (note "!", not ".").
>
> I don't know whether it's the *right* fix, but the patch below
> makes things work. It still doesn't make kinit exactly match
> the register_disk() behavior because register_disk() only changes
> the first "/" in the string.
>
That's still the right thing; obviously register_disk() will need to change if we ever
have deeper trees.
Could you re-send that hunk as a proper patch with Signed-off-by: et al?
Thanks,
-hpa
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-06 23:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-06 22:40 kinit problem with cciss root device Bjorn Helgaas
2006-06-06 23:25 ` H. Peter Anvin
2006-06-06 23:38 ` H. Peter Anvin
2006-06-06 23:44 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox