Addressing USB-Stick by UUID as kernel parameter in grub.cfgUsing space before 1st partition of USB-Stick as...

Is there a need for better software for writers?

Pre-1993 comic in which Wolverine's claws were turned to rubber?

What does this quote in Small Gods refer to?

Are there non-military uses of 20%-enriched Uranium?

How are one-time password generators like Google Authenticator different from having two passwords?

How did Thanos not realise this had happened at the end of Endgame?

Why did they go to Dragonstone?

Watching the game, having a puzzle

How to make a language evolve quickly?

Is every story set in the future "science fiction"?

Is it a good idea to copy a trader when investing?

Passport stamps art, can it be done?

Why are parallelograms defined as quadrilaterals? What term would encompass polygons with greater than two parallel pairs?

What was the notion of limit that Newton used?

What is the name of meteoroids which hit Moon, Mars, or pretty much anything that isn’t the Earth?

Why is it wrong to *implement* myself a known, published, widely believed to be secure crypto algorithm?

My perfect evil overlord plan... or is it?

Does the 500 feet falling cap apply per fall, or per turn?

Why do Thanos' punches not kill Captain America or at least cause vital wounds?

Is this state of Earth possible, after humans left for a million years?

Is it nonsense to say B -> [A -> B]?

Was Mohammed the most popular first name for boys born in Berlin in 2018?

Why should password hash verification be time constant?

Renting a house to a graduate student in my department



Addressing USB-Stick by UUID as kernel parameter in grub.cfg


Using space before 1st partition of USB-Stick as luks keyDual Boot Linux and Windows 7 with GRUBUBS-Stick with Arch is no longer bootable after Win8 has been bootedIs Easy-to-use Multi-factor Full Disk Encryption Available?Ubuntu Server 16.04.3LTS Squashfs as root from GrubResizing Linux partition backwardsVirtualbox VMDK to bootable usb stick not workingUbuntu 18.04 LUKS boot problemsGRUB doesn't boot copied Linux installSetting Kernel parameters when grub.cfg is on another distroUsing space before 1st partition of USB-Stick as luks key






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm using Arch Linux and setting up an USB-Stick as decryption key for my luks-encrypted root partition (boot is unencrypted). I described it already in this question.



Now, the key, that's used for dm-crypt is actually stored before the first partition on the stick, created this way:



sudo dd if=tempKey.bin of=/dev/sdd bs=512 seek=1 count=6



thus, 3072 are written into sector 1..6 (zero indexed). When I use the following kernel parameter in grub.cfg it works:



cryptkey=/dev/sdd:512:3072



But I cannot rely on that stick always being mapped to sdd, thatswhy even Arch-Wiki recommends using the disks ID, namely:



cryptkey=/dev/disk/by-id/$ID_OF_USB_STICK$:512:3072



BUT: USB-Sticks are getting IDs that contain colons and so the device is not found on boot, even if I try to escape the colon with a backslash. The system always seems to look for the ID before the colon.



Using cryptkey=UUID=... would only work, if I use space/sector inside a partition, not before or between.



So, I'm really stuck here. Someone any suggestions, how to solve this without rely on sdX and the possibility to accidentally overwrite/delete the key by putting it inside a partition? Would it be an option to manipulate rules.d of udev to change the way the IDs(and symlinks) for USB-Sticks are created?










share|improve this question







