On Wed, 2005-09-21 at 16:13 -0500, John Jolet wrote:
> On Wed, 2005-09-21 at 13:49 -0700, John Stile wrote:
> > I'll just keep shamelessly asking questions.
> >
> > I'm stuck on an install, where parted has the partition information all
> > messed up, and dies.
> >
> > Quesiton: Has anyone hand hacked the 'parted' portion of an install
> > scripts? Point me at a How-to?
> >
> > Using Debian packages:
> > systemimager-boot-i386 3.2.3-6
> > systemimager-common 3.2.3-6
> > systemimager-server 3.2.3-6
> >
> > At first, parted finds the size of the drive:
> > Gets 'Disk geometry for /dev/scsi/host0/bus0/target0/lun0/disk:
> > 0.000-239372.437 megabytes
> >
> > Then it intelligently creates the first partition:
> > Creating partition /dev/sda1
> > parted -s -- /dev/sda mkpart primary ext2 0 78
> >
> > >From then on it it has the wrong numbers, and goes wonky:
> > Creating partition /dev/sda2
> > parted -s -- /dev/sda mkpart primary exst2 239369 239370
>
> I've hacked mine up, not sure if there's a howto or not, but perhaps if
> you posted the output from the script (as you did) paired with the
> parted stanzas in the autoinstall script.....I know mine does everything
> relative to the one it just did, not sure how it could get off. I do
> know that an annoying thing it does, which I keep having to fix, is my
> swap partition it tries to make as ext2. I have to edit the scripts.
> It also creates and mounts the filesystems wrong..tries to make and
> mount boot, THEN /, which overwrites the boot. I have to swap those two
> (maybe that's just because I prefer my boot partition to be the first
> one on the boot disk).
>
> echo "Creating partition /dev/sda1."
Thank you John,
>From my previous email (above) you will see the partitioning is totally
wack by /dev/sda2. Below you will find the partitioning portion of
the master script, up to the creation of the extended partition.
If DISK_SIZE=239372.437, then it doesn't make any sense to have
'$DISK_SIZE - 1' or -2 or -3. That has got to be wrong, but can I fix
it? Or maybe I don't understand what the output of '$DISK_SIZE - 1'
should be.
### BEGIN partition /dev/sda ###
echo "Partitioning /dev/sda..."
echo "Old partition table for /dev/sda:"
parted -s -- /dev/sda print
# Create disk label. This ensures that all remnants of the old
label, whatever
# type it was, are removed and that we're starting with a clean
label.
echo "parted -s -- /dev/sda mklabel msdos || shellout"
parted -s -- /dev/sda mklabel msdos || shellout
# Get the size of the destination disk so that we can make the
partitions fit properly.
DISK_SIZE=`parted -s /dev/sda print | grep 'Disk geometry for' |
sed 's/^.*-//g' | sed 's/\..*$//' `
[ -z $DISK_SIZE ] && shellout
if [ "$ARCH" = "alpha" ]; then
END_OF_LAST_PRIMARY=1
else
END_OF_LAST_PRIMARY=0
fi
echo "Creating partition /dev/sda1."
START_MB=$END_OF_LAST_PRIMARY
END_MB="$(echo "scale=3; ($START_MB + 78)" | bc)"
echo "parted -s -- /dev/sda mkpart primary ext2 $START_MB
$END_MB || shellout"
parted -s -- /dev/sda mkpart primary ext2 $START_MB $END_MB ||
shellout
END_OF_LAST_PRIMARY=$END_MB
echo "Creating partition /dev/sda2."
START_MB=$(( $DISK_SIZE - 3 ))
END_MB=$(( $DISK_SIZE - 2 ))
echo "parted -s -- /dev/sda mkpart primary ext2 $START_MB
$END_MB || shellout"
parted -s -- /dev/sda mkpart primary ext2 $START_MB $END_MB ||
shellout
END_OF_LAST_PRIMARY=$END_MB
echo "Creating partition /dev/sda3."
START_MB=$(( $DISK_SIZE - 1 ))
END_MB=$(( $DISK_SIZE - 0 ))
echo "parted -s -- /dev/sda mkpart primary ext2 $START_MB
$END_MB || shellout"
parted -s -- /dev/sda mkpart primary ext2 $START_MB $END_MB ||
shellout
END_OF_LAST_PRIMARY=$END_MB
echo "Creating partition /dev/sda4."
START_MB=$END_OF_LAST_PRIMARY
END_MB=$(( $DISK_SIZE - 4 ))
echo "parted -s -- /dev/sda mkpart extended $START_MB $END_MB ||
shellout"
parted -s -- /dev/sda mkpart extended $START_MB $END_MB ||
shellout
END_OF_LAST_PRIMARY=$END_MB
END_OF_LAST_LOGICAL=$START_MB
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users