[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] What format is the "make zdisk" Linux boot disk ?



On Fri, 7 Nov 1997, Joe Whitaker wrote:

> Thanks for all the responses.
> OK, but now I'm curious as to how the floppy boot knows
> where my root file system is. There seems to be nothing in
> the dd command specifying the root location.

	It's already in the kernel image before it's dded to disk. The two
bytes at offset 508 and 509 (decimal) in the image specify the root
device's major and minor, respectively. You can conveniently modify these
and other values using rdev. The man page for rdev discusses this briefly. 

	The kernel build process stat()s the root fs ("/") to get the
major and minor number during the last stages of the build. These are
stashed in the kernel image at that time. This is taken care of in
/your_linux_src_dir/arch/i386/boot/tools/build.c. Have a look there, if
you wish. It's pretty straightforward. 

-----
Jason Boyles <jason at alltel.net>