Advertisement
lumpynose

beaglebone black setup_sdcard.sh changes context diff

Feb 16th, 2014
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.81 KB | None | 0 0
  1. *** setup_sdcard.sh_bak 2014-01-24 14:42:10.000000000 -0800
  2. --- setup_sdcard.sh     2014-02-16 15:56:51.272797370 -0800
  3. ***************
  4. *** 472,478 ****
  5.         echo "-----------------------------"
  6.  
  7.         LC_ALL=C sfdisk --force --in-order --Linux --unit M "${media}" <<-__EOF__
  8. !               ${conf_boot_startmb},${conf_boot_endmb},${sfdisk_fstype},*
  9.                 ,,,-
  10.         __EOF__
  11.  
  12. --- 472,479 ----
  13.         echo "-----------------------------"
  14.  
  15.         LC_ALL=C sfdisk --force --in-order --Linux --unit M "${media}" <<-__EOF__
  16. !               ${conf_boot_endmb},${conf_boot_endmb},${sfdisk_fstype},*
  17. !               ,1000,S
  18.                 ,,,-
  19.         __EOF__
  20.  
  21. ***************
  22. *** 499,505 ****
  23.  
  24.   format_partition_error () {
  25.         echo "LC_ALL=C ${mkfs} ${media_prefix}1 ${mkfs_label}"
  26. !       echo "LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}2 ${ROOTFS_LABEL}"
  27.         echo "Failure: formating partition"
  28.         exit
  29.   }
  30. --- 500,506 ----
  31.  
  32.   format_partition_error () {
  33.         echo "LC_ALL=C ${mkfs} ${media_prefix}1 ${mkfs_label}"
  34. !       echo "LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}3 ${ROOTFS_LABEL}"
  35.         echo "Failure: formating partition"
  36.         exit
  37.   }
  38. ***************
  39. *** 514,521 ****
  40.   format_rootfs_partition () {
  41.         echo "Formating rootfs Partition as ${ROOTFS_TYPE}"
  42.         echo "-----------------------------"
  43. !       LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}2 -L ${ROOTFS_LABEL} || format_partition_error
  44.         sync
  45.   }
  46.  
  47.   create_partitions () {
  48. --- 515,524 ----
  49.   format_rootfs_partition () {
  50.         echo "Formating rootfs Partition as ${ROOTFS_TYPE}"
  51.         echo "-----------------------------"
  52. !       LC_ALL=C mkfs.${ROOTFS_TYPE} -q ${media_prefix}3 -L ${ROOTFS_LABEL} || format_partition_error
  53.         sync
  54. +
  55. +       LC_ALL=C mkswap ${media_prefix}2
  56.   }
  57.  
  58.   create_partitions () {
  59. ***************
  60. *** 822,830 ****
  61.         fi
  62.  
  63.         partprobe ${media}
  64. !       if ! mount -t ${ROOTFS_TYPE} ${media_prefix}2 ${TEMPDIR}/disk; then
  65.                 echo "-----------------------------"
  66. !               echo "Unable to mount ${media_prefix}2 at ${TEMPDIR}/disk to complete populating rootfs Partition"
  67.                 echo "Please retry running the script, sometimes rebooting your system helps."
  68.                 echo "-----------------------------"
  69.                 exit
  70. --- 825,833 ----
  71.         fi
  72.  
  73.         partprobe ${media}
  74. !       if ! mount -t ${ROOTFS_TYPE} ${media_prefix}3 ${TEMPDIR}/disk; then
  75.                 echo "-----------------------------"
  76. !               echo "Unable to mount ${media_prefix}3 at ${TEMPDIR}/disk to complete populating rootfs Partition"
  77.                 echo "Please retry running the script, sometimes rebooting your system helps."
  78.                 echo "-----------------------------"
  79.                 exit
  80. ***************
  81. *** 860,866 ****
  82.                 if [ "${BTRFS_FSTAB}" ] ; then
  83.                         echo "/dev/mmcblk0p2  /            btrfs  defaults  0  1" >> ${TEMPDIR}/disk/etc/fstab
  84.                 else
  85. !                       echo "/dev/mmcblk0p2  /            ${ROOTFS_TYPE}  noatime,errors=remount-ro  0  1" >> ${TEMPDIR}/disk/etc/fstab
  86.                 fi
  87.                 echo "/dev/mmcblk0p1  /boot/uboot  auto  defaults                   0  0" >> ${TEMPDIR}/disk/etc/fstab
  88.                 echo "debugfs         /sys/kernel/debug  debugfs  defaults          0  0" >> ${TEMPDIR}/disk/etc/fstab
  89. --- 863,870 ----
  90.                 if [ "${BTRFS_FSTAB}" ] ; then
  91.                         echo "/dev/mmcblk0p2  /            btrfs  defaults  0  1" >> ${TEMPDIR}/disk/etc/fstab
  92.                 else
  93. !                       echo "/dev/sda3  /            ${ROOTFS_TYPE}  errors=remount-ro  0  1" >> ${TEMPDIR}/disk/etc/fstab
  94. !                       echo "/dev/sda2  none            swap         sw                 0  0" >> ${TEMPDIR}/disk/etc/fstab
  95.                 fi
  96.                 echo "/dev/mmcblk0p1  /boot/uboot  auto  defaults                   0  0" >> ${TEMPDIR}/disk/etc/fstab
  97.                 echo "debugfs         /sys/kernel/debug  debugfs  defaults          0  0" >> ${TEMPDIR}/disk/etc/fstab
  98. ***************
  99. *** 1020,1026 ****
  100.                 echo "Background: usually occured in days before Ubuntu Lucid.."
  101.                 echo "-----------------------------"
  102.  
  103. !               SPACE_LEFT=$(df ${TEMPDIR}/disk/ | grep ${media_prefix}2 | awk '{print $4}')
  104.                 let SIZE=${SWAP_SIZE}*1024
  105.  
  106.                 if [ ${SPACE_LEFT} -ge ${SIZE} ] ; then
  107. --- 1024,1030 ----
  108.                 echo "Background: usually occured in days before Ubuntu Lucid.."
  109.                 echo "-----------------------------"
  110.  
  111. !               SPACE_LEFT=$(df ${TEMPDIR}/disk/ | grep ${media_prefix}3 | awk '{print $4}')
  112.                 let SIZE=${SWAP_SIZE}*1024
  113.  
  114.                 if [ ${SPACE_LEFT} -ge ${SIZE} ] ; then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement