cannot remove disk/partition name

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have partially overwritten my system disk with a copy of CentOS-7-x86_64-DVD-1708.iso (wrong /dev/sdX in the dd command). I since recovered from this and I notice that in Ubuntu 16.04 /dev/sdb1 (which is in fact a swap partition and should not have a name) is given the name "CentOS 7 x86_64":



$ ls -l /dev/disk/by-label/ 
total 0
lrwxrwxrwx 1 root root 10 May 4 12:29 Backup -> ../../sda2
lrwxrwxrwx 1 root root 10 May 4 12:29 centos7 -> ../../sdb2
lrwxrwxrwx 1 root root 10 May 4 12:29 CentOSx207x20x86_64 -> ../../sdb1 <===== ? swap partition
lrwxrwxrwx 1 root root 10 May 4 12:29 data -> ../../sdb5
lrwxrwxrwx 1 root root 10 May 4 12:29 Data -> ../../sda1
lrwxrwxrwx 1 root root 10 May 4 12:29 ubuntu -> ../../sdb3


I have an Ubuntu 14.04 on another drive which also assigns this name to a partition on drive /dev/sdb :



$ ls -l /dev/disk/by-label/
total 0
lrwxrwxrwx 1 root root 10 May 4 14:16 Backup -> ../../sda2
lrwxrwxrwx 1 root root 10 May 4 14:16 centos7 -> ../../sdb2
lrwxrwxrwx 1 root root 10 May 4 14:16 CentOSx207x20x86_64 -> ../../sdb4 <=== ? extended partition
lrwxrwxrwx 1 root root 10 May 4 14:16 data -> ../../sdb5
lrwxrwxrwx 1 root root 10 May 4 14:16 Data -> ../../sda1
lrwxrwxrwx 1 root root 10 May 4 14:16 ubuntu -> ../../sdb3


This time it is /dev/sdb4 which the extended partition container and hence should not have any name either.



Search as I may I did not find where this names comes from and how to get rid of it.



The trouble is that when I try to install a CentOS 7 (from a USB key) the installer scripts looks for a disk labeled "CentOS 7 x86_64" and picks a partition on /dev/sdb rather than the USB key (which is at /dev/sdc in my system).



Come someone help me to solve this issue ?
Thanks.







