<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">> This has several advantages:<br>> 1. Other than writing the script, no manual labor has to be done (ie,<br>> creating the "deep copy")<br></span></div>
<div style="DIRECTION: ltr">The only reason for the deep copy is that we have customized the<br>interface. 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">> 3. Once the script finishes executing, we could have it call other<br>> sub-scripts to do different types of special configs. Ie, this batch
<br>> of HDs needs a few non-default apps, so InstallDSL.sh will then call<br>> Installxx.sh , passing it all of the needed arguments, thus preventing<br>> any further user interaction and saving time.<br></font>
<div style="DIRECTION: ltr">OK. My reply to 1. above goes to some of this.<br> </div></blockquote></font>*snip*
<div style="DIRECTION: ltr"> </div></div>
<div>This makes sense. The only reason that I suggested the sub-scripts was to give that part of the process a "plug-in" type of feeling. Instead of modifying the master script, we could write a plugin (a subscript) that would carry out the customization. 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> </div>
<div>As long as it works, that's all that matters :). I'm sure we'll make refinements and do some tuning as the project goes into production.<br><br>In regards to your "toxic soup" partition tables:
</div>
<div>I'll see if I can do some testing and scripting for this. I doubt I'll have time tonight, but Friday is looking good. I'll see what I can do.</div>
<div> </div>
<div><span class="gmail_quote">On 1/24/08, <b class="gmail_sendername">Kevin Valentine</b> <<a href="mailto:kevin.valentine@gmail.com">kevin.valentine@gmail.com</a>> 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>><br>> 5) run script that creates/formats partitions<br>> 6) power cycle the drive (pull USB plug or toggle on/off switch)
<br>> 7) check if partition table gets read correctly<br>><br>><br>> Is (6) needed? I recall trying to create an "install USB hd" (think<br>> the Ubuntu install CD...except the media is a USB hd), which required
<br>> me to partition and re-partition my USB hd. I don't recall having to<br>> unplug and replug my drive.<br>><br>> Does anybody know this off of the top of their head, or should I go<br>> ahead and invest the time in testing it?
<br>It may not be necessary to power cycle. I've seen it suggested in the<br>DSL frugal install howto and a few other places. I've also seen it's<br>usefulness during manual testing. It seems to be the only reliable way
<br>to get the OS to reread the partition table after you've created new<br>partitions. Is there a way to force the OS to reread the table? I may<br>be thinking too much in terms of cfdisk and fdisk. parted may handle
<br>all this nicely already.<br><br>> There's no real need to create an "image". I thought it would<br>> be nice to use some existing tools. I've decided to keep it<br>> simple and
<br>> go with a "deep" copy of all the files and create two archives for<br>> hda2<br>> and hda3. This is the general idea:<br>><br>> *snip*<br>><br>> I was just thinking to myself....wouldn't it be easier to to the
<br>> following:<br>><br>> 1. Write a bash script to do the partitioning. You can pass the<br>> device (/dev/hdc, etc) as a parameter, and the bash script will call<br>> parted to do the partitioning.<br>
> 2. Mount the DSL ISO<br>> 3. Using the previous bash script (and it's argument), have the<br>> 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. 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>> This has several advantages:<br>> 1. Other than writing the script, no manual labor has to be done (ie,
<br>> creating the "deep copy")<br>The only reason for the deep copy is that we have customized the<br>interface. 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. We are also planning to include grub<br>0.97. The version that comes with DSL by default doesn't include<br>splashimages. We can use the host OS's (ubuntu) version of grub to
<br>write to the MBR to write to the MBR.<br><br>> 2. Older and new versions of DSL can be used, simply by downloading<br>> the ISO and calling it's "dsl-hdinstall" script. You could write the<br>> script to either look to a certain mount location (/media/dsl), ask
<br>> for the location of the mounted DSL ISO, or ask for the ISO image<br>> location so that it could mount it for the user.<br>Yes! I really like this idea of mounting the ISO image to get the main<br>DSL files. Not so sure about the benefits using their scripts as-is.
<br>We may have to modify them quite a bit. One problem Jim and I noticed<br>with their scripts is they changed from version 3.x to 4.x. Not sure if<br>it's isolated to just those major versions. I suppose if we stick with
<br>DSL 3.x we'll be safe.<br><br>> 3. Once the script finishes executing, we could have it call other<br>> sub-scripts to do different types of special configs. Ie, this batch<br>> of HDs needs a few non-default apps, so
InstallDSL.sh will then call<br>> Installxx.sh , passing it all of the needed arguments, thus preventing<br>> any further user interaction and saving time.<br>OK. 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. I've already tried it manually from the command line and it<br>failed in ways I can't comprehend. If we can do this, everything will<br>be easy. As you already suggested, just reuse many of the scripts
<br>already provided by DSL and we're golden :) Here's what I was doing<br>manually with 'parted' 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 <--- normally<br>this will be (disksize-usedspace) to use all of the disk<br><br>This turned the partition table into a toxic soup. 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> Device Boot Start End Blocks Id System<br>/dev/sdb1 1 11 62500 82 Linux swap / Solaris
<br>Partition 1 has different physical/logical endings:<br> phys=(7, 199, 9) logical=(10, 166, 9)<br>Partition 1 does not end on cylinder boundary.<br>/dev/sdb2 * 11 22 59570 83 Linux<br>Partition 2 has different physical/logical beginnings (non-Linux?):
<br> phys=(7, 199, 10) logical=(10, 166, 10)<br>Partition 2 has different physical/logical endings:<br> phys=(15, 50, 16) logical=(21, 52, 47)<br>Partition 2 does not end on cylinder boundary.<br>/dev/sdb3 22 56 195312+ 83 Linux
<br>Partition 3 has different physical/logical beginnings (non-Linux?):<br> phys=(15, 50, 17) logical=(21, 52, 48)<br>Partition 3 has different physical/logical endings:<br> phys=(39, 130, 41) logical=(55, 63, 10)<br>
Partition 3 does not end on cylinder boundary.<br><br><br>I'm sure it has something to do with the start and end points and<br>partitions sizes. Maybe there's a simple fix. If there is, we just<br>dump it into mix of bash scripts and we'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>