Jump to content


Photo

How replace sdb1 or sdc1 by a name?


  • Please log in to reply
30 replies to this topic

#1 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 25 November 2014 - 13:25

Hi,

 

When I connect a disk, I see sdb1 or sdc1. Ok but this name can vary :

- if the box is running, when I connect an external hard disk, it takes SDC1,

- if the box is booted with the external disk plugged, the disk takes sdb1.

 

It's not convenient because I use scripts to use the external disk (backup disk for example). If I could use a name it would be more convenient. I've tries some solutions (I don't know very well Linux) but I have always sdb1 (or sdc1).

 

I tried "e2label", write a label with Gparted, but nothing appears on the box whine this label is visible and used in Windows Explorer.

 

A few months ago, I tried "mount" (I don't remember what I did), but it didn't work.

 

Did somebody find a solution please?

 

Thank you :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #2 rolf2

  • Member
  • 17 posts

0
Neutral

Posted 25 November 2014 - 16:25

you can mount disk by UUID in fstab



Re: How replace sdb1 or sdc1 by a name? #3 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 25 November 2014 - 18:09

Ok I will see it.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #4 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 25 November 2014 - 19:17

Label the disk.

If it has a label, it will be mounted using that label. Otherwise it'll use the (varying) device name.
Real musicians never die - they just decompose

Re: How replace sdb1 or sdc1 by a name? #5 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 25 November 2014 - 19:38

Excuse me MiLo but I'm not sure I understand you. My discs have labels, if I type : "e2label /dev/sdc1", I get "Backup-disk" (for one of them) but I only see sdc1 on the tree in movie player or with Dream Explorer or from Windows explorer. But if I connect the disk in the PC, it have its name in the windows tree and not sdc1.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #6 Meega

  • Senior Member
  • 3,000 posts

+51
Good

Posted 25 November 2014 - 19:53

Where did you get "e2label"?

I can't find it.

 

So perhaps that's the problem?


ET10000+ Openpli 6.1,1m schotel 4x duo-lnb op vaste opstelling.

Momolights teensy 2.0 met 50 leds op een string ,150 channels
DM8000 Openpli 6.1 Release


Re: How replace sdb1 or sdc1 by a name? #7 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 25 November 2014 - 21:07

I've used e2label which is in the box, I haven't downloaded it. I looked for the commands in the Linux command tutorials, I've found e2label, I tried it, it was present in the box and it gave a label I can see with Windows. I tried label with Gparted but the result is exactly the same.


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #8 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 25 November 2014 - 21:15

and what's the filesystem of your usb disk?


True sarcasm doesn't need green font...

Re: How replace sdb1 or sdc1 by a name? #9 Dimitrij

  • PLi® Core member
  • 9,993 posts

+338
Excellent

Posted 25 November 2014 - 21:16

tune2fs /dev/sdc1 -L your_name


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: How replace sdb1 or sdc1 by a name? #10 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 25 November 2014 - 23:22

What is better? Tune2fs or fstab?

 

All the disks I connect to the box are ext4 because I've red on this forum it's the quickest and effectively, it's much more quicker than NTFS. Thus, it's better for very fat files ;) .

 

Thank you for the advices :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #11 Pike_Bishop

  • Senior Member
  • 1,130 posts

+72
Good

Posted 25 November 2014 - 23:41

Hi,

 

 

What is better? Tune2fs or fstab?

 

 i personally use disk by uuid in fstab, but i heard from some users that it works also perfect with label so then it's just as well and easier.

 

regards

Biki3


Receiver: VU Ultimo 4K, Octagon SF8008 4K, Gigablue Quad 4K

Image: OpenPLI-8.3


Re: How replace sdb1 or sdc1 by a name? #12 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 November 2014 - 07:32

e2label should work too, but I never tried it. I did test with tune2fs, and that worked well.

Make sure you don't have any "handy" plugin that messes with the way things are being mounted. Multiboot may also mess with mounts, don't use it.
Real musicians never die - they just decompose

Re: How replace sdb1 or sdc1 by a name? #13 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 26 November 2014 - 12:06


 i personally use disk by uuid in fstab, but i heard from some users that it works also perfect with label so then it's just as well and easier.

 

What do you want to say.with this word uuid?

 

 

e2label should work too, but I never tried it. I did test with tune2fs, and that worked well.

Make sure you don't have any "handy" plugin that messes with the way things are being mounted. Multiboot may also mess with mounts, don't use it.

 

If I type e2label /dev/sdc1, I see "BackupDisk", if I go in /media and type ls, I see sdc1 :unsure: .

 

I don't use multiboot and I don't know if I have a bad plugin. When you said me MultiQuickButton is bad, I've removed it.

 

 

tune2fs /dev/sdc1 -L BackupDisk give's the same result as e2label.

 

I've seen fstab, it's not a program but a simple file which contains informations :

 

rootfs               /                    auto       defaults              1  1
proc                 /proc                proc       defaults              0  0
devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
usbdevfs             /proc/bus/usb        usbdevfs   noauto                0  0
tmpfs                /var/volatile        tmpfs      defaults              0  0

 

If I add something as :

/dev/scd1       /media/BackupDisk  defaults              0  0
 
Can it works?

 

Thank you :) .

 

