mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* /dev before the root filesystem is mounted
@ 2006-11-13 10:52 Ivan Ukhov
  2006-11-13 11:36 ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Ukhov @ 2006-11-13 10:52 UTC (permalink / raw)
  To: linux-kernel

Hi,

I want the kernel (2.4) to display (just using printk) all available
devices with full path (/dev/...) before the root filesystem is
mounted. So I'm trying to add something into mount_block_root function
in init/do_mounts.c to do it. But I really haven't got any idia what
exactly I should do. Can you help me please?

Thanks a lot.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /dev before the root filesystem is mounted
  2006-11-13 10:52 /dev before the root filesystem is mounted Ivan Ukhov
@ 2006-11-13 11:36 ` Jan Engelhardt
  2006-11-13 12:15   ` Ivan Ukhov
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2006-11-13 11:36 UTC (permalink / raw)
  To: Ivan Ukhov; +Cc: linux-kernel


> I want the kernel (2.4) to display (just using printk) all available
> devices with full path (/dev/...) before the root filesystem is
> mounted.

Case 1: You do not use an initrd/initramfs:
  / is empty, /dev does not exist.

Case 2: You do use an initrd/initramfs
  You populated /dev during creation of the initrd/initramfs image OR
  your init script inside the initrd/initramfs mknods the nodes when run.


	-`J'
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /dev before the root filesystem is mounted
  2006-11-13 11:36 ` Jan Engelhardt
@ 2006-11-13 12:15   ` Ivan Ukhov
  2006-11-13 12:26     ` Jan Engelhardt
  2006-11-13 13:32     ` Erik Mouw
  0 siblings, 2 replies; 5+ messages in thread
From: Ivan Ukhov @ 2006-11-13 12:15 UTC (permalink / raw)
  To: Jan Engelhardt

i dont use initrd. the kernel understands argument 'root=/dev/...', so
/dev should exist, mb not in a real filesystem, but just in ram or
something. i just want to know what devices are available for being
the root filesystem for the kernel (displaying all available devices
will be enough for me).

2006/11/13, Jan Engelhardt <jengelh@linux01.gwdg.de>:
>
> > I want the kernel (2.4) to display (just using printk) all available
> > devices with full path (/dev/...) before the root filesystem is
> > mounted.
>
> Case 1: You do not use an initrd/initramfs:
>   / is empty, /dev does not exist.
>
> Case 2: You do use an initrd/initramfs
>   You populated /dev during creation of the initrd/initramfs image OR
>   your init script inside the initrd/initramfs mknods the nodes when run.
>
>
>         -`J'
> --
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /dev before the root filesystem is mounted
  2006-11-13 12:15   ` Ivan Ukhov
@ 2006-11-13 12:26     ` Jan Engelhardt
  2006-11-13 13:32     ` Erik Mouw
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2006-11-13 12:26 UTC (permalink / raw)
  To: Ivan Ukhov; +Cc: Linux Kernel Mailing List


On Nov 13 2006 15:15, Ivan Ukhov wrote:
> i dont use initrd. the kernel understands argument 'root=/dev/...', so
> /dev should exist, mb not in a real filesystem, but just in ram or
> something. i just want to know what devices are available for being
> the root filesystem for the kernel (displaying all available devices
> will be enough for me).

/dev does not exist. How should it? The root filesystem / is empty, other
people can verify that, or you can verify it yourself with an
initramfs (which, unlike an initrd, is copied to / instead of being
mounted).

Yes, the kernel understands root=/dev/ but that's a hack, a strstr(s,
"/dev/"). Should you want to use, say, root=/devices/hda instead,
that would only succeed when using an initrd/initramfs.

To display the accepted block devices (this is most likely what you
really wanted), check out

ftp://ftp-1.gwdg.de/pub/linux/misc/suser-jengelh/kernel/linux-2.6.18-jen35/show_partitions.diff


Please (a) don't top post (b) don't strip Cc:s.

>
> 2006/11/13, Jan Engelhardt <jengelh@linux01.gwdg.de>:
>> 
>> > I want the kernel (2.4) to display (just using printk) all available
>> > devices with full path (/dev/...) before the root filesystem is
>> > mounted.
>> 
>> Case 1: You do not use an initrd/initramfs:
>> / is empty, /dev does not exist.
>> 
>> Case 2: You do use an initrd/initramfs
>> You populated /dev during creation of the initrd/initramfs image OR
>> your init script inside the initrd/initramfs mknods the nodes when run.
>> 
>> 
>>        -`J'
>> --
>> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>

	-`J'
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: /dev before the root filesystem is mounted
  2006-11-13 12:15   ` Ivan Ukhov
  2006-11-13 12:26     ` Jan Engelhardt
@ 2006-11-13 13:32     ` Erik Mouw
  1 sibling, 0 replies; 5+ messages in thread
From: Erik Mouw @ 2006-11-13 13:32 UTC (permalink / raw)
  To: Ivan Ukhov; +Cc: Jan Engelhardt, linux-kernel

On Mon, Nov 13, 2006 at 03:15:26PM +0300, Ivan Ukhov wrote:
> i dont use initrd. the kernel understands argument 'root=/dev/...', so
> /dev should exist, mb not in a real filesystem, but just in ram or
> something. i just want to know what devices are available for being
> the root filesystem for the kernel (displaying all available devices
> will be enough for me).

/dev does not exist because there is no root filesystem mounted. Please
read http://kernelnewbies.org/RootFileSystem .


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-13 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-13 10:52 /dev before the root filesystem is mounted Ivan Ukhov
2006-11-13 11:36 ` Jan Engelhardt
2006-11-13 12:15   ` Ivan Ukhov
2006-11-13 12:26     ` Jan Engelhardt
2006-11-13 13:32     ` Erik Mouw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®