share|improve this question























    up vote
    0
    down vote

    favorite












    I have partially overwritten my system disk with a copy of CentOS-7-x86_64-DVD-1708.iso (wrong /dev/sdX in the dd command). I since recovered from this and I notice that in Ubuntu 16.04 /dev/sdb1 (which is in fact a swap partition and should not have a name) is given the name "CentOS 7 x86_64":



    $ ls -l /dev/disk/by-label/ 
    total 0
    lrwxrwxrwx 1 root root 10 May 4 12:29 Backup -> ../../sda2
    lrwxrwxrwx 1 root root 10 May 4 12:29 centos7 -> ../../sdb2
    lrwxrwxrwx 1 root root 10 May 4 12:29 CentOSx207x20x86_64 -> ../../sdb1 <===== ? swap partition
    lrwxrwxrwx 1 root root 10 May 4 12:29 data -> ../../sdb5
    lrwxrwxrwx 1 root root 10 May 4 12:29 Data -> ../../sda1
    lrwxrwxrwx 1 root root 10 May 4 12:29 ubuntu -> ../../sdb3


    I have an Ubuntu 14.04 on another drive which also assigns this name to a partition on drive /dev/sdb :



    $ ls -l /dev/disk/by-label/
    total 0
    lrwxrwxrwx 1 root root 10 May 4 14:16 Backup -> ../../sda2
    lrwxrwxrwx 1 root root 10 May 4 14:16 centos7 -> ../../sdb2
    lrwxrwxrwx 1 root root 10 May 4 14:16 CentOSx207x20x86_64 -> ../../sdb4 <=== ? extended partition
    lrwxrwxrwx 1 root root 10 May 4 14:16 data -> ../../sdb5
    lrwxrwxrwx 1 root root 10 May 4 14:16 Data -> ../../sda1
    lrwxrwxrwx 1 root root 10 May 4 14:16 ubuntu -> ../../sdb3


    This time it is /dev/sdb4 which the extended partition container and hence should not have any name either.



    Search as I may I did not find where this names comes from and how to get rid of it.



    The trouble is that when I try to install a CentOS 7 (from a USB key) the installer scripts looks for a disk labeled "CentOS 7 x86_64" and picks a partition on /dev/sdb rather than the USB key (which is at /dev/sdc in my system).



    Come someone help me to solve this issue ?
    Thanks.







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have partially overwritten my system disk with a copy of CentOS-7-x86_64-DVD-1708.iso (wrong /dev/sdX in the dd command). I since recovered from this and I notice that in Ubuntu 16.04 /dev/sdb1 (which is in fact a swap partition and should not have a name) is given the name "CentOS 7 x86_64":



      $ ls -l /dev/disk/by-label/ 
      total 0
      lrwxrwxrwx 1 root root 10 May 4 12:29 Backup -> ../../sda2
      lrwxrwxrwx 1 root root 10 May 4 12:29 centos7 -> ../../sdb2
      lrwxrwxrwx 1 root root 10 May 4 12:29 CentOSx207x20x86_64 -> ../../sdb1 <===== ? swap partition
      lrwxrwxrwx 1 root root 10 May 4 12:29 data -> ../../sdb5
      lrwxrwxrwx 1 root root 10 May 4 12:29 Data -> ../../sda1
      lrwxrwxrwx 1 root root 10 May 4 12:29 ubuntu -> ../../sdb3


      I have an Ubuntu 14.04 on another drive which also assigns this name to a partition on drive /dev/sdb :



      $ ls -l /dev/disk/by-label/
      total 0
      lrwxrwxrwx 1 root root 10 May 4 14:16 Backup -> ../../sda2
      lrwxrwxrwx 1 root root 10 May 4 14:16 centos7 -> ../../sdb2
      lrwxrwxrwx 1 root root 10 May 4 14:16 CentOSx207x20x86_64 -> ../../sdb4 <=== ? extended partition
      lrwxrwxrwx 1 root root 10 May 4 14:16 data -> ../../sdb5
      lrwxrwxrwx 1 root root 10 May 4 14:16 Data -> ../../sda1
      lrwxrwxrwx 1 root root 10 May 4 14:16 ubuntu -> ../../sdb3


      This time it is /dev/sdb4 which the extended partition container and hence should not have any name either.



      Search as I may I did not find where this names comes from and how to get rid of it.



      The trouble is that when I try to install a CentOS 7 (from a USB key) the installer scripts looks for a disk labeled "CentOS 7 x86_64" and picks a partition on /dev/sdb rather than the USB key (which is at /dev/sdc in my system).



      Come someone help me to solve this issue ?
      Thanks.







      share|improve this question











      I have partially overwritten my system disk with a copy of CentOS-7-x86_64-DVD-1708.iso (wrong /dev/sdX in the dd command). I since recovered from this and I notice that in Ubuntu 16.04 /dev/sdb1 (which is in fact a swap partition and should not have a name) is given the name "CentOS 7 x86_64":



      $ ls -l /dev/disk/by-label/ 
      total 0
      lrwxrwxrwx 1 root root 10 May 4 12:29 Backup -> ../../sda2
      lrwxrwxrwx 1 root root 10 May 4 12:29 centos7 -> ../../sdb2
      lrwxrwxrwx 1 root root 10 May 4 12:29 CentOSx207x20x86_64 -> ../../sdb1 <===== ? swap partition
      lrwxrwxrwx 1 root root 10 May 4 12:29 data -> ../../sdb5
      lrwxrwxrwx 1 root root 10 May 4 12:29 Data -> ../../sda1
      lrwxrwxrwx 1 root root 10 May 4 12:29 ubuntu -> ../../sdb3


      I have an Ubuntu 14.04 on another drive which also assigns this name to a partition on drive /dev/sdb :



      $ ls -l /dev/disk/by-label/
      total 0
      lrwxrwxrwx 1 root root 10 May 4 14:16 Backup -> ../../sda2
      lrwxrwxrwx 1 root root 10 May 4 14:16 centos7 -> ../../sdb2
      lrwxrwxrwx 1 root root 10 May 4 14:16 CentOSx207x20x86_64 -> ../../sdb4 <=== ? extended partition
      lrwxrwxrwx 1 root root 10 May 4 14:16 data -> ../../sdb5
      lrwxrwxrwx 1 root root 10 May 4 14:16 Data -> ../../sda1
      lrwxrwxrwx 1 root root 10 May 4 14:16 ubuntu -> ../../sdb3


      This time it is /dev/sdb4 which the extended partition container and hence should not have any name either.



      Search as I may I did not find where this names comes from and how to get rid of it.



      The trouble is that when I try to install a CentOS 7 (from a USB key) the installer scripts looks for a disk labeled "CentOS 7 x86_64" and picks a partition on /dev/sdb rather than the USB key (which is at /dev/sdc in my system).



      Come someone help me to solve this issue ?
      Thanks.









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 8 at 12:58









      Frederic

      1




      1




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          If /dev/sdb1 is a swap parition, then you can update the label using mkswap. This will re-format the swap partition; there may be other options to avoid that:



          # swapoff /dev/sdb1
          # mkswap -L swap_part /dev/sdb1
          # swapof /dev/sdb1


          Here, 'swap_part' is the new label:



          $ ls -l /dev/disk/by-label
          ...
          lrwxrwxrwx 1 root root 9 May 8 09:32 swap_part -> ../../sdb1
          ...


          If you want to remove the label all together, you can set it to the empty string:



          # mkswap -L "" /dev/sdb1





          share|improve this answer























          • I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
            – Frederic
            May 9 at 7:03










          • I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
            – Frederic
            May 9 at 7:11










          • @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
            – Andy Dalton
            May 9 at 17:07











          • no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
            – Frederic
            May 9 at 21:43











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442537%2fcannot-remove-disk-partition-name%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          If /dev/sdb1 is a swap parition, then you can update the label using mkswap. This will re-format the swap partition; there may be other options to avoid that:



          # swapoff /dev/sdb1
          # mkswap -L swap_part /dev/sdb1
          # swapof /dev/sdb1


          Here, 'swap_part' is the new label:



          $ ls -l /dev/disk/by-label
          ...
          lrwxrwxrwx 1 root root 9 May 8 09:32 swap_part -> ../../sdb1
          ...


          If you want to remove the label all together, you can set it to the empty string:



          # mkswap -L "" /dev/sdb1





          share|improve this answer























          • I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
            – Frederic
            May 9 at 7:03










          • I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
            – Frederic
            May 9 at 7:11










          • @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
            – Andy Dalton
            May 9 at 17:07











          • no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
            – Frederic
            May 9 at 21:43















          up vote
          0
          down vote













          If /dev/sdb1 is a swap parition, then you can update the label using mkswap. This will re-format the swap partition; there may be other options to avoid that:



          # swapoff /dev/sdb1
          # mkswap -L swap_part /dev/sdb1
          # swapof /dev/sdb1


          Here, 'swap_part' is the new label:



          $ ls -l /dev/disk/by-label
          ...
          lrwxrwxrwx 1 root root 9 May 8 09:32 swap_part -> ../../sdb1
          ...


          If you want to remove the label all together, you can set it to the empty string:



          # mkswap -L "" /dev/sdb1





          share|improve this answer























          • I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
            – Frederic
            May 9 at 7:03










          • I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
            – Frederic
            May 9 at 7:11










          • @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
            – Andy Dalton
            May 9 at 17:07











          • no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
            – Frederic
            May 9 at 21:43













          up vote
          0
          down vote










          up vote
          0
          down vote









          If /dev/sdb1 is a swap parition, then you can update the label using mkswap. This will re-format the swap partition; there may be other options to avoid that:



          # swapoff /dev/sdb1
          # mkswap -L swap_part /dev/sdb1
          # swapof /dev/sdb1


          Here, 'swap_part' is the new label:



          $ ls -l /dev/disk/by-label
          ...
          lrwxrwxrwx 1 root root 9 May 8 09:32 swap_part -> ../../sdb1
          ...


          If you want to remove the label all together, you can set it to the empty string:



          # mkswap -L "" /dev/sdb1





          share|improve this answer















          If /dev/sdb1 is a swap parition, then you can update the label using mkswap. This will re-format the swap partition; there may be other options to avoid that:



          # swapoff /dev/sdb1
          # mkswap -L swap_part /dev/sdb1
          # swapof /dev/sdb1


          Here, 'swap_part' is the new label:



          $ ls -l /dev/disk/by-label
          ...
          lrwxrwxrwx 1 root root 9 May 8 09:32 swap_part -> ../../sdb1
          ...


          If you want to remove the label all together, you can set it to the empty string:



          # mkswap -L "" /dev/sdb1






          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited May 8 at 13:40


























          answered May 8 at 13:35









          Andy Dalton

          4,7561520




          4,7561520











          • I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
            – Frederic
            May 9 at 7:03










          • I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
            – Frederic
            May 9 at 7:11










          • @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
            – Andy Dalton
            May 9 at 17:07











          • no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
            – Frederic
            May 9 at 21:43

















          • I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
            – Frederic
            May 9 at 7:03










          • I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
            – Frederic
            May 9 at 7:11










          • @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
            – Andy Dalton
            May 9 at 17:07











          • no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
            – Frederic
            May 9 at 21:43
















          I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
          – Frederic
          May 9 at 7:03




          I also had to change the mounting of the swap partition in /etc/fstab as the UUID of the partition was modified. HOWEVER this has not changed anything : after a reboot ls /dev/disk/by-label/ still shows "CentOS 7 x86_64" as pointing to /dev/sdb1 ...
          – Frederic
          May 9 at 7:03












          I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
          – Frederic
          May 9 at 7:11




          I had used an empty label but I have now also tried with a non-empty label: it does not make a difference.
          – Frederic
          May 9 at 7:11












          @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
          – Andy Dalton
          May 9 at 17:07





          @Frederic When I run those commands, the content of /dev/disk/by-label updates dynamically. I see the changes immediately. Is sdb4 the partition that you want to have that label?
          – Andy Dalton
          May 9 at 17:07













          no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
          – Frederic
          May 9 at 21:43





          no, I don't want /dev/sdb4 to have this label it just happened and I only see this label on /dev/sdb4 when I boot the Ubuntu 14.04 on /dev/sda3. /dev/sdb4 is the MBR extended partion container which contains /dev/sdb5 with an ext4 file system labeled "data".
          – Frederic
          May 9 at 21:43













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442537%2fcannot-remove-disk-partition-name%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?