{"id":6471,"date":"2024-09-11T17:28:43","date_gmt":"2024-09-11T21:28:43","guid":{"rendered":"https:\/\/microdevsys.com\/wp\/?p=6471"},"modified":"2024-09-12T15:34:24","modified_gmt":"2024-09-12T19:34:24","slug":"identifying-ubuntu-nvme-drives-based-on-bus-number","status":"publish","type":"post","link":"https:\/\/microdevsys.com\/wp\/identifying-ubuntu-nvme-drives-based-on-bus-number\/","title":{"rendered":"Identifying Ubuntu NVMe Drives based on Bus Number"},"content":{"rendered":"<p>There are three NVMe&#8217;s in a laptop. Two of the NVMe&#8217;s are the exact same model, Intel, and the other is a Kingston NVMe. All NVMe&#8217;s are 512GB. All are running either Windows 11 on the two identical drives, or Windows 10 on the Kingston drive. I want to keep only the second NVMe drive with Windows 11, and overwrite the first NVMe one, with Ubuntu.<\/p>\n<p>However, when Ubuntu installation starts up, the NVMe drives show up as nvme0n1, nvme1n1 and nvme2n1.<\/p>\n<p>The drives are as follows and their Bus Numbers as per the BIOS, are as follows:<\/p>\n<p style=\"padding-left: 40px;\">1 &#8211; Intel SSDPEKNW512G8, Bus:2, Dev: 0, Func: 0<br \/>\n2 &#8211; Kingston RBUSNS8154P3512GJ3, Bus: 3, Dev: 0, Func: 0<br \/>\n3 &#8211; SSDPEKNW512G8, Bus: 4, Dev: 0, Func: 0<\/p>\n<p>How do I tell which one I can overwrite without destroying drive #3 above, which I need to ensure retains the Windows 11 installation?<\/p>\n<p>It turns out we can tell from the Ubuntu Installation command line as follows:<\/p>\n<ul>\n<li>Press Ctrl &#8211; Alt &#8211; T, to open the Ubuntu Installation Linux command line.<\/li>\n<li>Issue\n<p><span style=\"font-family: 'courier new', courier, monospace;\"><strong>sudo su &#8211;<\/strong><\/span><\/p>\n<p>to become the root (superuser)<\/li>\n<li>Issue the following command to list the drives:\n<p><strong><strong><span style=\"font-family: 'courier new', courier, monospace;\">lsblk -o NAME,SIZE,VENDOR,MODEL<\/span><\/p>\n<p><\/strong><\/strong><\/li>\n<li>That should give you printout similar to:\n<p><span style=\"font-family: 'courier new', courier, monospace;\">nvme0n1 476.9G Intel SSDPEKNW512G8<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace;\">nvme1n1 476.9G Kingston RBUSNS8154P3512GJ3<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace;\">nvme2n1 476.9G Intel SSDPEKNW512G8<\/span><\/li>\n<li>Next issue the following to list the bus numbers for each of the NVMe drives:\n<p><strong><strong><span style=\"font-family: 'courier new', courier, monospace;\">lspci|grep -Ei &#8220;nvme|ssd&#8221;<\/span><\/p>\n<p><\/strong><\/strong><\/li>\n<li>This will list the SSD&#8217;s with their Bus numbers as follows:\n<p><span style=\"font-family: 'courier new', courier, monospace;\"><strong>02<\/strong>:00:00 Non-Volatile memory controller: Intel Corporation SSD 660P Series (rev 03)<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace;\"><strong>03<\/strong>:00:00 Non-Volatile memory controller: Kingston Technology Company, Inc.\u00a0 A1000\/U-SNS8154P3 x2 NVMe SSD (rev 01)<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace;\"><strong>04<\/strong>:00:00 Non-Volatile memory controller: Intel Corporation SSD 660P Series (rev 03)<\/span><\/li>\n<li>Each number above corresponding to the Bus identified in BIOS earlier.<\/li>\n<\/ul>\n<p>An additional check that can be ran is using<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace;\">fdisk -l<\/span><\/p>\n<p>in Linux and comparing that to the Windows 10\/11 diskpart output.\u00a0 Both commands will display a Disk ID or Disk Identifier, that is unique for the filesystem MBR when the partitions were first created and laid down.\u00a0 This won&#8217;t change until the disk is repartitioned.<\/p>\n<p>Steps on Linux<\/p>\n<ul>\n<li>Start a Terminal.<\/li>\n<li>Become root:\n<p><strong><span style=\"font-family: 'courier new', courier, monospace;\">sudo su &#8211;<\/span><\/p>\n<p><\/strong><\/li>\n<li>Execute\n<p><span style=\"font-family: 'courier new', courier, monospace;\"><strong>fdisk -l<\/strong><\/span><\/li>\n<\/ul>\n<p>On Windows 10\/11:<\/p>\n<ul>\n<li>Start command prompt as administrator.<\/li>\n<li>Execute:\n<p><strong><span style=\"font-family: 'courier new', courier, monospace;\">diskpart<\/span><\/p>\n<p><\/strong><\/li>\n<li>Within diskpart, execute the following:\n<p><span style=\"font-family: 'courier new', courier, monospace;\">select disk 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# Change to the disk you wish to check other then 0.<\/span><br \/>\n<span style=\"font-family: 'courier new', courier, monospace;\">detail disk<\/span><\/li>\n<\/ul>\n<p>The additional, or secondary check could also be the only check needed or possible, since the windows Bus Information as &#8220;Bus Number 0&#8221; appeared for all the drives.\u00a0 This was confusing.<\/p>\n<p>Regardless, Happy Installing!<\/p>\n<p>Cheers,<br \/>\nHTH<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>There are three NVMe&#8217;s in a laptop. Two of the NVMe&#8217;s are the exact same model, Intel, and the other is a Kingston NVMe. All NVMe&#8217;s are 512GB. All are running either Windows 11 on the two identical drives, or Windows 10 on the Kingston drive. I want to keep only the second NVMe drive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-6471","post","type-post","status-publish","format-standard","hentry","category-unix-linux-admin-stuff"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/posts\/6471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/comments?post=6471"}],"version-history":[{"count":5,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/posts\/6471\/revisions"}],"predecessor-version":[{"id":6478,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/posts\/6471\/revisions\/6478"}],"wp:attachment":[{"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/media?parent=6471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/categories?post=6471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microdevsys.com\/wp\/wp-json\/wp\/v2\/tags?post=6471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}