diff options
| author | John Southworth <john.southworth@vyatta.com> | 2012-01-30 22:43:48 +0000 | 
|---|---|---|
| committer | John Southworth <john.southworth@vyatta.com> | 2012-01-30 22:43:48 +0000 | 
| commit | 6fbc5093b3834ea8b969865ab6c9a171c1d4b35c (patch) | |
| tree | 8188597c9ab95d438e81fedec76de3ef639c3571 /scripts/install-system | |
| parent | 0aa1232f0b81216a11b7757fca98363c05971cca (diff) | |
| parent | 227a93ede7e7058da48cde6604bbadb9aa0d2c8e (diff) | |
| download | vyatta-cfg-system-6fbc5093b3834ea8b969865ab6c9a171c1d4b35c.tar.gz vyatta-cfg-system-6fbc5093b3834ea8b969865ab6c9a171c1d4b35c.zip  | |
Merge branch 'oxnard' of git.vyatta.com:/git/vyatta-cfg-system into oxnard
Diffstat (limited to 'scripts/install-system')
| -rwxr-xr-x | scripts/install-system | 18 | 
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/install-system b/scripts/install-system index 536233d7..fbff5e1f 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -647,7 +647,7 @@ save_image_config() {      if [ -n "$output" ]; then          echo -e "Warning: error in copying the old config partition.\nSee $INSTALL_LOG for more details." -        lecho "Warning: error in copying the old config partition.\ncp -pR /mnt/tmp/* /mnt/config\n$output\n" +        echo "Warning: error in copying the old config partition.\ncp -pR /mnt/tmp/* /mnt/config\n$output\n"      fi      rename_old_config  } @@ -840,6 +840,22 @@ create_partitions() {      exit 1    fi +  # Make sure you can print disk info using parted +  parted --script /dev/$ldrive p >/dev/null 2>&1 + +  # If unable to read disk, it's likely it needs a disklabel +  if [ "$?" != "0" ]; then +    echo "Creating a new disklabel on $ldrive" +    echo "parted /dev/$ldrive mklabel msdos" +    output=$(parted -s /dev/$ldrive mklabel msdos) + +    parted --script /dev/$ldrive p >/dev/null 2>&1 +    if [ "$?" != "0" ]; then +      echo "Unable to read disk label.  Exiting." +      exit 1 +    fi +  fi +    echo "Creating root partition on /dev/$ldrive" >> $INSTALL_LOG    # make the root partition  | 
