Skip to content

Commit

Permalink
Fix PReP format.
Browse files Browse the repository at this point in the history
PReP partitions are raw partitions, and shouldn't be formated.
Extend fsid_bios_grub check with GPT and DOS PReP partitions.

bsc#927748

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
  • Loading branch information
Dinar Valeev committed May 11, 2015
1 parent 69c6dff commit 706cbf6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri May 11 14:39:27 CEST 2015 - dvaleev@suse.com

- Don't try to format PReP partitions (bsc#927748)
- 3.1.80

-------------------------------------------------------------------
Fri May 8 09:45:27 CEST 2015 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: autoyast2
Version: 3.1.79
Version: 3.1.80
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
11 changes: 9 additions & 2 deletions src/include/autoinstall/autopart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def propose_default_fs?(partition)
valid_fsids.include?(partition["filesystem_id"])
end

def raw_partition?(partition)
valid_fsids = [Partitions.fsid_bios_grub,
Partitions.fsid_prep_chrp_boot,
Partitions.fsid_gpt_prep]
valid_fsids.include?(partition["filesystem_id"])
end
# Read partition data from XML control file
# @return [Hash] flexible propsal map
def preprocess_partition_config(xmlflex)
Expand Down Expand Up @@ -228,8 +234,8 @@ def preprocess_partition_config(xmlflex)
end
end

# Do not format BIOS Grup partitions
partition["format"] = false if partition["filesystem_id"] == Partitions.fsid_bios_grub
# Do not format raw partitions
partition["format"] = false if raw_partition?(partition)

if Ops.get_integer(partition, "size", 0) == -1
Ops.set(partition, "size", 0)
Expand Down Expand Up @@ -292,6 +298,7 @@ def try_add_boot(conf, disk)
Ops.set(pb, "fsid", Partitions.FsidBoot(dlabel)) # FIXME: might be useless
Ops.set(pb, "filesystem_id", Partitions.FsidBoot(dlabel))
Ops.set(pb, "id", Partitions.FsidBoot(dlabel)) # FIXME: might be useless
Ops.set(pb, "format", false) if raw_partition?(pb)
Ops.set(pb, "auto_added", true)
Ops.set(pb, "type", :primary) # FIXME: might be useless
Ops.set(pb, "partition_type", "primary")
Expand Down

0 comments on commit 706cbf6

Please sign in to comment.