142 |
# If user specifies "noraid", then useRAID = False; otherwise, useRAID = True |
# If user specifies "noraid", then useRAID = False; otherwise, useRAID = True |
143 |
# If useRAID = False below, then RAID1 won't be used |
# If useRAID = False below, then RAID1 won't be used |
144 |
|
|
145 |
useRAID_flag = not flags.cmdline.has_key("noraid") |
if flags.cmdline.has_key("noraid"): |
146 |
|
raidLevel = "none" |
147 |
|
else: |
148 |
|
raidLevel = "1" |
149 |
|
if flags.cmdline.has_key("raid") and flags.cmdline["raid"] in ["none","0","1","5","6"]: |
150 |
|
raidLevel = flags.cmdline["raid"] |
151 |
|
|
152 |
fstype = "ext4" |
fstype = "ext4" |
153 |
if flags.cmdline.has_key("ext3"): |
if flags.cmdline.has_key("ext3"): |
157 |
# Manually specify fstype = ext3/ext4 and size = 250 MB |
# Manually specify fstype = ext3/ext4 and size = 250 MB |
158 |
# (Platform default is fstype ext4 and size = 500 MB) |
# (Platform default is fstype ext4 and size = 500 MB) |
159 |
|
|
160 |
autorequests.append(PartSpec(mountpoint="/boot", fstype=fstype, size=250, useRAID=useRAID_flag, |
autorequests.append(PartSpec(mountpoint="/boot", fstype=fstype, size=250, raidLevel=raidLevel, |
161 |
weight=platform.weight(mountpoint="/boot"))) |
weight=platform.weight(mountpoint="/boot"))) |
162 |
|
|
163 |
# / |
# / |
164 |
# Manually specify fstype = ext3/ext4 and size = 2048 MB, but growable |
# Manually specify fstype = ext3/ext4 and size = 2048 MB, but growable |
165 |
|
|
166 |
autorequests.append(PartSpec(mountpoint="/", fstype=fstype, size=2048, useRAID=useRAID_flag, |
autorequests.append(PartSpec(mountpoint="/", fstype=fstype, size=2048, raidLevel=raidLevel, |
167 |
grow=True, asVol=asVol_flag)) |
grow=True, asVol=asVol_flag)) |
168 |
|
|
169 |
# swap |
# swap |
170 |
# Manually specify fstype = swap and minswap < size < maxswap (growable) |
# Manually specify fstype = swap and minswap < size < maxswap (growable) |
171 |
|
|
172 |
(minswap, maxswap) = iutil.swapSuggestion() |
(minswap, maxswap) = iutil.swapSuggestion() |
173 |
autorequests.append(PartSpec(fstype="swap", size=minswap, maxSize=maxswap, useRAID=useRAID_flag, |
autorequests.append(PartSpec(fstype="swap", size=minswap, maxSize=maxswap, raidLevel=raidLevel, |
174 |
grow=True, asVol=asVol_flag)) |
grow=True, asVol=asVol_flag)) |
175 |
|
|
176 |
storage.autoPartitionRequests = autorequests |
storage.autoPartitionRequests = autorequests |