Changeset 196 in MondoRescue for branches/2.05/mindi/aux-tools
- Timestamp:
- Dec 14, 2005, 12:04:21 AM (19 years ago)
- Location:
- branches/2.05/mindi/aux-tools/sbin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.05/mindi/aux-tools/sbin/calc-disk-size
r30 r196 6 6 CalcDiskSize() { 7 7 local res cylinders sectorsize disksize i curr stub out 8 res=` fdisk -l $1 2> /dev/null | grep -i "cylinders of"`8 res=`parted2fdisk -l $1 2> /dev/null | grep -i "cylinders of"` 9 9 cylinders=`echo "$res" | cut -d' ' -f5` 10 10 sectorsize=`echo "$res" | cut -d' ' -f7` 11 cylindermod=` fdisk -l $1 2> /dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info11 cylindermod=`parted2fdisk -l $1 2> /dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info 12 12 cylnum=`echo "$cylindermod" | cut -d' ' -f7` 13 13 predisksize=$(($cylinders*$sectorsize/1024)) -
branches/2.05/mindi/aux-tools/sbin/format-and-kludge-vfat
r85 r196 28 28 device=$1 29 29 drive=$2 30 ftype=` fdisk -l $drive | grep $device | tr '*' ' ' | tr -s '\t' ' ' | cut -d' ' -f5`30 ftype=`parted2fdisk -l $drive | grep $device | tr '*' ' ' | tr -s '\t' ' ' | cut -d' ' -f5` 31 31 case $ftype in 32 32 # "b" | "c")
Note:
See TracChangeset
for help on using the changeset viewer.