Xu Xiaodong avatar Xu Xiaodong committed 5e157c1

remove part_ssd16.sh and run_resssd16.sh

Comments (0)

Files changed (7)

 #
 # description:  删除 /dev/sdc (优盘) 的所有分区
 # author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
+# modified:     2011 Aug 15
 #
 
 CMD=fdisk
-DEVICE=/dev/sdc
+DEVICE=/dev/sdb
 
 sudo "$CMD" "$DEVICE" <<'EOF'
 d
 # description:  针对 320G 硬盘进行自动分区
 #               / 10G, /tmp 5G, /var 25G, /home 278, swap 2G
 # author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
+# modified:     2011 Aug 15
 #
 
 CMD=fdisk
 p
 1
 
-+10000M
++10G
 n
 p
 2
 
-+5000M
++5G
 n
 p
 3
 
-+25000M
++25G
 n
 e
 
 
 n
 
-+278000M
++2G
 n
 
 
 #!/bin/sh
 #
 # description:  针对 30G 固态硬盘进行自动分区
-#               / 6G, /tmp 1G, /var 3G, /home 18G, swap 2G
+#               / 6G, /tmp 1G, /var 3G, swap 2G, /home 18G
 # author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
+# modified:     2011 Aug 15
 #
 
 CMD=fdisk
 p
 1
 
-+6000M
++6G
 n
 p
 2
 
-+1000M
++1G
 n
 p
 3
 
-+3000M
++3G
 n
 e
 
 
 n
 
-+17000M
++2G
 n
 
 

part_ssd16.sh

-#!/bin/sh
-#
-# description:  针对 16G 固态硬盘进行自动分区
-#               / 6G, /tmp 1G, /var 2G, /home 6G, swap 1G
-# author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
-#
-
-CMD=fdisk
-DEVICE=/dev/sda
-
-sudo "$CMD" "$DEVICE" <<'EOF'
-n
-p
-1
-
-+6000M
-n
-p
-2
-
-+1000M
-n
-p
-3
-
-+2000M
-n
-e
-
-
-
-n
-
-+6000M
-n
-
-
-a
-1
-w
-EOF
-
-# vim: ai:et:ts=2:sw=2:sts=2:tw=78:ft=sh
 #
 # description:  针对 8G 优盘进行自动分区
 # author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
+# modified:     2011 Aug 15
 #
 
 CMD=fdisk
-DEVICE=/dev/sdc
+DEVICE=/dev/sdb
 
 sudo "$CMD" "$DEVICE" <<'EOF'
 n
 #
 # description:  利用 ucloner 还原 ubox 系统
 # author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
+# modified:     2011 Aug 15
 #
 
 #-- 配置目标盘 --#
 # 硬盘
 HDD=/dev/sda
 # 优盘
-UFD=/dev/sdc
+UFD=/dev/sdb
 
 #-- 所需程序路径 --#
 BASE="$HOME"/tools
 TYPE="$2"
 
 usage () {
-  echo "用法: $(basename $0) backup | restore <hdd | ssd | ssh16> | clone | udisk"
+  echo "用法: $(basename $0) backup | restore <hdd | ssd> | clone | udisk"
   echo
   echo "选项:"
   echo "  backup  备份当前系统"
   echo "  restore 还原系统"
   echo "    hdd   还原到传统硬盘"
-  echo "    ssd   还原到 30G 固态硬盘"
-  echo "    ssh16 还原到 16G 固态硬盘"
+  echo "    ssd   还原到固态硬盘"
   echo "  clone   克隆当前系统"
   echo "  udisk   还原到优盘"
 }
 
 case "$ACTION" in
   backup)
-    sudo ./ucloner_cmd.py mode=backup backup_to="$BASE"/"$NAME".squashfs
+    sudo ./ucloner_cmd.py mode=backup backup_to="$BASE"/ucloner/"$NAME".squashfs
     ;;
   restore)
     if [ -n $(ls /dev/sdb) ]; then
         /="$HDD"1 /_fs=ext4 \
         /tmp="$HDD"2 /tmp_fs=ext4 \
         /var="$HDD"3 /var_fs=ext4 \
-        /home="$HDD"5 /home_fs=ext4 \
-        swap="$HDD"6 \
+        /home="$HDD"6 /home_fs=ext4 \
+        swap="$HDD"5 \
         grubdev="$HDD"
     else
       echo "请安装硬盘先."
       /="$HDD"1 /_fs=ext4 \
       /tmp="$HDD"2 /tmp_fs=ext4 \
       /var="$HDD"3 /var_fs=ext4 \
-      /home="$HDD"5 /home_fs=ext4 \
-      swap="$HDD"6 \
+      /home="$HDD"6 /home_fs=ext4 \
+      swap="$HDD"5 \
       grubdev="$HDD" \
       exclude=/home/ubox/ucloner
     ;;

run_resssd16.sh

-#!/bin/sh
-#
-# description:  利用 ucloner 还原 ubox 系统 (16G 固态硬盘)
-# author:       Xu Xiaodong <xxdlhy@gmail.com>
-# modified:     2011 Aug 14
-#
-
-PROG="$HOME"/tools/resbox
-
-if [ -d $PORG ]; then
-  cd "$PROG"
-  ./resbox restore ssd16
-else
-  echo "目录 $PROG 不存在."
-  exit 1
-fi
-
-sleep 5m
-
-# vim: ai:et:ts=2:sw=2:sts=2:tw=78:ft=sh
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.