PS : blzr, my disk is connected with esata.


Edited by sjlouis, 26 November 2014 - 12:07.

Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #14 ims

  • PLi® Core member
  • 13,623 posts

+212
Excellent

Posted 26 November 2014 - 12:09

type: blkid in telnet and you will see uuid and label of your devices.


Kdo nic nedělá, nic nezkazí!

Re: How replace sdb1 or sdc1 by a name? #15 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 26 November 2014 - 15:28

Ok I've used blkid and I got :

/dev/sdc1: LABEL="BackupDisk" UUID="0e43c540-a28e-4e09-9ba8-0177b38cb4cf" TYPE="ext4"

 

Ok, you can see there is a label but it doesn't use it and if I've just looked on Internet to understand how to use it, I haven't very well understood.

 

Biki, how do you see your external disc? With sdc1 or with a label?


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #16 ims

  • PLi® Core member
  • 13,623 posts

+212
Excellent

Posted 26 November 2014 - 15:42

Use or label or UUID:

UUID=0e43c540-a28e-4e09-9ba8-0177b38cb4cf /media/hdd auto defaults 0 0

Kdo nic nedělá, nic nezkazí!

Re: How replace sdb1 or sdc1 by a name? #17 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 26 November 2014 - 15:48

Sorry ims, I don't understand. First, there is hdd in your sentence while I use sdc1 and I don't see the name I want to give :unsure: .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #18 ims

  • PLi® Core member
  • 13,623 posts

+212
Excellent

Posted 26 November 2014 - 15:50

instead device name is there used UUID and /media/hdd is how you want mount it  ( write it to fstab and rebot box)


Edited by ims, 26 November 2014 - 15:51.

Kdo nic nedělá, nic nezkazí!

Re: How replace sdb1 or sdc1 by a name? #19 sjlouis

  • Senior Member
  • 1,538 posts

+3
Neutral

Posted 26 November 2014 - 16:06

Ok, I have to write this :

 

UUID="0e43c540-a28e-4e09-9ba8-0177b38cb4cf" /media/BackupDisk auto defaults 0 0

 

Does I have to write the quote "" or not?

 

Thank you ims :) .


Vu+ Ultimo 4K - OpenPli 8.3

Xtrend ET9200 - OpenPli 6.2


Re: How replace sdb1 or sdc1 by a name? #20 ims

  • PLi® Core member
  • 13,623 posts

+212
Excellent

Posted 26 November 2014 - 16:08

without "" !


Kdo nic nedělá, nic nezkazí!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users