What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

[RT-N66U] change sdb5 to sda1 etc.

SnoPoX

New Around Here
Hi :)
I have attached an external USB HDD to the router but unfortunately after a power cut (also after reboot) the "mountpoint" (dont know if thats the right term) changes. Sometimes the router shows my HDD as sda1, sda5, sdb3 and so on, the name changes.
The bad thing about this is, that i created some scripts using the "mountpoints", so if the name changes from sda1 to sda5 my scripts dont work anymore.
Is there a way to manually rename the drives or prevent the router giving them new names?
Or do i have to change my scripts?

I am using Merlins RT-N66U_3.0.0.4_374.33_0, the external harddisk is a 2TB NTFS HDD and I hope there is a way to do it without formatting my harddisk :D I also leave my HDD always in the same USB Port.

Thanks in advance!
 
I did not set a label (well, at least not that I know).
I am on Windows 8 and if I look after shared network drives, then I see \\RT-N66U\sdaX
Via telnet (putty) I can see that the harddisk is mounted as "sdaX" (where X is a number). Sometimes its sdb or even sdc, unfortunately I cant reproduce this behaviour everytime. I rebootet the device quite often and for now the harddisks' name/mount stays "sda5".
 
I did not set a label (well, at least not that I know).
I am on Windows 8 and if I look after shared network drives, then I see \\RT-N66U\sdaX
Via telnet (putty) I can see that the harddisk is mounted as "sdaX" (where X is a number). Sometimes its sdb or even sdc, unfortunately I cant reproduce this behaviour everytime. I rebootet the device quite often and for now the harddisks' name/mount stays "sda5".

That means that disk has multiple partitions. sda5 typically appears under Linux if your disk has both primary and extended peratitions, and this would be the first extended partition.

Just set a volume label, that way the disk will mount under /mnt/label instead of /mnt/sdaX.
 
Thank you both! I've tried to set a label with tune2fs, but it didn't work out well:

Code:
admin@RT-N66U:/tmp/home/root# tune2fs -L Test /dev/sda5
tune2fs 1.42.8 (20-Jun-2013)
tune2fs: Bad magic number in super-block while trying to open /dev/sda5
Couldn't find valid filesystem superblock.

Meh, guess I've done something wrong. The harddisk has a NTFS Filesystem, maybe thats the reason. :confused:
 
Thank you both! I've tried to set a label with tune2fs, but it didn't work out well:

Code:
admin@RT-N66U:/tmp/home/root# tune2fs -L Test /dev/sda5
tune2fs 1.42.8 (20-Jun-2013)
tune2fs: Bad magic number in super-block while trying to open /dev/sda5
Couldn't find valid filesystem superblock.

Meh, guess I've done something wrong. The harddisk has a NTFS Filesystem, maybe thats the reason. :confused:

Use Windows to set a label on an NTFS volume. Properties on the drive from within the Computer window.
 
Thank you.
I was wondering why it didn't work since the device got a label when it is connected to a Windows machine via USB.
I figured it out: just don't use a dot "." in your label name. Naming conventions are just not my cup of tea :D Now everthing works fine!
And don't hit me ;)
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top