New contributor



Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    I'm using Arch Linux and setting up an USB-Stick as decryption key for my luks-encrypted root partition (boot is unencrypted). I described it already in this question.



    Now, the key, that's used for dm-crypt is actually stored before the first partition on the stick, created this way:



    sudo dd if=tempKey.bin of=/dev/sdd bs=512 seek=1 count=6



    thus, 3072 are written into sector 1..6 (zero indexed). When I use the following kernel parameter in grub.cfg it works:



    cryptkey=/dev/sdd:512:3072



    But I cannot rely on that stick always being mapped to sdd, thatswhy even Arch-Wiki recommends using the disks ID, namely:



    cryptkey=/dev/disk/by-id/$ID_OF_USB_STICK$:512:3072



    BUT: USB-Sticks are getting IDs that contain colons and so the device is not found on boot, even if I try to escape the colon with a backslash. The system always seems to look for the ID before the colon.



    Using cryptkey=UUID=... would only work, if I use space/sector inside a partition, not before or between.



    So, I'm really stuck here. Someone any suggestions, how to solve this without rely on sdX and the possibility to accidentally overwrite/delete the key by putting it inside a partition? Would it be an option to manipulate rules.d of udev to change the way the IDs(and symlinks) for USB-Sticks are created?










    share|improve this question







    New contributor



    Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      I'm using Arch Linux and setting up an USB-Stick as decryption key for my luks-encrypted root partition (boot is unencrypted). I described it already in this question.



      Now, the key, that's used for dm-crypt is actually stored before the first partition on the stick, created this way:



      sudo dd if=tempKey.bin of=/dev/sdd bs=512 seek=1 count=6



      thus, 3072 are written into sector 1..6 (zero indexed). When I use the following kernel parameter in grub.cfg it works:



      cryptkey=/dev/sdd:512:3072



      But I cannot rely on that stick always being mapped to sdd, thatswhy even Arch-Wiki recommends using the disks ID, namely:



      cryptkey=/dev/disk/by-id/$ID_OF_USB_STICK$:512:3072



      BUT: USB-Sticks are getting IDs that contain colons and so the device is not found on boot, even if I try to escape the colon with a backslash. The system always seems to look for the ID before the colon.



      Using cryptkey=UUID=... would only work, if I use space/sector inside a partition, not before or between.



      So, I'm really stuck here. Someone any suggestions, how to solve this without rely on sdX and the possibility to accidentally overwrite/delete the key by putting it inside a partition? Would it be an option to manipulate rules.d of udev to change the way the IDs(and symlinks) for USB-Sticks are created?










      share|improve this question







      New contributor



      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm using Arch Linux and setting up an USB-Stick as decryption key for my luks-encrypted root partition (boot is unencrypted). I described it already in this question.



      Now, the key, that's used for dm-crypt is actually stored before the first partition on the stick, created this way:



      sudo dd if=tempKey.bin of=/dev/sdd bs=512 seek=1 count=6



      thus, 3072 are written into sector 1..6 (zero indexed). When I use the following kernel parameter in grub.cfg it works:



      cryptkey=/dev/sdd:512:3072



      But I cannot rely on that stick always being mapped to sdd, thatswhy even Arch-Wiki recommends using the disks ID, namely:



      cryptkey=/dev/disk/by-id/$ID_OF_USB_STICK$:512:3072



      BUT: USB-Sticks are getting IDs that contain colons and so the device is not found on boot, even if I try to escape the colon with a backslash. The system always seems to look for the ID before the colon.



      Using cryptkey=UUID=... would only work, if I use space/sector inside a partition, not before or between.



      So, I'm really stuck here. Someone any suggestions, how to solve this without rely on sdX and the possibility to accidentally overwrite/delete the key by putting it inside a partition? Would it be an option to manipulate rules.d of udev to change the way the IDs(and symlinks) for USB-Sticks are created?







      arch-linux grub luks dm-crypt kernel-parameters






      share|improve this question







      New contributor



      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 4 hours ago









      Andreas H.Andreas H.

      1084




      1084




      New contributor



      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Andreas H. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          });


          }
          });






          Andreas H. is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f518082%2faddressing-usb-stick-by-uuid-as-kernel-parameter-in-grub-cfg%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Andreas H. is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Andreas H. is a new contributor. Be nice, and check out our Code of Conduct.













          Andreas H. is a new contributor. Be nice, and check out our Code of Conduct.












          Andreas H. is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f518082%2faddressing-usb-stick-by-uuid-as-kernel-parameter-in-grub-cfg%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

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...