<div style="DIRECTION: ltr"><span class="q">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr"><span class="q">&gt; This has several advantages:<br>&gt; 1. &nbsp;Other than writing the script, no manual labor has to be done (ie,<br>&gt; creating the &quot;deep copy&quot;)<br></span></div>
<div style="DIRECTION: ltr">The only reason for the deep copy is that we have customized the<br>interface. &nbsp;On a frugal install, this includes different desktop<br>backgrounds in hidden folders, the mydsl extensions (extra apps), and
<br>anything else in the /opt folder.</div></blockquote></span></div>
<div>*snip*</div>
<div><font color="#550055">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><font color="#550055">&gt; 3. &nbsp;Once the script finishes executing, we could have it call other<br>&gt; sub-scripts to do different types of special configs. &nbsp;Ie, this batch
<br>&gt; of HDs needs a few non-default apps, so InstallDSL.sh will then call<br>&gt; Installxx.sh , passing it all of the needed arguments, thus preventing<br>&gt; any further user interaction and saving time.<br></font>

<div style="DIRECTION: ltr">OK. &nbsp;My reply to 1. above goes to some of this.<br>&nbsp;</div></blockquote></font>*snip*
<div style="DIRECTION: ltr">&nbsp;</div></div>
<div>This makes sense.&nbsp; The only reason that I suggested the sub-scripts was to give that part of the process a &quot;plug-in&quot; type of feeling.&nbsp; Instead of modifying the master script, we could write a plugin (a subscript) that would carry out the customization.&nbsp; This way, we (or someone else) could reuse the project for a different purpose and create their own customizations with very little work.
</div>
<div>&nbsp;</div>
<div>As long as it works, that&#39;s all that matters :).&nbsp; I&#39;m sure we&#39;ll make refinements and do some tuning as the project goes into production.<br><br>In regards to your &quot;toxic soup&quot; partition tables:
</div>
<div>I&#39;ll see if I can do some testing and scripting for this.&nbsp; I doubt I&#39;ll have time tonight, but Friday is looking good.&nbsp; I&#39;ll see what I can do.</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 1/24/08, <b class="gmail_sendername">Kevin Valentine</b> &lt;<a href="mailto:kevin.valentine@gmail.com">kevin.valentine@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Brian Stempin wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5) run script that creates/formats partitions<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6) power cycle the drive (pull USB plug or toggle on/off switch)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7) check if partition table gets read correctly<br>&gt;<br>&gt;<br>&gt; Is (6) needed?&nbsp;&nbsp;I recall trying to create an &quot;install USB hd&quot; (think<br>&gt; the Ubuntu install CD...except the media is a USB hd), which required
<br>&gt; me to partition and re-partition my USB hd.&nbsp;&nbsp;I don&#39;t recall having to<br>&gt; unplug and replug my drive.<br>&gt;<br>&gt; Does anybody know this off of the top of their head, or should I go<br>&gt; ahead and invest the time in testing it?
<br>It may not be necessary to power cycle.&nbsp;&nbsp;I&#39;ve seen it suggested in the<br>DSL frugal install howto and a few other places.&nbsp;&nbsp;I&#39;ve also seen it&#39;s<br>usefulness during manual testing.&nbsp;&nbsp;It seems to be the only reliable way
<br>to get the OS to reread the partition table after you&#39;ve created new<br>partitions.&nbsp;&nbsp;Is there a way to force the OS to reread the table?&nbsp;&nbsp;I may<br>be thinking too much in terms of cfdisk and fdisk.&nbsp;&nbsp;parted may handle
<br>all this nicely already.<br><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; There&#39;s no real need to create an &quot;image&quot;.&nbsp;&nbsp;I thought it would<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; be nice to use some existing tools.&nbsp;&nbsp;I&#39;ve decided to keep it<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; simple and
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; go with a &quot;deep&quot; copy of all the files and create two archives for<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; hda2<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; and hda3.&nbsp;&nbsp;This is the general idea:<br>&gt;<br>&gt; *snip*<br>&gt;<br>&gt; I was just thinking to myself....wouldn&#39;t it be easier to to the
<br>&gt; following:<br>&gt;<br>&gt; 1.&nbsp;&nbsp;Write a bash script to do the partitioning.&nbsp;&nbsp;You can pass the<br>&gt; device (/dev/hdc, etc) as a parameter, and the bash script will call<br>&gt; parted to do the partitioning.<br>
&gt; 2.&nbsp;&nbsp;Mount the DSL ISO<br>&gt; 3.&nbsp;&nbsp;Using the previous bash script (and it&#39;s argument), have the<br>&gt; script automate the running dsl-hdinstall.<br>I like most of this, especially use of the ISO image for easy updates.
<br>btw, we can python, bash, ruby, whatever.&nbsp;&nbsp;I only suggested Python<br>because I already have some stuff that could be easily modified to do<br>most of what we want.<br>&gt; This has several advantages:<br>&gt; 1.&nbsp;&nbsp;Other than writing the script, no manual labor has to be done (ie,
<br>&gt; creating the &quot;deep copy&quot;)<br>The only reason for the deep copy is that we have customized the<br>interface.&nbsp;&nbsp;On a frugal install, this includes different desktop<br>backgrounds in hidden folders, the mydsl extensions (extra apps), and
<br>anything else in the /opt folder.&nbsp;&nbsp;We are also planning to include grub<br>0.97.&nbsp;&nbsp;The version that comes with DSL by default doesn&#39;t include<br>splashimages.&nbsp;&nbsp;We can use the host OS&#39;s (ubuntu) version of grub to
<br>write to the MBR to write to the MBR.<br><br>&gt; 2.&nbsp;&nbsp;Older and new versions of DSL can be used, simply by downloading<br>&gt; the ISO and calling it&#39;s &quot;dsl-hdinstall&quot; script.&nbsp;&nbsp;You could write the<br>&gt; script to either look to a certain mount location (/media/dsl), ask
<br>&gt; for the location of the mounted DSL ISO, or ask for the ISO image<br>&gt; location so that it could mount it for the user.<br>Yes!&nbsp;&nbsp;I really like this idea of mounting the ISO image to get the main<br>DSL files.&nbsp;&nbsp;Not so sure about the benefits using their scripts as-is.
<br>We may have to modify them quite a bit.&nbsp;&nbsp;One problem Jim and I noticed<br>with their scripts is they changed from version 3.x to 4.x.&nbsp;&nbsp;Not sure if<br>it&#39;s isolated to just those major versions.&nbsp;&nbsp;I suppose if we stick with
<br>DSL 3.x we&#39;ll be safe.<br><br>&gt; 3.&nbsp;&nbsp;Once the script finishes executing, we could have it call other<br>&gt; sub-scripts to do different types of special configs.&nbsp;&nbsp;Ie, this batch<br>&gt; of HDs needs a few non-default apps, so 
InstallDSL.sh will then call<br>&gt; Installxx.sh , passing it all of the needed arguments, thus preventing<br>&gt; any further user interaction and saving time.<br>OK.&nbsp;&nbsp;My reply to 1. above goes to some of this.<br><br>My main concern is automating the creation of the partitions via a
<br>script.&nbsp;&nbsp;I&#39;ve already tried it manually from the command line and it<br>failed in ways I can&#39;t comprehend.&nbsp;&nbsp;If we can do this, everything will<br>be easy.&nbsp;&nbsp;As you already suggested, just reuse many of the scripts
<br>already provided by DSL and we&#39;re golden :)&nbsp;&nbsp;Here&#39;s what I was doing<br>manually with &#39;parted&#39; from the command line:<br><br>## Start by removing all partitions and the MBR:<br>dd if=/dev/zero of=/dev/sdb bs=512 count=1
<br><br>## Create the partitions usign parted<br>parted --script /dev/sdb mklabel msdos<br>parted --script /dev/sdb mkpartfs primary linux-swap 1 64<br>parted --script /dev/sdb mkpartfs primary ext2 65 125<br>parted --script /dev/sdb set 2 boot on
<br>parted --script /dev/sdb mkpartfs primary ext2 125 325&nbsp;&nbsp; &lt;--- normally<br>this will be (disksize-usedspace) to use all of the disk<br><br>This turned the partition table into a toxic soup.&nbsp;&nbsp;This is what fdisk<br>shows on a table print out:
<br><br>Disk /dev/sdb: 6007 MB, 6007357440 bytes<br>185 heads, 62 sectors/track, 1022 cylinders<br>Units = cylinders of 11470 * 512 = 5872640 bytes<br><br>&nbsp;&nbsp;Device Boot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blocks&nbsp;&nbsp; Id&nbsp;&nbsp;System<br>/dev/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62500&nbsp;&nbsp; 82&nbsp;&nbsp;Linux swap / Solaris
<br>Partition 1 has different physical/logical endings:<br>&nbsp;&nbsp;&nbsp;&nbsp;phys=(7, 199, 9) logical=(10, 166, 9)<br>Partition 1 does not end on cylinder boundary.<br>/dev/sdb2&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59570&nbsp;&nbsp; 83&nbsp;&nbsp;Linux<br>Partition 2 has different physical/logical beginnings (non-Linux?):
<br>&nbsp;&nbsp;&nbsp;&nbsp;phys=(7, 199, 10) logical=(10, 166, 10)<br>Partition 2 has different physical/logical endings:<br>&nbsp;&nbsp;&nbsp;&nbsp;phys=(15, 50, 16) logical=(21, 52, 47)<br>Partition 2 does not end on cylinder boundary.<br>/dev/sdb3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;56&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;195312+&nbsp;&nbsp;83&nbsp;&nbsp;Linux
<br>Partition 3 has different physical/logical beginnings (non-Linux?):<br>&nbsp;&nbsp;&nbsp;&nbsp;phys=(15, 50, 17) logical=(21, 52, 48)<br>Partition 3 has different physical/logical endings:<br>&nbsp;&nbsp;&nbsp;&nbsp;phys=(39, 130, 41) logical=(55, 63, 10)<br>
Partition 3 does not end on cylinder boundary.<br><br><br>I&#39;m sure it has something to do with the start and end points and<br>partitions sizes.&nbsp;&nbsp;Maybe there&#39;s a simple fix.&nbsp;&nbsp;If there is, we just<br>dump it into mix of bash scripts and we&#39;re done :)
<br><br>-kevin<br><br>--<br>Ubuntu-us-pa mailing list<br><a href="mailto:Ubuntu-us-pa@lists.ubuntu.com">Ubuntu-us-pa@lists.ubuntu.com</a><br>Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-pa">
https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-pa</a><br></blockquote></div><br>