Project

General

Profile

Bug #9097

ECL can't locate config.xml unless device is MBR-partitioned

Added by Adam Thompson almost 2 years ago. Updated 13 days ago.

Status:
Resolved
Priority:
Normal
Category:
Backup / Restore
Target version:
Start date:
11/05/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4
Affected Architecture:

Description

Follow-on to #9089, but this one needs to be fixed in code, IMHO:

  • GPT devices show up as da1p1, not da1s1, so can't be used for ECL

(FYI: macOS's Disk Utility now formats devices as GPT by default, not MBR. Yay.)

The fix appears to be trivial, although I lack the skills and infrastructure to build - and thus test - this fix (sorry). I'd be happy to test a fresh spin of the install ISO, though, if you provide a URL.

I'm not too sure about git-diff's output here, but you can see the gist of the 1-line change regardless.

diff --git a/src/etc/ecl.php b/src/etc/ecl.php
index 30a64c5d43..05d519c952 100755
--- a/src/etc/ecl.php
+++ b/src/etc/ecl.php
@@ -37,7 +37,7 @@ function get_swap_disks() {

 function get_disk_slices($disk) {
        global $g, $debug;
-       $slices = glob("/dev/" . $disk . "s*");
+       $slices = glob("/dev/" . $disk . "[ps]*");
        $slices = str_replace("/dev/", "", $slices);
        return $slices;
 }

Associated revisions

Revision 681d099c (diff)
Added by Viktor Gurov about 2 months ago

ECL GPT partitions support. Fixes #9097

History

#1 Updated by Jim Pingle about 1 year ago

  • Category changed from Installer to Backup / Restore

Changing category, ECL is in base, not the installer, so it doesn't need changes to the ISO to test. You can leave the thumb drive plugged in on any boot to obtain a new config via ECL.

#3 Updated by Jim Pingle about 2 months ago

  • Status changed from New to Pull Request Review
  • Target version set to 2.5.0

#4 Updated by Renato Botelho about 1 month ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

#5 Updated by Danilo Zrenjanin 13 days ago

Tested on :
2.5.0-DEVELOPMENT (amd64)
built on Mon Sep 07 19:04:05 EDT 2020
FreeBSD 12.2-PRERELEASE

I was able to restore the config stored in /config.xml on an USB stick formatted using GUID Partition Map/MS-DOS (FAT) format.

Ticket resolved.

#6 Updated by Danilo Zrenjanin 13 days ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF