Hello community, here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2014-08-06 15:31:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old) and /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes 2014-07-28 06:31:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2014-08-06 15:31:50.000000000 +0200 @@ -1,0 +2,86 @@ +Wed Aug 6 08:59:52 UTC 2014 - [email protected] + +- ignore unknown priority device to avoid problems in corner case + scenarios (bnc#890364) +- 3.1.82 + +------------------------------------------------------------------- +Tue Aug 5 09:17:20 UTC 2014 - [email protected] + +- fix assigning priority disks to device map for md raid + (bnc#890246) +- fix choosing priority device causing bootloader crash + (bnc#890204) +- 3.1.81 + +------------------------------------------------------------------- +Fri Aug 1 07:37:50 UTC 2014 - [email protected] + +- fixed bootloader installation (bnc#889770) +- 3.1.80 + +------------------------------------------------------------------- +Thu Jul 31 14:01:43 UTC 2014 - [email protected] + +- Disk order dialog: + - fix non-working up button (bnc#885867) + - fix enabling/disabling up/down buttons in various situations + - when adding new device set focus to input field to better UX +- 3.1.79 + +------------------------------------------------------------------- +Thu Jul 31 12:40:37 UTC 2014 - [email protected] + +- reinit branding in upgrade of SLE-12 as it is overwritten + (bnc#879686) +- 3.1.78 + +------------------------------------------------------------------- +Thu Jul 31 06:48:59 UTC 2014 - [email protected] + +- fix crash in bootloader caused by wrong device in device map + (bnc#889670) +- 3.1.77 + +------------------------------------------------------------------- +Wed Jul 30 14:03:18 CEST 2014 - [email protected] + +- Fixed error popup for unsupported bootloader in autoyast. + (bnc#889538) +- 3.1.76 + +------------------------------------------------------------------- +Wed Jul 30 08:20:59 UTC 2014 - [email protected] + +- Added a missing call to i18n for a string (bnc#887553) +- 3.1.75 + +------------------------------------------------------------------- +Wed Jul 30 06:30:40 UTC 2014 - [email protected] + +- Fix crash if during proposal some device map value is nil + ( found by openQA ) +- 3.1.74 + +------------------------------------------------------------------- +Tue Jul 29 09:23:34 UTC 2014 - [email protected] + +- Always use device with /boot as first device in device map to + avoid problems with other MBRs (bnc#887808, bnc#880439) +- 3.1.73 + +------------------------------------------------------------------- + +Mon Jul 28 07:18:47 UTC 2014 - [email protected] + +- fix proposing disabledos prober on certain products (SLES is + affected) (bnc#884007) +- 3.1.72 + +------------------------------------------------------------------- +Mon Jul 28 09:14:18 CEST 2014 - [email protected] + +- enable secure boot by default (bnc #879486) +- 3.1.71 + +------------------------------------------------------------------- Old: ---- yast2-bootloader-3.1.70.tar.bz2 New: ---- yast2-bootloader-3.1.82.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-bootloader.spec ++++++ --- /var/tmp/diff_new_pack.TmuBbc/_old 2014-08-06 15:31:51.000000000 +0200 +++ /var/tmp/diff_new_pack.TmuBbc/_new 2014-08-06 15:31:51.000000000 +0200 @@ -17,12 +17,13 @@ Name: yast2-bootloader -Version: 3.1.70 +Version: 3.1.82 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 +Url: http://github.com/yast/yast-bootloader BuildRequires: rubygem-rspec BuildRequires: update-desktop-files BuildRequires: yast2 >= 3.1.0 @@ -121,7 +122,6 @@ %{yast_ybindir}/* %dir %{yast_scrconfdir} %{yast_scrconfdir}/*.scr -%dir %{yast_fillupdir} %{yast_fillupdir}/* %dir %{yast_schemadir} %dir %{yast_schemadir}/autoyast @@ -133,6 +133,7 @@ %doc %{yast_docdir}/COPYING %files devel-doc +%defattr(-,root,root) %doc %{yast_docdir}/autodocs %changelog ++++++ yast2-bootloader-3.1.70.tar.bz2 -> yast2-bootloader-3.1.82.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/package/yast2-bootloader.changes new/yast2-bootloader-3.1.82/package/yast2-bootloader.changes --- old/yast2-bootloader-3.1.70/package/yast2-bootloader.changes 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/package/yast2-bootloader.changes 2014-08-06 11:17:45.000000000 +0200 @@ -1,4 +1,90 @@ ------------------------------------------------------------------- +Wed Aug 6 08:59:52 UTC 2014 - [email protected] + +- ignore unknown priority device to avoid problems in corner case + scenarios (bnc#890364) +- 3.1.82 + +------------------------------------------------------------------- +Tue Aug 5 09:17:20 UTC 2014 - [email protected] + +- fix assigning priority disks to device map for md raid + (bnc#890246) +- fix choosing priority device causing bootloader crash + (bnc#890204) +- 3.1.81 + +------------------------------------------------------------------- +Fri Aug 1 07:37:50 UTC 2014 - [email protected] + +- fixed bootloader installation (bnc#889770) +- 3.1.80 + +------------------------------------------------------------------- +Thu Jul 31 14:01:43 UTC 2014 - [email protected] + +- Disk order dialog: + - fix non-working up button (bnc#885867) + - fix enabling/disabling up/down buttons in various situations + - when adding new device set focus to input field to better UX +- 3.1.79 + +------------------------------------------------------------------- +Thu Jul 31 12:40:37 UTC 2014 - [email protected] + +- reinit branding in upgrade of SLE-12 as it is overwritten + (bnc#879686) +- 3.1.78 + +------------------------------------------------------------------- +Thu Jul 31 06:48:59 UTC 2014 - [email protected] + +- fix crash in bootloader caused by wrong device in device map + (bnc#889670) +- 3.1.77 + +------------------------------------------------------------------- +Wed Jul 30 14:03:18 CEST 2014 - [email protected] + +- Fixed error popup for unsupported bootloader in autoyast. + (bnc#889538) +- 3.1.76 + +------------------------------------------------------------------- +Wed Jul 30 08:20:59 UTC 2014 - [email protected] + +- Added a missing call to i18n for a string (bnc#887553) +- 3.1.75 + +------------------------------------------------------------------- +Wed Jul 30 06:30:40 UTC 2014 - [email protected] + +- Fix crash if during proposal some device map value is nil + ( found by openQA ) +- 3.1.74 + +------------------------------------------------------------------- +Tue Jul 29 09:23:34 UTC 2014 - [email protected] + +- Always use device with /boot as first device in device map to + avoid problems with other MBRs (bnc#887808, bnc#880439) +- 3.1.73 + +------------------------------------------------------------------- + +Mon Jul 28 07:18:47 UTC 2014 - [email protected] + +- fix proposing disabledos prober on certain products (SLES is + affected) (bnc#884007) +- 3.1.72 + +------------------------------------------------------------------- +Mon Jul 28 09:14:18 CEST 2014 - [email protected] + +- enable secure boot by default (bnc #879486) +- 3.1.71 + +------------------------------------------------------------------- Fri Jul 25 16:11:37 UTC 2014 - [email protected] - allow change of bootloader proposal during upgrade (bnc#887015) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/package/yast2-bootloader.spec new/yast2-bootloader-3.1.82/package/yast2-bootloader.spec --- old/yast2-bootloader-3.1.70/package/yast2-bootloader.spec 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/package/yast2-bootloader.spec 2014-08-06 11:17:45.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-bootloader -Version: 3.1.70 +Version: 3.1.82 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -25,6 +25,7 @@ Group: System/YaST License: GPL-2.0+ +Url: http://github.com/yast/yast-bootloader BuildRequires: yast2-devtools >= 3.1.10 BuildRequires: yast2 >= 3.1.0 BuildRequires: update-desktop-files @@ -106,7 +107,6 @@ %{yast_ybindir}/* %dir %{yast_scrconfdir} %{yast_scrconfdir}/*.scr -%dir %{yast_fillupdir} %{yast_fillupdir}/* %dir %{yast_schemadir} %dir %{yast_schemadir}/autoyast @@ -118,5 +118,6 @@ %doc %{yast_docdir}/COPYING %files devel-doc +%defattr(-,root,root) %doc %{yast_docdir}/autodocs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/clients/bootloader_finish.rb new/yast2-bootloader-3.1.82/src/clients/bootloader_finish.rb --- old/yast2-bootloader-3.1.70/src/clients/bootloader_finish.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/clients/bootloader_finish.rb 2014-08-06 11:17:45.000000000 +0200 @@ -214,6 +214,18 @@ @ret = nil end + # FIXME workaround grub2 in upgrade need manual rerun of branding + # package. see bnc#879686 + if Mode.update && Bootloader.getLoaderType =~ /grub2/ + prefix = Installation.destdir + branding_activator = Dir["#{prefix}/usr/share/grub2/themes/*/activate-theme"].first + if branding_activator + branding_activator = branding_activator[prefix.size..-1] + res = SCR.Execute(path(".target.bash_output"), branding_activator) + Builtins.y2milestone("Reactivate branding with #{branding_activator} and result #{res}") + end + end + Builtins.y2debug("ret=%1", @ret) Builtins.y2milestone("bootloader_finish finished") deep_copy(@ret) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/include/bootloader/grub/helps.rb new/yast2-bootloader-3.1.82/src/include/bootloader/grub/helps.rb --- old/yast2-bootloader-3.1.70/src/include/bootloader/grub/helps.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/include/bootloader/grub/helps.rb 2014-08-06 11:17:45.000000000 +0200 @@ -56,7 +56,9 @@ "in <b>Boot Loader Options</b> to update the master boot record if that is needed or configure your other boot manager\n" + "to start this section.</p>" ), - "boot_extended" => "<p><b>Boot from Extended Partition</b> should be selected if your root partition is on \nlogical partition and the /boot partition is missing</p>", + "boot_extended" => _( + "<p><b>Boot from Extended Partition</b> should be selected if your root partition is on \nlogical partition and the /boot partition is missing</p>" + ), "boot_custom" => _( "<p><b>Custom Boot Partition</b> lets you choose a partition to boot from.</p>" ), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/include/bootloader/grub/options.rb new/yast2-bootloader-3.1.82/src/include/bootloader/grub/options.rb --- old/yast2-bootloader-3.1.70/src/include/bootloader/grub/options.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/include/bootloader/grub/options.rb 2014-08-06 11:17:45.000000000 +0200 @@ -464,70 +464,60 @@ VSpacing(1) ) UI.OpenDialog(popup) - pushed = Convert.to_symbol(UI.UserInput) - new_dev = Convert.to_string(UI.QueryWidget(Id(:devname), :Value)) + UI.SetFocus(:devname) + pushed = UI.UserInput + new_dev = UI.QueryWidget(Id(:devname), :Value) UI.CloseDialog - ret = "" - ret = new_dev if pushed == :ok - ret + + pushed == :ok ? new_dev : "" end def HandleDiskOrder(widget, event) - event = deep_copy(event) - action = Ops.get(event, "ID") + action = event["ID"] changed = false - disksOrder = Convert.convert( - UI.QueryWidget(Id(:disks), :Items), - :from => "any", - :to => "list <term>" - ) - current = Convert.to_string(UI.QueryWidget(Id(:disks), :CurrentItem)) + disksOrder = UI.QueryWidget(Id(:disks), :Items) + current = UI.QueryWidget(Id(:disks), :CurrentItem) pos = 0 - while Ops.less_than(pos, Builtins.size(disksOrder)) && - GetItemID(Ops.get(disksOrder, pos) { term(:Item, Id("")) }) != current - pos = Ops.add(pos, 1) + while pos < disksOrder.size && + GetItemID(disksOrder[pos] || term(:Item, Id(""))) != current + pos += 1 end + Builtins.y2debug("Calling handle disk order with action #{action} and selected on pos #{pos}") - #disabling & enabling up/down - UI.ChangeWidget( - Id(:up), - :Enabled, - Ops.greater_than(pos, 0) && - Ops.less_than(pos, Builtins.size(disksOrder)) - ) - UI.ChangeWidget( - Id(:down), - :Enabled, - Ops.less_than(pos, Ops.subtract(Builtins.size(disksOrder), 1)) - ) - if action == :up + case action + when :up changed = true - disksOrder = Builtins::List.swap(disksOrder, pos, Ops.subtract(pos, 1)) - elsif action == :down + # swap elements + disksOrder.insert(pos - 1, disksOrder.delete_at(pos)) + pos -= 1 + when :down changed = true - disksOrder = Builtins::List.swap(disksOrder, pos, Ops.add(pos, 1)) - elsif action == :delete + # swap elements + disksOrder.insert(pos + 1, disksOrder.delete_at(pos)) + pos += 1 + when :delete changed = true disksOrder = Builtins.remove(disksOrder, pos) + pos = pos > 0 ? pos -1 : 0 UI.ChangeWidget( Id(:disks), :CurrentItem, - Ops.greater_than(pos, 0) ? - GetItemID(Ops.get(disksOrder, Ops.subtract(pos, 1)) do - term(:Item, Id("")) - end) : - GetItemID(Ops.get(disksOrder, 0) { term(:Item, Id("")) }) + GetItemID(disksOrder[pos] || term(:Item, Id(""))) ) - elsif action == :add + when :add new_dev = NewDevicePopup() if new_dev != "" changed = true - disksOrder = Builtins.add(disksOrder, Item(Id(new_dev), new_dev)) + disksOrder << Item(Id(new_dev), new_dev) end end + #disabling & enabling up/down, do it after change + UI.ChangeWidget(Id(:up), :Enabled, pos > 0 && pos < disksOrder.size) + UI.ChangeWidget(Id(:down), :Enabled, pos < disksOrder.size - 1) + UI.ChangeWidget(Id(:disks), :Items, disksOrder) if changed nil @@ -550,7 +540,7 @@ HSpacing(2), VBox( VSpacing(1), - SelectionBox(Id(:disks), Opt(:notify, :immediate), _("D&isks"), []), + SelectionBox(Id(:disks), Opt(:notify), _("D&isks"), []), HBox( HStretch(), PushButton(Id(:add), Opt(:key_F3), Label.AddButton), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/include/bootloader/grub2/misc.rb new/yast2-bootloader-3.1.82/src/include/bootloader/grub2/misc.rb --- old/yast2-bootloader-3.1.70/src/include/bootloader/grub2/misc.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/include/bootloader/grub2/misc.rb 2014-08-06 11:17:45.000000000 +0200 @@ -440,7 +440,7 @@ mbr_dev = Ops.get_string(m_activate, "mbr", "") raise "INTERNAL ERROR: Data for partition to activate is invalid." if num == 0 || mbr_dev.empty? - gpt_disk = Storage.GetTargetMap[BootCommon.mbrDisk]["label"] == "gpt" + gpt_disk = Storage.GetDisk(Storage.GetTargetMap, BootCommon.mbrDisk)["label"] == "gpt" # if primary partition on old DOS MBR table, GPT do not have such limit if !(Arch.ppc && gpt_disk) && (gpt_disk || num <= 4) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/include/bootloader/routines/autoinstall.rb new/yast2-bootloader-3.1.82/src/include/bootloader/routines/autoinstall.rb --- old/yast2-bootloader-3.1.70/src/include/bootloader/routines/autoinstall.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/include/bootloader/routines/autoinstall.rb 2014-08-06 11:17:45.000000000 +0200 @@ -166,8 +166,8 @@ unsupported_bootloaders = ["grub", "zipl", "plilo", "lilo", "elilo"] if ai["loader_type"] && unsupported_bootloaders.include?(exp["loader_type"].downcase) # FIXME this should be better handled by exception and show it properly, but it require too big change now - Popup.Error(_("Unsupported bootloader '%s'. Adapt your AutoYaST profile accordingly."), - exp["loader_type"]) + Popup.Error(_("Unsupported bootloader '%s'. Adapt your AutoYaST profile accordingly.") % + exp["loader_type"]) return nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/include/bootloader/routines/lilolike.rb new/yast2-bootloader-3.1.82/src/include/bootloader/routines/lilolike.rb --- old/yast2-bootloader-3.1.70/src/include/bootloader/routines/lilolike.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/include/bootloader/routines/lilolike.rb 2014-08-06 11:17:45.000000000 +0200 @@ -251,52 +251,6 @@ nil end - # Converts the md device to the list of devices building it - # @param [String] md_device string md device - # @return a map of devices (from device name to BIOS ID or nil if - # not detected) building the md device - def Md2Partitions(md_device) - ret = {} - tm = Storage.GetTargetMap - Builtins.foreach(tm) do |disk, descr_a| - descr = Convert.convert( - descr_a, - :from => "any", - :to => "map <string, any>" - ) - bios_id_str = Ops.get_string(descr, "bios_id", "") - bios_id = 256 # maximum + 1 (means: no bios_id found) - bios_id = Builtins.tointeger(bios_id) if bios_id_str != "" - partitions = Ops.get_list(descr, "partitions", []) - Builtins.foreach(partitions) do |partition| - if Ops.get_string(partition, "used_by_device", "") == md_device - d = Ops.get_string(partition, "device", "") - Ops.set(ret, d, bios_id) - end - end - end - Builtins.y2milestone("Partitions building %1: %2", md_device, ret) - deep_copy(ret) - end - - # Converts the md device to the first of its members - # @param [String] md_device string md device - # @return [String] one of devices building the md array - def Md2Partition(md_device) - devices = Md2Partitions(md_device) - return md_device if Builtins.size(devices) == 0 - minimal = 129 # maximum + 2 - found = "" - Builtins.foreach(devices) do |k, v| - if Ops.less_than(v, minimal) - found = k - minimal = v - end - end - found - end - - # Run delayed updates # # This is used by perl-Bootloader when it cannot remove sections from the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/lib/bootloader/grub2base.rb new/yast2-bootloader-3.1.82/src/lib/bootloader/grub2base.rb --- old/yast2-bootloader-3.1.70/src/lib/bootloader/grub2base.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/lib/bootloader/grub2base.rb 2014-08-06 11:17:45.000000000 +0200 @@ -55,7 +55,7 @@ # Propose global options of bootloader def StandardGlobals # s390 do not have os_prober, see bnc#868909#c2 - disable_os_prober = Arch.s390 || ProductFeatures.GetBooleanFeature("general", "disable_os_prober") + disable_os_prober = Arch.s390 || ProductFeatures.GetBooleanFeature("globals", "disable_os_prober") { "timeout" => "8", "default" => "0", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/modules/BootCommon.rb new/yast2-bootloader-3.1.82/src/modules/BootCommon.rb --- old/yast2-bootloader-3.1.70/src/modules/BootCommon.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/modules/BootCommon.rb 2014-08-06 11:17:45.000000000 +0200 @@ -1008,6 +1008,11 @@ ret end + # FIXME just backward compatible interface, call directly BootStorage + def Md2Partitions(md_device) + BootStorage.Md2Partitions(md_device) + end + publish :variable => :global_options, :type => "map <string, any>" publish :variable => :globals, :type => "map <string, string>" publish :variable => :sections, :type => "list <map <string, any>>" @@ -1086,7 +1091,6 @@ publish :function => :AddFirmwareToBootloader, :type => "boolean (string)" publish :function => :PostUpdateMBR, :type => "boolean ()" publish :function => :FindMBRDisk, :type => "string ()" - publish :function => :Md2Partition, :type => "string (string)" publish :function => :RunDelayedUpdates, :type => "void ()" publish :function => :FixGlobals, :type => "void ()" publish :function => :FixSections, :type => "void (void ())" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/modules/BootGRUB2EFI.rb new/yast2-bootloader-3.1.82/src/modules/BootGRUB2EFI.rb --- old/yast2-bootloader-3.1.70/src/modules/BootGRUB2EFI.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/modules/BootGRUB2EFI.rb 2014-08-06 11:17:45.000000000 +0200 @@ -80,6 +80,9 @@ # for UEFI always set PMBR flag on disk (bnc#872054) BootCommon.pmbr_action = :add if !BootCommon.was_proposed || Mode.autoinst + + # set secure boot always on (bnc #879486) + BootCommon.setSystemSecureBootStatus(true) if !BootCommon.was_proposed && Arch.x86_64; end # Display bootloader summary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/src/modules/BootStorage.rb new/yast2-bootloader-3.1.82/src/modules/BootStorage.rb --- old/yast2-bootloader-3.1.70/src/modules/BootStorage.rb 2014-07-25 18:53:13.000000000 +0200 +++ new/yast2-bootloader-3.1.82/src/modules/BootStorage.rb 2014-08-06 11:17:45.000000000 +0200 @@ -21,6 +21,7 @@ module Yast class BootStorageClass < Module + include Yast::Logger def main textdomain "bootloader" @@ -779,9 +780,7 @@ # This function changes order of devices in device_mapping. # All devices listed in bad_devices are maped to "hdN" are moved to the end - # (with changed number N). And second step is putting device with boot partition - # on top (i.e. device_mapping[dev_with_boot] = "hd0"). - # + # (with changed number N). Priority device are always placed at first place # # Example: # device_mapping = $[ "/dev/sda" : "hd0", # "/dev/sdb" : "hd1", @@ -790,54 +789,58 @@ # "/dev/sde" : "hd4" ]; # bad_devices = [ "/dev/sda", "/dev/sdc" ]; # - # changeOrderInDeviceMapping(bad_devices); - # // after call, device_mapping is: + # changeOrderInDeviceMapping(device_mapping, bad_devices: bad_devices); + # // returns: # device_mapping -> $[ "/dev/sda" : "hd3", # "/dev/sdb" : "hd0", # "/dev/sdc" : "hd4", # "/dev/sdd" : "hd1", # "/dev/sde" : "hd2" ]; - def changeOrderInDeviceMapping(bad_devices) - bad_devices = deep_copy(bad_devices) - cur_id = 0 - keys = [] - value = "" - tmp = "" - tmp2 = "" - - # get keys from device_mapping, it's not possible to use foreach over keys and values - # of device_mapping directly, because during the loop device_mapping is changing. - Builtins.foreach(@device_mapping) do |key, value2| - keys = Builtins.add(keys, key) + def changeOrderInDeviceMapping(device_mapping, bad_devices: [], priority_device: nil) + log.info("Calling change of device map with #{device_mapping}, " + + "bad_devices: #{bad_devices}, priority_device: #{priority_device}") + device_mapping = device_mapping.dup + first_available_id = 0 + keys = device_mapping.keys + # sort keys by its order in device mapping + keys.sort_by! {|k| device_mapping[k][/\d+$/] } + + if priority_device + # change order of priority device if it is already in device map, otherwise ignore them + if device_mapping[priority_device] + first_available_id = 1 + old_first_device = device_mapping.key("hd0") + old_device_id = device_mapping[priority_device] + device_mapping[old_first_device] = old_device_id + device_mapping[priority_device] = "hd0" + else + log.warn("Unknown priority device '#{priority_device}'. Skipping") + end end # put bad_devices at bottom - Builtins.foreach( - Convert.convert(keys, :from => "list", :to => "list <string>") - ) do |key| - value = Ops.get(@device_mapping, key, "") + keys.each do |key| + value = device_mapping[key] + if !value # FIXME this should not happen, but openQA catch it, so be on safe side + log.error("empty value in device map") + next + end # if device is mapped on hdX and this device is _not_ in bad_devices - if Builtins.substring(value, 0, 2) == "hd" && - !Builtins.contains(bad_devices, key) + if value.start_with?("hd") && + !bad_devices.include?(key) && + key != priority_device # get device name of mapped on "hd"+cur_id - tmp = getKey( - Ops.add("hd", Builtins.tostring(cur_id)), - @device_mapping - ) + tmp = device_mapping.key("hd#{first_available_id}") # swap tmp and key devices (swap their mapping) - Ops.set(@device_mapping, tmp, value) - Ops.set( - @device_mapping, - key, - Ops.add("hd", Builtins.tostring(cur_id)) - ) + device_mapping[tmp] = value + device_mapping[key] = "hd#{first_available_id}" - cur_id = Ops.add(cur_id, 1) + first_available_id += 1 end end - nil + device_mapping end # Check if MD raid is build on disks not on paritions @@ -1031,10 +1034,19 @@ @BootPartitionDevice != getKey("hd0", @device_mapping) Builtins.y2milestone("Detected device mapping: %1", @device_mapping) Builtins.y2milestone("Changing order in device mapping needed...") - changeOrderInDeviceMapping(usb_disks) + @device_mapping = changeOrderInDeviceMapping(@device_mapping, bad_devices: usb_disks) end - @bois_id_missing = false if Builtins.size(@device_mapping) == 1 + # For us priority disk is device where /boot or / lives as we control this disk and + # want to modify its MBR. So we get disk of such partition and change order to add it + # to top of device map. For details see bnc#887808,bnc#880439 + priority_disks = real_disks_for_partition(@BootPartitionDevice) + # if none of priority disk is hd0, then choose one and assign it + if !isHd0(priority_disks) + @device_mapping = changeOrderInDeviceMapping(@device_mapping, + priority_device: priority_disks.first) + end + @bois_id_missing = false #FIXME never complain about missing bios id as we always have first device boot one if StorageDevices.FloppyPresent Ops.set(@device_mapping, StorageDevices.FloppyDevice, "fd0") end @@ -1511,6 +1523,38 @@ ret end + # Converts the md device to the list of devices building it + # @param [String] md_device string md device + # @return a map of devices (from device name to BIOS ID or nil if + # not detected) building the md device + def Md2Partitions(md_device) + ret = {} + tm = Storage.GetTargetMap + tm.each_pair do |disk, descr| + bios_id = (descr["bios_id"] || 256).to_i # maximum + 1 (means: no bios_id found) + partitions = descr["partitions"] || [] + partitions.each do |partition| + if partition["used_by_device"] == md_device + ret[partition["device"]] = bios_id + end + end + end + Builtins.y2milestone("Partitions building %1: %2", md_device, ret) + + ret + end + + # returns disk names where partition lives + def real_disks_for_partition(partition) + # FIXME handle somehow if disk are in logical raid + partitions = Md2Partitions(partition).keys + partitions = [partition] if partitions.empty? + res = partitions.map do |partition| + Storage.GetDiskPartition(partition)["disk"] + end + res.uniq + end + publish :variable => :all_devices, :type => "map <string, string>" publish :variable => :multipath_mapping, :type => "map <string, string>" publish :variable => :mountpoints, :type => "map <string, any>" @@ -1532,6 +1576,7 @@ publish :function => :getHintedPartitionList, :type => "list <string> (list <string>)" publish :function => :getPartitionList, :type => "list <string> (symbol, string)" publish :function => :addMDSettingsToGlobals, :type => "string ()" + publish :function => :Md2Partitions, :type => "map <string, integer> (string)" end BootStorage = BootStorageClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/test/boot_storage_test.rb new/yast2-bootloader-3.1.82/test/boot_storage_test.rb --- old/yast2-bootloader-3.1.70/test/boot_storage_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-3.1.82/test/boot_storage_test.rb 2014-08-06 11:17:45.000000000 +0200 @@ -0,0 +1,95 @@ +require_relative "test_helper" + +Yast.import "BootStorage" + +describe Yast::BootStorage do + def target_map_stub(name) + path = File.join(File.dirname(__FILE__), "data", name) + tm = eval(File.read(path)) + allow(Yast::Storage).to receive(:GetTargetMap).and_return(tm) + end + + describe ".Md2Partitions" do + it "returns map with devices creating virtual device as key and bios id as value" do + target_map_stub("storage_mdraid.rb") + result = Yast::BootStorage.Md2Partitions("/dev/md1") + expect(result).to include("/dev/vda1") + expect(result).to include("/dev/vdb1") + expect(result).to include("/dev/vdc1") + expect(result).to include("/dev/vdd1") + end + + it "returns empty map if device is not created from other devices" do + target_map_stub("storage_mdraid.rb") + result = Yast::BootStorage.Md2Partitions("/dev/vda1") + expect(result).to be_empty + end + end + + describe ".real_disks_for_partition" do + it "returns unique list of disk on which partitions lives" do + target_map_stub("storage_mdraid.rb") + # simple mock getting disks from partition as it need initialized libstorage + allow(Yast::Storage).to receive(:GetDiskPartition) do |partition| + number = partition[/(\d+)$/,1] + disk = partition[0..-(number.size+1)] + { "disk" => disk, "nr" => number } + end + result = Yast::BootStorage.real_disks_for_partition("/dev/md1") + expect(result).to include("/dev/vda") + expect(result).to include("/dev/vdb") + expect(result).to include("/dev/vdc") + expect(result).to include("/dev/vdd") + + result = Yast::BootStorage.real_disks_for_partition("/dev/vda1") + expect(result).to include("/dev/vda") + end + end + + describe ".changeOrderInDeviceMapping" do + it "place priority device on top of device mapping" do + device_map = { "/dev/sda" => "hd1", "/dev/sdb" => "hd0" } + result = { "/dev/sda" => "hd0", "/dev/sdb" => "hd1" } + expect( + Yast::BootStorage.changeOrderInDeviceMapping( + device_map, + priority_device: "/dev/sda" + ) + ).to eq(result) + end + + it "ignores priority device which is not in device map already" do + device_map = { "/dev/sda" => "hd1", "/dev/sdb" => "hd0" } + result = { "/dev/sda" => "hd1", "/dev/sdb" => "hd0" } + expect( + Yast::BootStorage.changeOrderInDeviceMapping( + device_map, + priority_device: "/dev/system" + ) + ).to eq(result) + end + + it "place bad devices at the end of list" do + device_map = { "/dev/sda" => "hd0", "/dev/sdb" => "hd1" } + result = { "/dev/sda" => "hd1", "/dev/sdb" => "hd0" } + expect( + Yast::BootStorage.changeOrderInDeviceMapping( + device_map, + bad_devices: "/dev/sda" + ) + ).to eq(result) + end + + it "can mix priority and bad devices" do + device_map = { "/dev/sda" => "hd0", "/dev/sdb" => "hd1", "/dev/sdc" => "hd2" } + result = { "/dev/sda" => "hd2", "/dev/sdb" => "hd0", "/dev/sdc" => "hd1" } + expect( + Yast::BootStorage.changeOrderInDeviceMapping( + device_map, + bad_devices: "/dev/sda", + priority_device: "/dev/sdb" + ) + ).to eq(result) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/test/data/storage_mdraid.rb new/yast2-bootloader-3.1.82/test/data/storage_mdraid.rb --- old/yast2-bootloader-3.1.70/test/data/storage_mdraid.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-3.1.82/test/data/storage_mdraid.rb 2014-08-06 11:17:45.000000000 +0200 @@ -0,0 +1,518 @@ +{ + "/dev/btrfs" => { + "device" => "/dev/btrfs", + "name" => "btrfs", + "partitions" => [], + "type" => :CT_BTRFS, + "used_by_device" => "", + "used_by_type" => :UB_NONE + }, + "/dev/md" => { + "device" => "/dev/md", + "name" => "md", + "partitions" => [ + { + "chunk_size" => 64, + "create" => true, + "detected_fs" => :btrfs, + "device" => "/dev/md0", + "devices" => [ + "/dev/vda2", + "/dev/vdb2", + "/dev/vdc2", + "/dev/vdd2" + ], + "format" => true, + "fstype" => "MD RAID", + "inactive" => true, + "mount" => "/", + "mountby" => :uuid, + "name" => "md0", + "nr" => 0, + "raid_type" => "raid1", + "sb_ver" => "01.00.00", + "size_k" => 5429970, + "subvol" => [ + { + "create" => true, + "name" => "boot/grub2/i386-pc" + }, + { + "create" => true, + "name" => "boot/grub2/x86_64-efi" + }, + { + "create" => true, + "name" => "home" + }, + { + "create" => true, + "name" => "opt" + }, + { + "create" => true, + "name" => "srv" + }, + { + "create" => true, + "name" => "tmp" + }, + { + "create" => true, + "name" => "usr/local" + }, + { + "create" => true, + "name" => "var/crash" + }, + { + "create" => true, + "name" => "var/lib/mailman" + }, + { + "create" => true, + "name" => "var/lib/named" + }, + { + "create" => true, + "name" => "var/lib/pgsql" + }, + { + "create" => true, + "name" => "var/log" + }, + { + "create" => true, + "name" => "var/opt" + }, + { + "create" => true, + "name" => "var/spool" + }, + { + "create" => true, + "name" => "var/tmp" + } + ], + "type" => :sw_raid, + "used_by" => [ + { + "device" => "12345", + "type" => :UB_BTRFS + } + ], + "used_by_device" => "12345", + "used_by_type" => :UB_BTRFS, + "used_fs" => :btrfs, + "userdata" => { + "/" => "snapshots" + }, + "uuid" => "12345" + }, + { + "chunk_size" => 4, + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/md1", + "devices" => [ + "/dev/vda1", + "/dev/vdb1", + "/dev/vdc1", + "/dev/vdd1" + ], + "format" => true, + "fs_options" => { + "opt_dir_index" => { + "option_cmd" => :mkfs, + "option_str" => "-O dir_index", + "option_value" => true + }, + "opt_reg_checks" => { + "option_cmd" => :tunefs, + "option_str" => "-c 0 -i 0", + "option_value" => true + }, + "opt_reserved_blocks" => { + "option_cmd" => :mkfs, + "option_str" => "-m", + "option_value" => "5.0" + } + }, + "fstopt" => "acl,user_xattr", + "fstype" => "MD RAID", + "inactive" => true, + "mkfs_opt" => "-O dir_index -m5.0", + "mount" => "/boot", + "mountby" => :uuid, + "name" => "md1", + "nr" => 1, + "raid_type" => "raid1", + "sb_ver" => "01.00.00", + "size_k" => 305235, + "tunefs_opt" => "-c 0 -i 0", + "type" => :sw_raid, + "used_by_device" => "", + "used_by_type" => :UB_NONE, + "used_fs" => :ext4 + }, + { + "chunk_size" => 32, + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/md2", + "devices" => [ + "/dev/vda3", + "/dev/vdb3", + "/dev/vdc3", + "/dev/vdd3" + ], + "format" => true, + "fstype" => "MD RAID", + "inactive" => true, + "mount" => "swap", + "mountby" => :uuid, + "name" => "md2", + "nr" => 2, + "raid_type" => "raid0", + "sb_ver" => "01.00.00", + "size_k" => 417688, + "type" => :sw_raid, + "used_by_device" => "", + "used_by_type" => :UB_NONE, + "used_fs" => :swap + } + ], + "type" => :CT_MD, + "used_by_device" => "", + "used_by_type" => :UB_NONE + }, + "/dev/vda" => { + "bus" => "None", + "cyl_count" => 1305, + "cyl_size" => 8225280, + "device" => "/dev/vda", + "driver" => "virtio-pci", + "driver_module" => "virtio_pci", + "label" => "msdos", + "max_logical" => 15, + "max_primary" => 4, + "name" => "vda", + "partitions" => [ + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vda1", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vda1", + "nr" => 1, + "region" => [0, 38], + "size_k" => 305235, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md1", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md1", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vda2", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vda2", + "nr" => 2, + "region" => [38, 676], + "size_k" => 5429970, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md0", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md0", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vda3", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vda3", + "nr" => 3, + "region" => [714, 13], + "size_k" => 104422, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md2", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md2", + "used_by_type" => :UB_MD + } + ], + "proposal_name" => "1. Disk, 10.00 GiB, /dev/vda,", + "sector_size" => 512, + "size_k" => 10485760, + "transport" => :unknown, + "type" => :CT_DISK, + "unique" => "KSbE.Fxp0d3BezAE", + "used_by_device" => "", + "used_by_type" => :UB_NONE + }, +"/dev/vdb" => { + "bus" => "None", + "cyl_count" => 1305, + "cyl_size" => 8225280, + "device" => "/dev/vdb", + "driver" => "virtio-pci", + "driver_module" => "virtio_pci", + "label" => "msdos", + "max_logical" => 15, + "max_primary" => 4, + "name" => "vdb", + "partitions" => [ + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdb1", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdb1", + "nr" => 1, + "region" => [0, 38], + "size_k" => 305235, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md1", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md1", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdb2", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdb2", + "nr" => 2, + "region" => [38, 676], + "size_k" => 5429970, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md0", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md0", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdb3", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdb3", + "nr" => 3, + "region" => [714, 13], + "size_k" => 104422, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md2", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md2", + "used_by_type" => :UB_MD + } + ], + "proposal_name" => "2. Disk, 10.00 GiB, /dev/vdb, ", + "sector_size" => 512, + "size_k" => 10485760, + "transport" => :unknown, + "type" => :CT_DISK, + "unique" => "ndrI.Fxp0d3BezAE", + "used_by_device" => "", + "used_by_type" => :UB_NONE + }, +"/dev/vdc" => { + "bus" => "None", + "cyl_count" => 1305, + "cyl_size" => 8225280, + "device" => "/dev/vdc", + "driver" => "virtio-pci", + "driver_module" => "virtio_pci", + "label" => "msdos", + "max_logical" => 15, + "max_primary" => 4, + "name" => "vdc", + "partitions" => [ + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdc1", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdc1", + "nr" => 1, + "region" => [0, 38], + "size_k" => 305235, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md1", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md1", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdc2", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdc2", + "nr" => 2, + "region" => [38, 676], + "size_k" => 5429970, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md0", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md0", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdc3", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdc3", + "nr" => 3, + "region" => [714, 13], + "size_k" => 104422, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md2", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md2", + "used_by_type" => :UB_MD + } + ], + "proposal_name" => "3. Disk, 10.00 GiB, /dev/vdc, ", + "sector_size" => 512, + "size_k" => 10485760, + "transport" => :unknown, + "type" => :CT_DISK, + "unique" => "Ep5N.Fxp0d3BezAE", + "used_by_device" => "", + "used_by_type" => :UB_NONE + }, +"/dev/vdd" => { + "bus" => "None", + "cyl_count" => 1305, + "cyl_size" => 8225280, + "device" => "/dev/vdd", + "driver" => "virtio-pci", + "driver_module" => "virtio_pci", + "label" => "msdos", + "max_logical" => 15, + "max_primary" => 4, + "name" => "vdd", + "partitions" => [ + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdd1", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdd1", + "nr" => 1, + "region" => [0, 38], + "size_k" => 305235, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md1", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md1", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdd2", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdd2", + "nr" => 2, + "region" => [38, 676], + "size_k" => 5429970, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md0", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md0", + "used_by_type" => :UB_MD + }, + { + "create" => true, + "detected_fs" => :unknown, + "device" => "/dev/vdd3", + "fsid" => 253, + "fstype" => "Linux RAID", + "name" => "vdd3", + "nr" => 3, + "region" => [714, 13], + "size_k" => 104422, + "type" => :primary, + "used_by" => [ + { + "device" => "/dev/md2", + "type" => :UB_MD + } + ], + "used_by_device" => "/dev/md2", + "used_by_type" => :UB_MD + } + ], + "proposal_name" => "4. Disk, 10.00 GiB, /dev/vdd, ", + "sector_size" => 512, + "size_k" => 10485760, + "transport" => :unknown, + "type" => :CT_DISK, + "unique" => "h_LR.Fxp0d3BezAE", + "used_by_device" => "", + "used_by_type" => :UB_NONE + } +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.70/test/data/storage_ppc.rb new/yast2-bootloader-3.1.82/test/data/storage_ppc.rb --- old/yast2-bootloader-3.1.70/test/data/storage_ppc.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-bootloader-3.1.82/test/data/storage_ppc.rb 2014-08-06 11:17:45.000000000 +0200 @@ -0,0 +1,161 @@ +# TODO create factory like method for Storage +{ + "/dev/sda" => { + "unique" => "3OOL.41o+EUK3QE2", + "bus" => "IDE", + "device" => "/dev/sda", + "vendor" => "HITACHI", + "model" => "HTS72323", + "driver" => "ahci", + "driver_module" => "ahci", + "partitions" => [ + { + "device" => "/dev/sda1", + "name" => "sda1", + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part1", + "udev_id" => [ + "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part1", + "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part1", + "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part1", + "wwn-0x5000cca6d4c3bbb8-part1" + ], + "size_k" => 2104515, + "detected_fs" => :unknown, + "nr" => 1, + "fsid" => 130, + "fstype" => "Linux swap", + "region" => [0, 262], + "type" => :primary + }, + { + "device" => "/dev/sda2", + "name" => "sda2", + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part2", + "udev_id" => [ + "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part2", + "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part2", + "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part2", + "wwn-0x5000cca6d4c3bbb8-part2" + ], + "size_k" => 20980890, + "detected_fs" => :unknown, + "nr" => 2, + "fsid" => 131, + "fstype" => "Linux native", + "region" => [261, 2612], + "type" => :primary, + "boot" => true + }, + { + "device" => "/dev/sda3", + "name" => "sda3", + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0-part3", + "udev_id" => [ + "ata-HITACHI_HTS723232A7A364_E3834563C86LDM-part3", + "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM-part3", + "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM-part3", + "wwn-0x5000cca6d4c3bbb8-part3" + ], + "size_k" => 289499332, + "detected_fs" => :unknown, + "nr" => 3, + "fsid" => 131, + "fstype" => "Linux native", + "region" => [2872, 36041], + "type" => :primary + } + ], + "size_k" => 312571224, + "cyl_size" => 8225280, + "cyl_count" => 38913, + "sector_size" => 512, + "label" => "msdos", + "name" => "sda", + "max_logical" => 255, + "max_primary" => 4, + "type" => :CT_DISK, + "transport" => :sata, + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_id" => [ + "ata-HITACHI_HTS723232A7A364_E3834563C86LDM", + "scsi-1ATA_HITACHI_HTS723232A7A364_E3834563C86LDM", + "scsi-SATA_HITACHI_HTS72323_E3834563C86LDM", + "wwn-0x5000cca6d4c3bbb8"], + "udev_path" => "pci-0000:00:1f.2-scsi-0:0:0:0" + }, + "/dev/sdb" => { + "unique" => "uI_Q.Uy_iBFnqnWC", + "bus" => "SCSI", + "device" => "/dev/sdb", + "vendor" => "Linux", + "model" => "scsi_debug", + "driver" => "scsi_debug", + "partitions" => [ + { + "device" => "/dev/sdb1", + "name" => "sdb1", + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_path" => "scsi-0:0:0:0-part1", + "udev_id" => [ + "scsi-1Linux_scsi_debug_16000-part1", + "scsi-35333333000003e80-part1", + "wwn-0x5333333000003e80-part1" + ], + "size_k" => 64260, + "detected_fs" => :unknown, + "nr" => 1, + "fsid" => 65, + "fstype" => "PPC PReP Boot", + "region" => [0, 1], + "type" => :primary, + "boot" => true + }, + { + "device" => "/dev/sdb2", + "name" => "sdb2", + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_path" => "scsi-0:0:0:0-part2", + "udev_id" => [ + "scsi-1Linux_scsi_debug_16000-part2", + "scsi-35333333000003e80-part2", + "wwn-0x5333333000003e80-part2" + ], + "size_k" => 4260, + "detected_fs" => :unknown, + "nr" => 2, + "fsid" => 65, + "fstype" => "PPC PReP Boot", + "region" => [0, 1], + "type" => :primary, + "boot" => true + } + ], + "size_k" => 307200, + "cyl_size" => 65802240, + "cyl_count" => 4, + "sector_size" => 4096, + "label" => "msdos", + "name" => "sdb", + "max_logical" => 255, + "max_primary" => 4, + "type" => :CT_DISK, + "transport" => :unknown, + "used_by_type" => :UB_NONE, + "used_by_device" => "", + "udev_id" => [ + "scsi-1Linux_scsi_debug_16000", + "scsi-35333333000003e80", + "wwn-0x5333333000003e80" + ], + "udev_path" => "scsi-0:0:0:0" + } +} -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
