* bzImage, root device Q
@ 2001-07-20 7:41 D. Stimits
2001-07-20 10:46 ` Jesse Pollard
0 siblings, 1 reply; 2+ messages in thread
From: D. Stimits @ 2001-07-20 7:41 UTC (permalink / raw)
To: kernel-list
When booting to a bzImage kernel, bytes 508 and 509 can be used to name
the minor and major number of the intended root device (although it can
be overridden with a command line parameter). Other characteristics are
also available this way, through bytes in the kernel. rdev makes a
convenient way to hex edit those bytes.
What I'm more curious about is how does the kernel know what filesystem
_type_ the root is? Are there similar bytes in the bzImage, and can rdev
change this? And is there a command line syntax to allow specifying
filesystem type (e.g., something like "vmlinuz root=/dev/scd0,iso9660"
or "vmlinuz root=/dev/scd0,xfs")? Or is this limited in some way,
requiring mount on one or a few known filesystem types ("linux native"
subset comes to mind), followed by a chroot or pivot_root style command
(which in turn means no direct root mount of some filesystem types)?
D. Stimits, stimits@idcomm.com
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: bzImage, root device Q
2001-07-20 7:41 bzImage, root device Q D. Stimits
@ 2001-07-20 10:46 ` Jesse Pollard
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Pollard @ 2001-07-20 10:46 UTC (permalink / raw)
To: stimits, D. Stimits, kernel-list
On Fri, 20 Jul 2001, D. Stimits wrote:
>When booting to a bzImage kernel, bytes 508 and 509 can be used to name
>the minor and major number of the intended root device (although it can
>be overridden with a command line parameter). Other characteristics are
>also available this way, through bytes in the kernel. rdev makes a
>convenient way to hex edit those bytes.
>
>What I'm more curious about is how does the kernel know what filesystem
>_type_ the root is? Are there similar bytes in the bzImage, and can rdev
>change this? And is there a command line syntax to allow specifying
>filesystem type (e.g., something like "vmlinuz root=/dev/scd0,iso9660"
>or "vmlinuz root=/dev/scd0,xfs")? Or is this limited in some way,
>requiring mount on one or a few known filesystem types ("linux native"
>subset comes to mind), followed by a chroot or pivot_root style command
>(which in turn means no direct root mount of some filesystem types)?
Take a look at fs/super.c - function mount_root().
It reads the file system superblock (from the major/minor specified root
device) and determines the filesystem from that. There is a loop that
cycles through all known (ie built in) file systems until one works.
If none do, then it panics.
--
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: jesse@cats-chateau.net
Any opinions expressed are solely my own.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-20 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-20 7:41 bzImage, root device Q D. Stimits
2001-07-20 10:46 ` Jesse Pollard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox