Skip to content
Permalink
Browse files

Fix PReP format.

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
Dinar Valeev committed Apr 20, 2015
1 parent 69c6dff commit 706cbf6a65919bb3bee0576936996a486fda0670
Showing with 16 additions and 3 deletions.
  1. +6 −0 package/autoyast2.changes
  2. +1 −1 package/autoyast2.spec
  3. +9 −2 src/include/autoinstall/autopart.rb
@@ -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

@@ -17,7 +17,7 @@


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

BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -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)
@@ -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)
@@ -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")

0 comments on commit 706cbf6

Please sign in to comment.
You can’t perform that action at this time.