From 8c1c92d93d05604552275f4c74b905bf569c3878 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 25 Sep 2008 19:06:34 +0000 Subject: expand root fs (from Miura?) --- rescue/restore-image.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'rescue') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index cc1ab6cab..8e5567d0a 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -132,10 +132,22 @@ function write_image() fi } +function expand_fs() +{ + filesystem_type=$(dumpe2fs -h /dev/${root}1 2>/dev/null| grep "Filesystem OS type" | awk '{ print $4 }') + if [ $filesystem_type = "Linux" ]; then + dialog --backtitle "$BACKTITLE" --title "$TITLE" --infobox "Installing... Finishing Install..." 3 40 + sfdisk -d /dev/$root | sed -e "/${root}1/ s/size=.*,/size= ,/" | sfdisk -f /dev/$root + e2fsck -fy /dev/${root}1 + resize2fs /dev/${root}1 + fi +} + # installation steps welcome install_warning write_image +expand_fs # all done! _msgbox "\nInstallation process finished.\nPress ENTER to shutdown.\n " -- cgit v1.2.1