perl-5.22
Last change
on this file since 548499b was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | #Syn-3 diskinit (C)2005 DatuX |
---|
3 | #-Combine all the specified partitions into a Syn-3 bootable md0 device. |
---|
4 | #-Partitions should be type FD |
---|
5 | |
---|
6 | . dialoglib.sh || exit 1 |
---|
7 | |
---|
8 | exec 2>&1 |
---|
9 | |
---|
10 | |
---|
11 | PART_COUNT=0 |
---|
12 | for PART in $*; do |
---|
13 | echo -e "\n* Clearing parition $PART:" |
---|
14 | |
---|
15 | #remove raid partition superblocks |
---|
16 | #(may fail) |
---|
17 | mdadm --misc --zero-superblock --force $PART &>/dev/null |
---|
18 | |
---|
19 | #remove other confusing stuff thats in the partition |
---|
20 | dd if=/dev/zero of=$PART count=1 &>/dev/null || exit 1 |
---|
21 | (( PART_COUNT++ )) |
---|
22 | |
---|
23 | done |
---|
24 | |
---|
25 | # create BOOT raid array md0, always RAID 1 |
---|
26 | # We create 5 extra missing discs, so that all new discs automatically |
---|
27 | # become bootable. (we don't want hot spares for md0!) |
---|
28 | echo -e "\n* Creating Boot RAID ARRAY (md0):" |
---|
29 | (( TOTAL = PART_COUNT + 5 )) |
---|
30 | mdadm --create --run --metadata=1.0 -l1 -n$TOTAL -amd /dev/md0 $* missing missing missing missing missing || exit 1 |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | ####################### Create filesystems |
---|
36 | # Boot will be in /dev/md0 |
---|
37 | |
---|
38 | #create filesystems |
---|
39 | echo -e "\n* Creating filesystem:" |
---|
40 | ##clear all previous xfs superblock, if its still there |
---|
41 | ##dd if=/dev/zero of=/dev/md0 bs=1M count=1 &>/dev/null |
---|
42 | mkfs.ext3 -F -O '^64bit' /dev/md0 -L BOOT || exit 1 |
---|
43 | |
---|
44 | |
---|
45 | echo -e "\n* DONE" |
---|
46 | #release the flying monkeys: |
---|
47 | exit 0 |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.