summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumen Ganguly2015-03-26 11:23:17 +0530
committerSoumen Ganguly2015-03-26 11:23:17 +0530
commit66d4c03d932328add8bfdc4690431dd93ad6544b (patch)
tree91fd1168ab0f8aeb2542eb0aaf98b2019d4ed4ce
parentcf569a1a6c07655beb95b9192b1e2f0b5cf4f9e1 (diff)
downloadFOSSEE-netbook-tools-66d4c03d932328add8bfdc4690431dd93ad6544b.tar.gz
FOSSEE-netbook-tools-66d4c03d932328add8bfdc4690431dd93ad6544b.tar.bz2
FOSSEE-netbook-tools-66d4c03d932328add8bfdc4690431dd93ad6544b.zip
modified changes to the installation function
-rw-r--r--backup-restore-tool/recovery.sh37
1 files changed, 22 insertions, 15 deletions
diff --git a/backup-restore-tool/recovery.sh b/backup-restore-tool/recovery.sh
index fed7d74..ba59c2c 100644
--- a/backup-restore-tool/recovery.sh
+++ b/backup-restore-tool/recovery.sh
@@ -4,10 +4,10 @@
boot_part=/dev/mtd4
rootfs_mtd_num=5
rootfs_part=/dev/mtd${rootfs_mtd_num}
-ubuntu_dir=ubuntu_rootfs
-ubuntu_file=/mnt/mmcblk0p1/recovery_images/ubuntu14.04.tar
-kernel_image=/mnt/mmcblk0p1/recovery_images/uzImage.bin
-ramdisk_image=/mnt/mmcblk0p1/recovery_images/initrd.img
+ubuntu_dir=/nand_previous
+ubuntu_file=/sd_card/recovery.tgz
+kernel_image=/sd_card/uzImage.bin
+ramdisk_image=/sd_card/initrd.img
#This is the recovery script used to re-install or recover the FOSSEE-OS.
@@ -70,19 +70,26 @@ fi
installation()
{
- # echo "The installation will take place here"
+ echo "The installation will take place here"
# exit 0
- flash_erase $rootfs_part 0 0
- ubiattach /dev/ubi_ctrl -m $rootfs_mtd_num
- ubimkvol /dev/ubi0 -N rootfs -m
- mount -t ubifs ubi0_0 $ubuntu_dir
- tar xvvf $ubuntu_file -C $ubuntu_dir
- sync
- mode=$(fbset | grep geometry | cut -c5- | cut -d\ -f2,3 | tr \ x)
- sed -i "s/MODE_ANY/$mode/g" ${ubuntu_dir}/etc/X11/xorg.conf
- sync
+ flash_erase $rootfs_part 0 0
+ ubiattach /dev/ubi_ctrl -m $rootfs_mtd_num
+ ubimkvol /dev/ubi0 -N ubuntu-rootfs -m
+ mount -t ubifs ubi0_0 $ubuntu_dir
+ mkdir /tmp/recovery-img
+ mkdir /tmp/recovery-contents
+ tar xvvf $ubuntu_file -C /tmp/recovery-image
+ mount /tmp/recovery-image/recovery.img /tmp/recovery-contents
+ cp -a /tmp/recovery-contents/* $ubuntu_dir
+ sync
+ # mode=$(fbset | grep geometry | cut -c5- | cut -d\ -f2,3 | tr \ x)
+ # sed -i "s/MODE_ANY/$mode/g" ${ubuntu_dir}/etc/X11/xorg.conf
+ sync
- umount $ubuntu_dir
+ umount $ubuntu_dir
+ # /bin/sh
+ echo "Installation complete"
+ reboot
}
#This functions presents the user with advanecd options where he/she can backup their data from previous installation or repair the current installation through shell prompt.