Preseeding Dual boot dual hard drives Ubuntu 18.04.1 LTS












0















First post here. Just wondering if anyone can help. I'm not Linux expert or anything so this may just be my brain frazzling!



Ok, so I'm using the same hardware and same method I have been using with 16.04.x which all worked fine. I am using a fairly new pc with two nvme hard drives in (one 500gb and one 250gb).
In my preseed file under partitioning I specify the 250gb disk (d-i partman-auto/disk string /dev/nvme1n1) for Ubuntu as Windows goes on nvme0n1 (the 500gb disk).
My auto deployment/installation of Ubuntu works fine for a few times but then suddenly i'll find that for some reason its installed itself onto the 500gb disk instead of the 250gb?! If i then look in gparted or do lsblk the disk labels have swapped over so now the 250gb disk appears as nvme0n1 instead of nvme1n1 and the 500gb appears as nvme1n1 instead of nvme0n1. If I reboot then usually the labels have switched back to how they should be but obviously Ubuntu has now written over the windows 500gb disk.
When i deploy Windows 10 via sccm it will consistently deploy to the 500gb disk (disk 0)
Any suggestions or workarounds would be greatly appreciated. Currently i've sort of given up on this and am waiting for 18.04.2 to see if that fixes anything.
Thanks
Rob










share|improve this question



























    0















    First post here. Just wondering if anyone can help. I'm not Linux expert or anything so this may just be my brain frazzling!



    Ok, so I'm using the same hardware and same method I have been using with 16.04.x which all worked fine. I am using a fairly new pc with two nvme hard drives in (one 500gb and one 250gb).
    In my preseed file under partitioning I specify the 250gb disk (d-i partman-auto/disk string /dev/nvme1n1) for Ubuntu as Windows goes on nvme0n1 (the 500gb disk).
    My auto deployment/installation of Ubuntu works fine for a few times but then suddenly i'll find that for some reason its installed itself onto the 500gb disk instead of the 250gb?! If i then look in gparted or do lsblk the disk labels have swapped over so now the 250gb disk appears as nvme0n1 instead of nvme1n1 and the 500gb appears as nvme1n1 instead of nvme0n1. If I reboot then usually the labels have switched back to how they should be but obviously Ubuntu has now written over the windows 500gb disk.
    When i deploy Windows 10 via sccm it will consistently deploy to the 500gb disk (disk 0)
    Any suggestions or workarounds would be greatly appreciated. Currently i've sort of given up on this and am waiting for 18.04.2 to see if that fixes anything.
    Thanks
    Rob










    share|improve this question

























      0












      0








      0








      First post here. Just wondering if anyone can help. I'm not Linux expert or anything so this may just be my brain frazzling!



      Ok, so I'm using the same hardware and same method I have been using with 16.04.x which all worked fine. I am using a fairly new pc with two nvme hard drives in (one 500gb and one 250gb).
      In my preseed file under partitioning I specify the 250gb disk (d-i partman-auto/disk string /dev/nvme1n1) for Ubuntu as Windows goes on nvme0n1 (the 500gb disk).
      My auto deployment/installation of Ubuntu works fine for a few times but then suddenly i'll find that for some reason its installed itself onto the 500gb disk instead of the 250gb?! If i then look in gparted or do lsblk the disk labels have swapped over so now the 250gb disk appears as nvme0n1 instead of nvme1n1 and the 500gb appears as nvme1n1 instead of nvme0n1. If I reboot then usually the labels have switched back to how they should be but obviously Ubuntu has now written over the windows 500gb disk.
      When i deploy Windows 10 via sccm it will consistently deploy to the 500gb disk (disk 0)
      Any suggestions or workarounds would be greatly appreciated. Currently i've sort of given up on this and am waiting for 18.04.2 to see if that fixes anything.
      Thanks
      Rob










      share|improve this question














      First post here. Just wondering if anyone can help. I'm not Linux expert or anything so this may just be my brain frazzling!



      Ok, so I'm using the same hardware and same method I have been using with 16.04.x which all worked fine. I am using a fairly new pc with two nvme hard drives in (one 500gb and one 250gb).
      In my preseed file under partitioning I specify the 250gb disk (d-i partman-auto/disk string /dev/nvme1n1) for Ubuntu as Windows goes on nvme0n1 (the 500gb disk).
      My auto deployment/installation of Ubuntu works fine for a few times but then suddenly i'll find that for some reason its installed itself onto the 500gb disk instead of the 250gb?! If i then look in gparted or do lsblk the disk labels have swapped over so now the 250gb disk appears as nvme0n1 instead of nvme1n1 and the 500gb appears as nvme1n1 instead of nvme0n1. If I reboot then usually the labels have switched back to how they should be but obviously Ubuntu has now written over the windows 500gb disk.
      When i deploy Windows 10 via sccm it will consistently deploy to the 500gb disk (disk 0)
      Any suggestions or workarounds would be greatly appreciated. Currently i've sort of given up on this and am waiting for 18.04.2 to see if that fixes anything.
      Thanks
      Rob







      dual-boot partitioning preseed






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 16 at 12:39









      RobRob

      12




      12






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Ok I got round this myself so I'll post what I did in case anyone else needs it.
          In the preseed I was able to use a partman early command that queries the attached disks for their total size and then uses awk to extract the name of the drive:



          d-i partman/early_command string debconf-set partman-auto/disk /dev/"$(lsblk -lnb | awk '$4==256060514304' | awk '{print $1}')"





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110256%2fpreseeding-dual-boot-dual-hard-drives-ubuntu-18-04-1-lts%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ok I got round this myself so I'll post what I did in case anyone else needs it.
            In the preseed I was able to use a partman early command that queries the attached disks for their total size and then uses awk to extract the name of the drive:



            d-i partman/early_command string debconf-set partman-auto/disk /dev/"$(lsblk -lnb | awk '$4==256060514304' | awk '{print $1}')"





            share|improve this answer




























              0














              Ok I got round this myself so I'll post what I did in case anyone else needs it.
              In the preseed I was able to use a partman early command that queries the attached disks for their total size and then uses awk to extract the name of the drive:



              d-i partman/early_command string debconf-set partman-auto/disk /dev/"$(lsblk -lnb | awk '$4==256060514304' | awk '{print $1}')"





              share|improve this answer


























                0












                0








                0







                Ok I got round this myself so I'll post what I did in case anyone else needs it.
                In the preseed I was able to use a partman early command that queries the attached disks for their total size and then uses awk to extract the name of the drive:



                d-i partman/early_command string debconf-set partman-auto/disk /dev/"$(lsblk -lnb | awk '$4==256060514304' | awk '{print $1}')"





                share|improve this answer













                Ok I got round this myself so I'll post what I did in case anyone else needs it.
                In the preseed I was able to use a partman early command that queries the attached disks for their total size and then uses awk to extract the name of the drive:



                d-i partman/early_command string debconf-set partman-auto/disk /dev/"$(lsblk -lnb | awk '$4==256060514304' | awk '{print $1}')"






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 18 at 15:25









                RobRob

                12




                12






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110256%2fpreseeding-dual-boot-dual-hard-drives-ubuntu-18-04-1-lts%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                    Eduardo VII do Reino Unido