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

Re: A small question about dbootstrap program.



On Sat, Apr 29, 2000 at 06:49:21PM +0400, Michael Sobolev wrote:
> In files main.c and main_menu.c there is a check for a root file system.
> What's the point of having this check in both places?  I seem to miss the
> point.

I guess you're talking about 
	InstallationRootDevice=block_device("/");
on main.c (line 676) and
	if ((root_device = block_device ( "/" )) == NULL)
on main_menu.c (line 54).

On main.c it detects the device where dbootstrap, busybox and the other
installation tools are, in other words, the device that contains the root
filesystem during the 1st stage of the installation (up to the first
reboot). Usually it will be a ramdisk, but in some cases it can be a
floppy disk. InstallationRootDevice is a global variable that is used at
several different places on dbootstrap (choose_medium, bootconfig, ...).

On main_menu.c the call to block_device("/") is in find_root().
find_root() finds the device name of the partition mounted on /target
(that will hold the root filesystem of the target system). It uses the
call to block_device("/") to check that /target is not on the same
partition as / . We may use InstallationRootDevice instead of calling
block_device("/") again, if we are sure the root filesystem is not going 
to change while we are running dbootstrap.

-- 
Enrique Zanardi					ezanardi@id-agora.com


Reply to: