[solved] thinkpad t400s cd drive replacement disc mounting

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[solved] thinkpad t400s cd drive replacement disc mounting

Postby Onsemeliot » 2018-09-17 10:43

I use a Technoethical refurbished ThinkPad t400s with 64bit Debian stretch and recently decided to swap my compact disc drive for an additional hard disc. It basically works but for some odd reason the disk doesn't mount automatically but can be found only under "other locations" in Nautilus and I need to type in my root password before I can access it.

I guess it can be set up in a way that it just shows up in Nautilus like other normal (even external) discs and without the need to type in the root password? Do you have any idea why this disc might show up in this particular way and how I might be able to change that?
Last edited by Onsemeliot on 2018-09-17 14:58, edited 1 time in total.
User avatar
Onsemeliot
 
Posts: 166
Joined: 2010-12-15 14:43

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby arzgi » 2018-09-17 10:52

In terminal run as root
Code: Select all
blkid


then, as normal user
Code: Select all
cat /etc/fstab


Paste both, if you are not familiar with those. Idea is that you should get UUID of new disk to fstab.
arzgi
 
Posts: 387
Joined: 2008-02-21 17:03
Location: Finland

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby arochester » 2018-09-17 11:50

It's a bit old, but this suggests that the DVD-Rom will power off when not in use - and similarly the Hard Drive in the uUtrabay will power off.

https://www.linuxquestions.org/question ... 175531429/
arochester
 
Posts: 1328
Joined: 2010-12-07 19:55

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby arzgi » 2018-09-17 12:08

arochester wrote:It's a bit old, but this suggests that the DVD-Rom will power off when not in use - and similarly the Hard Drive in the uUtrabay will power off.


I've set my hdds spin down after certain idle time. When I need those, I don't have to anything unusual, of course there is a short lag, when hdd spins up. All UUIDs are in fstab.

From /etc/fstab:
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).

So I would try. If power is not controlled by kernel, then it can be tricky,
arzgi
 
Posts: 387
Joined: 2008-02-21 17:03
Location: Finland

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby Onsemeliot » 2018-09-17 12:58

arzgi wrote:Paste both, if you are not familiar with those. Idea is that you should get UUID of new disk to fstab.

Thank you very much for your fast answers. The disk "160gb" (sdb1) clearly gets recognized as root but is misinterpreted as CD drive as a normal user:

Code: Select all
# blkid
/dev/mapper/sda5_crypt: UUID="eICKHI-aw0t-sJU9-p42S-ivio-QqXu-XcBVkS" TYPE="LVM2_member"
/dev/mapper/pc--pers--vg-root: UUID="470af472-b9bc-4c76-8b1b-7edea9556aa5" TYPE="ext4"
/dev/sda1: UUID="cdfccc03-136a-4b98-a626-4c2c55117a83" TYPE="ext2" PARTUUID="c2f7c768-01"
/dev/sda5: UUID="02a5f41b-f3f5-4e8e-ae98-729c789b0371" TYPE="crypto_LUKS" PARTUUID="c2f7c768-05"
/dev/sdb1: LABEL="160gb" UUID="2aec4e55-db00-4cef-8f09-25d47c4b5216" TYPE="ext4"
/dev/mapper/pc--pers--vg-swap_1: UUID="a79a0e73-b554-4616-9875-306dafa6e0ac" TYPE="swap"

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/pc--pers--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=cdfccc03-136a-4b98-a626-4c2c55117a83 /boot           ext2    defaults        0       2
/dev/mapper/pc--pers--vg-swap_1 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
User avatar
Onsemeliot
 
Posts: 166
Joined: 2010-12-15 14:43

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby arzgi » 2018-09-17 13:36

Now you should identify your disks.

Code: Select all
/dev/disk/by-uuid/
might help doing that.

Then make mount point, some directory.

As root edit /etc/fstab, add line for your new disk:
Code: Select all
 UUID = [blkid]      [mount point]   [fs type]   defaults    0, 2


After editing, reboot, or as root:
Code: Select all
 mount -a


That was my original idea, but after archoester's post, I say your mileage may vary. Worth try anyway.
arzgi
 
Posts: 387
Joined: 2008-02-21 17:03
Location: Finland

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby p.H » 2018-09-17 14:10

Onsemeliot wrote:The disk "160gb" (sdb1) clearly gets recognized as root but is misinterpreted as CD drive as a normal user:
Code: Select all
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

No, you are misinterpreting the contents of fstab.
This line was added during the installation because a CD drive was present, and it just means that the CD may be mounted on /media/cdrom0 by a normal user.

Now you must add a line to automatically mount the "disk" (actually the filesystem in the partition) on some mount point at boot time.
For example :
Code: Select all
UUID=2aec4e55-db00-4cef-8f09-25d47c4b5216  /extradisk  ext4 nofail

provided that /extradisk is an existing empty directory.
Notes :
- Do not use a mount point in /media, it is reserved for removable media.
- Do not use /mnt or a subdirectory, it is reserved for temporary mounts.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: thinkpad t400s cd drive replacement disc mounting proble

Postby Onsemeliot » 2018-09-17 14:57

Thanks for your help and all your explanations. The disk is now accessible without the need to type my root password. :D
User avatar
Onsemeliot
 
Posts: 166
Joined: 2010-12-15 14:43


Return to Hardware

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable