]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/usb/src/scripts/formatallscript
Add new usb rescue key code
[bacula/rescue] / rescue / linux / usb / src / scripts / formatallscript
1 . ./unmount-all
2 #
3 #  Format all partitions on disk sda -- created by getdiskinfo
4 #
5 echo ""
6 echo "This script will format all partitions on disk sda."
7 echo ""
8 echo "IT WILL DESTROY ALL DATA ON DISK sda !!!!"
9 echo ""
10 if [ ! -f noprompt ];then
11 echo -n "Are you sure you want to continue? yes/no: "
12 read a
13 if [ x$a != xyes ] ; then
14    exit 1
15 fi 
16 fi
17 if [ ! -f badblocksnoprompt ];then
18 echo "Do you want to do a disk check for bad blocks?"
19 echo -n "It is recommended, but takes time. yes/no: "
20 read a
21 if [ x$a = xyes ] ; then
22   check="-c"
23 else
24    check=
25 fi
26 fi
27 # Format all partitions on disk /dev/sda -- created by getdiskinfo
28 echo "This script will format all partitions on disk /dev/sda."
29 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sda !!!!"
30 echo "Formatting /dev/sda5 -- swap partition"
31 mkswap -U dbe43254-f760-4685-93f0-99f81549b085 /dev/sda5
32 echo "Formating /dev/sda1 -- ext3 partition"
33 mkfs.ext3 -v -j $check -U bbd25d01-3f39-43f1-9266-ca272fcce5c1 /dev/sda1
34 . ./unmount-all
35 #
36 #  Format all partitions on disk sdb -- created by getdiskinfo
37 #
38 echo ""
39 echo "This script will format all partitions on disk sdb."
40 echo ""
41 echo "IT WILL DESTROY ALL DATA ON DISK sdb !!!!"
42 echo ""
43 if [ ! -f noprompt ];then
44 echo -n "Are you sure you want to continue? yes/no: "
45 read a
46 if [ x$a != xyes ] ; then
47    exit 1
48 fi 
49 fi
50 if [ ! -f badblocksnoprompt ];then
51 echo "Do you want to do a disk check for bad blocks?"
52 echo -n "It is recommended, but takes time. yes/no: "
53 read a
54 if [ x$a = xyes ] ; then
55   check="-c"
56 else
57    check=
58 fi
59 fi
60 # Format all partitions on disk /dev/sdb -- created by getdiskinfo
61 echo "This script will format all partitions on disk /dev/sdb."
62 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdb !!!!"
63 echo "Formating /dev/sdb1 -- vfat partition"
64 mkfs.vfat $check -n sdb1fat -i 4AF1B654 /dev/sdb1
65 . ./unmount-all
66 #
67 #  Format all partitions on disk sdc -- created by getdiskinfo
68 #
69 echo ""
70 echo "This script will format all partitions on disk sdc."
71 echo ""
72 echo "IT WILL DESTROY ALL DATA ON DISK sdc !!!!"
73 echo ""
74 if [ ! -f noprompt ];then
75 echo -n "Are you sure you want to continue? yes/no: "
76 read a
77 if [ x$a != xyes ] ; then
78    exit 1
79 fi 
80 fi
81 if [ ! -f badblocksnoprompt ];then
82 echo "Do you want to do a disk check for bad blocks?"
83 echo -n "It is recommended, but takes time. yes/no: "
84 read a
85 if [ x$a = xyes ] ; then
86   check="-c"
87 else
88    check=
89 fi
90 fi
91 # Format all partitions on disk /dev/sdc -- created by getdiskinfo
92 echo "This script will format all partitions on disk /dev/sdc."
93 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdc !!!!"
94 echo "Formating /dev/sdc2 -- xfs partition"
95 mkfs.xfs -f $check -L sdc2_xfs /dev/sdc2
96 xfs_admin -U 2dbb53c3-8eaa-4558-9e1e-aa78fe5a3fe9 /dev/sdc2
97 . ./unmount-all
98 #
99 #  Format all partitions on disk sdd -- created by getdiskinfo
100 #
101 echo ""
102 echo "This script will format all partitions on disk sdd."
103 echo ""
104 echo "IT WILL DESTROY ALL DATA ON DISK sdd !!!!"
105 echo ""
106 if [ ! -f noprompt ];then
107 echo -n "Are you sure you want to continue? yes/no: "
108 read a
109 if [ x$a != xyes ] ; then
110    exit 1
111 fi 
112 fi
113 if [ ! -f badblocksnoprompt ];then
114 echo "Do you want to do a disk check for bad blocks?"
115 echo -n "It is recommended, but takes time. yes/no: "
116 read a
117 if [ x$a = xyes ] ; then
118   check="-c"
119 else
120    check=
121 fi
122 fi
123 # Format all partitions on disk /dev/sdd -- created by getdiskinfo
124 echo "This script will format all partitions on disk /dev/sdd."
125 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdd !!!!"
126 echo "Formating /dev/sdd1 -- reiser partition"
127 mkreiserfs -u 029b460c-28d3-4aac-9740-41e7eb6b48dd /dev/sdd1
128 . ./unmount-all
129 #
130 #  Format all partitions on disk sde -- created by getdiskinfo
131 #
132 echo ""
133 echo "This script will format all partitions on disk sde."
134 echo ""
135 echo "IT WILL DESTROY ALL DATA ON DISK sde !!!!"
136 echo ""
137 if [ ! -f noprompt ];then
138 echo -n "Are you sure you want to continue? yes/no: "
139 read a
140 if [ x$a != xyes ] ; then
141    exit 1
142 fi 
143 fi
144 if [ ! -f badblocksnoprompt ];then
145 echo "Do you want to do a disk check for bad blocks?"
146 echo -n "It is recommended, but takes time. yes/no: "
147 read a
148 if [ x$a = xyes ] ; then
149   check="-c"
150 else
151    check=
152 fi
153 fi
154 # Format all partitions on disk /dev/sde -- created by getdiskinfo
155 echo "This script will format all partitions on disk /dev/sde."
156 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sde !!!!"
157 echo "Formating /dev/sde1 -- hfs partition"
158 mkfs.hfs $check -v sde1_hfs /dev/sde1
159 echo "Formating /dev/sde2 -- ntfs partition"
160 mkfs.ntfs $check -L sde2_ntfs /dev/sde2
161 . ./unmount-all
162 #
163 #  Format all partitions on disk sdf -- created by getdiskinfo
164 #
165 echo ""
166 echo "This script will format all partitions on disk sdf."
167 echo ""
168 echo "IT WILL DESTROY ALL DATA ON DISK sdf !!!!"
169 echo ""
170 if [ ! -f noprompt ];then
171 echo -n "Are you sure you want to continue? yes/no: "
172 read a
173 if [ x$a != xyes ] ; then
174    exit 1
175 fi 
176 fi
177 if [ ! -f badblocksnoprompt ];then
178 echo "Do you want to do a disk check for bad blocks?"
179 echo -n "It is recommended, but takes time. yes/no: "
180 read a
181 if [ x$a = xyes ] ; then
182   check="-c"
183 else
184    check=
185 fi
186 fi
187 # Format all partitions on disk /dev/sdf -- created by getdiskinfo
188 echo "This script will format all partitions on disk /dev/sdf."
189 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdf !!!!"
190 . ./unmount-all
191 #
192 #  Format all partitions on disk sdg -- created by getdiskinfo
193 #
194 echo ""
195 echo "This script will format all partitions on disk sdg."
196 echo ""
197 echo "IT WILL DESTROY ALL DATA ON DISK sdg !!!!"
198 echo ""
199 if [ ! -f noprompt ];then
200 echo -n "Are you sure you want to continue? yes/no: "
201 read a
202 if [ x$a != xyes ] ; then
203    exit 1
204 fi 
205 fi
206 if [ ! -f badblocksnoprompt ];then
207 echo "Do you want to do a disk check for bad blocks?"
208 echo -n "It is recommended, but takes time. yes/no: "
209 read a
210 if [ x$a = xyes ] ; then
211   check="-c"
212 else
213    check=
214 fi
215 fi
216 # Format all partitions on disk /dev/sdg -- created by getdiskinfo
217 echo "This script will format all partitions on disk /dev/sdg."
218 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdg !!!!"
219 . ./unmount-all
220 #
221 #  Format all partitions on disk sdh -- created by getdiskinfo
222 #
223 echo ""
224 echo "This script will format all partitions on disk sdh."
225 echo ""
226 echo "IT WILL DESTROY ALL DATA ON DISK sdh !!!!"
227 echo ""
228 if [ ! -f noprompt ];then
229 echo -n "Are you sure you want to continue? yes/no: "
230 read a
231 if [ x$a != xyes ] ; then
232    exit 1
233 fi 
234 fi
235 if [ ! -f badblocksnoprompt ];then
236 echo "Do you want to do a disk check for bad blocks?"
237 echo -n "It is recommended, but takes time. yes/no: "
238 read a
239 if [ x$a = xyes ] ; then
240   check="-c"
241 else
242    check=
243 fi
244 fi
245 # Format all partitions on disk /dev/sdh -- created by getdiskinfo
246 echo "This script will format all partitions on disk /dev/sdh."
247 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdh !!!!"
248 . ./unmount-all
249 #
250 #  Format all partitions on disk sdi -- created by getdiskinfo
251 #
252 echo ""
253 echo "This script will format all partitions on disk sdi."
254 echo ""
255 echo "IT WILL DESTROY ALL DATA ON DISK sdi !!!!"
256 echo ""
257 if [ ! -f noprompt ];then
258 echo -n "Are you sure you want to continue? yes/no: "
259 read a
260 if [ x$a != xyes ] ; then
261    exit 1
262 fi 
263 fi
264 if [ ! -f badblocksnoprompt ];then
265 echo "Do you want to do a disk check for bad blocks?"
266 echo -n "It is recommended, but takes time. yes/no: "
267 read a
268 if [ x$a = xyes ] ; then
269   check="-c"
270 else
271    check=
272 fi
273 fi
274 # Format all partitions on disk /dev/sdi -- created by getdiskinfo
275 echo "This script will format all partitions on disk /dev/sdi."
276 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdi !!!!"
277 . ./unmount-all
278 #
279 #  Format all partitions on disk sdj -- created by getdiskinfo
280 #
281 echo ""
282 echo "This script will format all partitions on disk sdj."
283 echo ""
284 echo "IT WILL DESTROY ALL DATA ON DISK sdj !!!!"
285 echo ""
286 if [ ! -f noprompt ];then
287 echo -n "Are you sure you want to continue? yes/no: "
288 read a
289 if [ x$a != xyes ] ; then
290    exit 1
291 fi 
292 fi
293 if [ ! -f badblocksnoprompt ];then
294 echo "Do you want to do a disk check for bad blocks?"
295 echo -n "It is recommended, but takes time. yes/no: "
296 read a
297 if [ x$a = xyes ] ; then
298   check="-c"
299 else
300    check=
301 fi
302 fi
303 # Format all partitions on disk /dev/sdj -- created by getdiskinfo
304 echo "This script will format all partitions on disk /dev/sdj."
305 echo "IT WILL DESTROY ALL DATA ON DISK /dev/sdj !!!!"
306 #!/bin/sh
307 #
308 #  Format all partitions on VG datavg -- created by getdiskinfo
309 #
310 echo ""
311 echo "This script will format all LVs on VG datavg."
312 echo ""
313 echo "IT WILL DESTROY ALL DATA ON DISK datavg !!!!"
314 echo ""
315 if [ ! -f noprompt ];then
316 echo -n "Are you sure you want to continue? yes/no: "
317 read a
318 if [ x$a != xyes ] ; then
319    exit 1
320 fi
321 fi
322 if [ ! -f badblocksnoprompt ];then
323 echo "Do you want to do a disk check for bad blocks?"
324 echo -n "It is recommended, but takes time. yes/no: "
325 read a
326 if [ x$a = xyes ] ; then
327    check="-c"
328 else
329    check=
330 fi
331 else
332 check=
333 fi
334 echo "Formating /dev/mapper/datavg-datalv -- ext3 partition"
335 mkfs.ext3 -v -j $check -U e2af2f6e-e1b2-4fe9-87d6-41f5d6edec94 /dev/mapper/datavg-datalv
336 echo ""