Re: Disks renamed after update to 'testing'...?
On Mon, Aug 17, 2020, at 4:42 PM, hobie of RMN wrote:
> Hi, All -
>
> My brother has been issuing "mount /dev/sdb1" prior to backing up some
> files to a second hard disk. He lately upgraded to 'testing', and it
> appears (from result of running df) that what the system now calls
> /dev/sdb1 is what he has thought of as /dev/sda1, the system '/'
> partition.
>
> Thanks to the UUID= mechanism, his system still boots properly, but 'mount
> /dev/sdb1' is inappropriate now, could even be the path to madness. :)
>
> Two questions, then: (1) What caused this shift of device naming? And (2)
> How do we fix it? Is this something that can be changed in the BIOS?
> But, if so, what caused it to change in the first place?
>
> Thanks for your time and attenton.
The /dev/sdx names for devices have been unpredictable for quite a while. Which one is sda and which sdb will depend on things like timing -- which one gets recognized by the kernel first.
The best solution is to either use UUID or LABEL when you fsck and/or mount the device. So:
1) Use "df" to find out the device name that the kernel decided to use for your backup disk this time. Let's assume it's /dev/sda1.
2) label that device with the "tune2fs" command (assuming your device contains an ext[234] filesystem. If not, check the man pages for the filesystem you are using.) e.g. "tune2fs -L BACKUP /dev/sda1".
3) then when you want to mount or fsck the device (you do fsck it before mounting it, right?) use "LABEL=BACKUP" instead of "/dev/sdb1".
fsck LABEL=BACKUP
mount LABEL=BACKUP
4) If you're into typing long strings of random characters, you can instead skip the label step and do
fsck UUID=..................
mount UUID=..................
But that's only for masochists, IMHO.
In any case, read the man pages before you try anything, so you'll know what your doing.
Enjoy!
Rick
Reply to: