• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Extended/Logical Partitions Proposed Solution

Scheduled Pinned Locked Moved Solved
Feature Request
3
7
2.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    fractal13 Developer
    last edited by May 22, 2014, 2:09 PM

    In order to support extended and logical partitions, I’ve made changes to the fog.upload and fog.download scripts. The modified versions are attached. I’ve tested these on some simple setups, and they appear to be working.

    Please consider incorporating this change into the release. I think this will avoid lots of rookie mistakes for people doing dual-boot and Linux systems, since so many Linux systems are installed with logical partitions from the start.

    Detailed notes:
    fog.upload:

    • Moved the detection of gpt or mbr to inside the “mps” and “mpa” portions, so that the test can be performed per-disk.
    • Added per-disk sfdisk -l to detect if Extended partition exists or not.
    • On MBR disks, with Linux image type (osid == 50), save the partition table to d?.partitions, using sfdisk -d
    • In “mpa” image type, for MBR disks, with Linux image type, capture full (63 sectors) of mbr, not just first disk. (OK, this isn’t strictly necessary, but some systems to have grub2 installed on additional disks). It was also necessary to keep the code clean for capturing extended and logical partitions on drives other than the first.
    • In “mpa” section, fixed GPT mbr to capture from $disk. Was capturing from $hd (the first drive) for all drives.

    fog.download:

    • In both “mps” and “mpa” sections, if the MBR is full (63 sectors) and image type is Linux, and if the d?.partitions file exists, use sfdisk to restore the partition table (after the dd to restore the d?.mbr file).
    • In the “mpa” section, make the MBR restoration occur for all disks, not just the first one. (This is to reflect the similar change in the upload script.)

    [url=“/_imported_xf_attachments/0/807_fog.download.extended-partitions.txt?:”]fog.download.extended-partitions.txt[/url][url=“/_imported_xf_attachments/0/808_fog.upload.extended-partitions.txt?:”]fog.upload.extended-partitions.txt[/url]

    1 Reply Last reply Reply Quote 0
    • S
      steve
      last edited by May 23, 2014, 1:30 PM

      Thanks fractal13 🙂

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by May 23, 2014, 3:53 PM

        [quote=“fractal13, post: 27830, member: 24300”]In order to support extended and logical partitions, I’ve made changes to the fog.upload and fog.download scripts. The modified versions are attached. I’ve tested these on some simple setups, and they appear to be working.

        Please consider incorporating this change into the release. I think this will avoid lots of rookie mistakes for people doing dual-boot and Linux systems, since so many Linux systems are installed with logical partitions from the start.

        Detailed notes:
        fog.upload:

        • Moved the detection of gpt or mbr to inside the “mps” and “mpa” portions, so that the test can be performed per-disk.
        • Added per-disk sfdisk -l to detect if Extended partition exists or not.
        • On MBR disks, with Linux image type (osid == 50), save the partition table to d?.partitions, using sfdisk -d
        • In “mpa” image type, for MBR disks, with Linux image type, capture full (63 sectors) of mbr, not just first disk. (OK, this isn’t strictly necessary, but some systems to have grub2 installed on additional disks). It was also necessary to keep the code clean for capturing extended and logical partitions on drives other than the first.
        • In “mpa” section, fixed GPT mbr to capture from $disk. Was capturing from $hd (the first drive) for all drives.

        fog.download:

        • In both “mps” and “mpa” sections, if the MBR is full (63 sectors) and image type is Linux, and if the d?.partitions file exists, use sfdisk to restore the partition table (after the dd to restore the d?.mbr file).
        • In the “mpa” section, make the MBR restoration occur for all disks, not just the first one. (This is to reflect the similar change in the upload script.)[/quote]

        Added to the init’s, will update the src files with the information as well.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • F
          fractal13 Developer
          last edited by May 23, 2014, 4:10 PM

          Thanks.

          1 Reply Last reply Reply Quote 0
          • F
            fractal13 Developer
            last edited by May 27, 2014, 5:23 PM

            I checked out the latest from SVN and tried to use these updates and they didn’t work. I noticed a few things were changed when you integrated the extended partitions into the scripts. I’d like to submit another set of changes to make things work again, but I have a few questions first.

            The variable ${imgPath} isn’t a magic variable I’m unaware of is it?
            Is there a reason we don’t want to try to save the extended partitions (and GRUB/MBR) on other than the primary disk? It doesn’t hurt anything does it?
            When sgdisk is used to save the MBR on multi-disk systems, wouldn’t we want to save the MBR per disk, and not from the first disk only?

            Again, thanks.

            1 Reply Last reply Reply Quote 0
            • T
              Tom Elliott
              last edited by May 27, 2014, 10:02 PM

              As we discussed earlier, I’m human so I make mistakes 😛

              Anyway, this should all be corrected for now. As always, just let me know of issues and I’ll try to correct them in as timely a fashion I can.

              Thank you,

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • F
                fractal13 Developer
                last edited by May 31, 2014, 8:23 PM

                Thanks Tom. I appreciate your persistence in getting this integrated. It’ll save a lot of hassles for first time dual-boot users.

                PS. Coming soon: patch to make capture of GRUB2 work in more cases.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  3/7
                  Last post

                143

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project