Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev/cdrom* disappeared
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 102

PostPosted: Wed Sep 22, 2010 4:27 pm    Post subject: /dev/cdrom* disappeared Reply with quote

Hello,

I seldom use cdrom/dvd device, but in the recent weeks I noticed that that the /dev/cdrom* and /dev/dvd links disappeared from the virtual filesystem. I then configured software with dev=/dev/hdc (mplayer, xine) or dev=1001,0,0 (cdrecord). It works, but it is now necessary to launch the software as root to access the data or play the movie, although the normal user belongs to the usual groups (audio cdrom video cdrw plugdev etc.). I don't use anything fancy (no automounter, I use fluxbox and the command line). What has “recently” changed (I have not used my cdrom drive for around a year) and what can I now do to access optical media as normal user?

I use gentoo (mostly) stable on amd64, vanilla-sources 2.6.35.5, udev-151-r4

Thanks for help,
ecko
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54306
Location: 56N 3W

PostPosted: Wed Sep 22, 2010 7:37 pm    Post subject: Reply with quote

ecko,

udev no longer makes /dev nodes for /dev/hd... you need to migrate to libata
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 102

PostPosted: Wed Sep 22, 2010 8:41 pm    Post subject: Reply with quote

Hi, thanks for the answer. Since this migration needs some time and care I'll do over the week-end and report problems if any. [By the way you say in you guide that it should be too late already (my system should not boot anymore). Yet I have all the /dev/hda nodes for my internal IDE hdd and my system is usable. Good that I did not find the problem too late; ]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54306
Location: 56N 3W

PostPosted: Wed Sep 22, 2010 8:46 pm    Post subject: Reply with quote

ecko,

That means that you have an old udev - so this may not be your problem.
Most users find out about /dev/hd... going away when the system will not boot because the /dev/ node for the root filesystem is missing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 102

PostPosted: Fri Oct 22, 2010 7:23 am    Post subject: Reply with quote

Just to let now the end to people who might have found this page through a search engine: switching to libata solved the issue; /dev/cdrom is now again a valid link (to /dev/sr0)

But it is not necessary to switch from /dev/hda to /dev/sda in the /etc/fstab. One can use the labels and UUID. Say, one's system works or the disk has been mounted using a livecd, either as /dev/hda or /dev/sda. Then launch /sbin/e2label to set the label name

Example, on my disk, the /dev/hda1 contains the /boot directory, let's call it "Boot." /dev/hda3 contains the root, let's call it "Root."
(In this example I assume the old kernel config where hdxx is used instead of sdxx, but of course it works the same with both notations. I uses here the partition scheme of my disk, one must adapt the number to his partitions.)

Code:

# e2label /dev/hda1 Boot
# e2label /dev/hda3 Root
# e2label /dev/hda5 Home


Then the string "LABEL=Boot" can be used instead of /dev/hda1 or /dev/sda1 in the fstab. The /etc/fstab now looks like:

Code:

LABEL=Boot              /boot                   ext2            noatime,noauto,sync             1 2
LABEL=Root              /                       ext3            noatime,rw                      0 1
LABEL=Home              /home                   ext4            noatime,rw                      0 2


This will boot with both and new udev, because there is no more a reference to sda or hda.

Another option is to used the UUID of the partitions instead of the label. One can discover the UUID of the partition by

Code:
# dumpe2fs /dev/hda1 |head


The first lines will tell: the label (the same we set above with e2label) and the UUID, a complex string like 1ad0505e-19c0-... One can use UUID=1ad0505e-19c0-... in fstab the same way as LABEL=Boot, but this tends to obfuscate fstab (and hence complicate maintenance).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54306
Location: 56N 3W

PostPosted: Fri Oct 22, 2010 9:10 pm    Post subject: Reply with quote

ecko,

What do you use in grub.conf ?
Do you have an initrd ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 102

PostPosted: Sun Oct 24, 2010 1:24 pm    Post subject: grub.conf, initrd Reply with quote

I don't use initrd (if someone can explain what I could gain using it if all the drivers required at boot are compiled inside the kernel).

Code:

title=GNU+Linux 2.6.35.6-ata
kernel /kernel-x86_64-2.6.35.6-ata root=/dev/sda3 vga=0x318 video=vesafb:mtrr,ywrap quiet CONSOLE=/dev/tty1


Actually I manually patch the kernel (outside the control of portage). I found out portage was much slower for the same task, as it needs to uncompress the full kernel everytime, which on my old laptop uses a lot of IO for many minutes. Also rm -rf /usr/src/old-kernel is faster than emerge --unmerge (and I need the rm -rf anyway because emerge will not remove everything). I don't try to be mean, portage is a great piece of software (and my main reason for using gentoo), maybe on a faster setup I would use let it patch the kernel.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54306
Location: 56N 3W

PostPosted: Sun Oct 24, 2010 2:13 pm    Post subject: Reply with quote

ecko,

Hmm, you use the default root=, built into the kernel when its complied. It uses whatever it finds the local root filesystem on.
That will be the /dev/sda3 or whatever.

I thought you used root=LABEL=<root_fs_label> or maybe the UUID form.
I know the UUID form needs an initrd but I'm not sure about LABEL.

All you would gain from an initrd is to be able to mount root the same way as you identify partitions in /etc/fstab
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum