Profile syntax for chapter 4

Gerard Beekmans gerard at
Fri Sep 29 11:47:13 PDT 2000

> Ok, if (by default perhaps), fdisk is going to be run manuly then this
> would do:
> <fdisk type="manual" prog="fdisk">
> 	<device selection="dev/hda" /> /* Still have to specify
> </fdisk>					  * what device. How?
> 						  */

I'd enter <device selection="drive">. The $partition variable will be created 
and a value will be assigned during some of the questions the front end will 
ask the user. In case of automatic, you can declare the variable yourself at 
the beginning of the xml file. That would work nicely. So you can determine 
whether to run fdisk manually or automatically by checking whether a certain 
variable has a certain value when you're about to run fdisk.

> If completely auto this info can be parsed from the tags in the fdisk
> section above.  Perhaps it would be a good idea to have both partitioning
> and formatting be sub-sections, occupying the "disk setup section."


> Proposal:
> <diskSetup>
> 	<fdisk>	/* This would require the
> 	.		 * correct type and
> 	.		 * buildLfsOn flags be placed
> 	.		 * in the fdisk section
> 	</fdisk>	 */
> 	<format type="auto">
> 		<displayVerify output="stdout" />
> 		<selectLfsPartition type="auto />
> 		<exec prog="mkfs" />
> 		<selectOtherPartitions type="auto />
> 		<exec prog="mkfs" />
> 		<selectSwap type="auto" />
> 		<exec prog="mkswap" />
> 	</format>
> </diskSetup>

Something like that yes.

> else  #in manual mode
> <diskSetup>
> 	<fdisk>
> 	.
> 	.
> 	.
> 	</fdisk>
> 	<format type="manual">  #Default?
> 		<selectLfsPartition type="ask" />
> 		<exec prog="mkfs" />
> 		<selectSwap type="ask" />
> 		<exec prog="mkswap" />
> 	</format>
> </diskSetup>

Looks good. Not sure if I want to use this xml format, but your point is 
clear and I agree with what you try to accomplish.

> > The next step is mounting the new partition under /mnt/lfs
> >
> > Yeah, you can even reverse it: <mount
> > target="$LFS">$partition</mount>.
> I like this better

Now that I have had the chance to think about it some more I don't agree with 
it. I think we should go with:
	<mount device=$partition">$LFS</mount>

This order seems more logical. Also that's how you would usually call the 
mount program: mount <options> partition destination

> > So we
> > have to make up a rule is entered as a tag's parameter and what
> > is the value
> > of a tag (the stuff between <blah></blah>)
> Should the profiler keep track of variables such as these.  I mean, we all
> ready entered what partition we wanted to use above.

I don't understand what you meant to say here.

> I dunno, in cases like this were it is actually a verbatim shell script I
> think it would be better to use a <commands shell="bash">....</commands>
> set up kinda like <PRE> in HTML

That's an idea to consider yes. But also think what if there is no bash 
available and all we have is the tool and something like python as a 
backend...(the tool could be started by the kernel like:
	LILO: lfs init=/sbin/lfs-install-tool

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-

More information about the alfs-discuss mailing list