Bug 145 - Urpmi fails to mount cdrom when they're already listed in /etc/fstab
Summary: Urpmi fails to mount cdrom when they're already listed in /etc/fstab
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
: 396 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-20 23:53 CET by Juergen Harms
Modified: 2012-05-26 20:13 CEST (History)
8 users (show)

See Also:
Source RPM: perl-Hal-Cdroms
CVE:
Status comment:


Attachments

Description Juergen Harms 2011-02-20 23:53:05 CET
Description of problem:

Installing additional packages from the installation medium only works, if the installation DVD is already inserted and mounted. If the DVD is not mounted, I get the usual message (Please insert the medium named ... press Enter when mounted), but inserting the medium and pressing Enter does not have any effect.

As said, the work around is to manually mount the DVD - for instance using the device notifier after inserting the DVE


Version-Release number of selected component (if applicable):


How reproducible:
always


Steps to Reproduce:
1. type "urpmi perl-Tk" (for instance)
2. wait to be asked to insert the medium
3. insert the medium and hit Enter
 urpmi will repeat asking for the medium to be inserted and will not start


Reproducible: 

Steps to Reproduce:
Ahmad Samir 2011-02-21 02:27:59 CET

CC: (none) => thierry.vignaud
Hardware: i586 => All

Ahmad Samir 2011-02-21 02:28:07 CET

Keywords: (none) => Triaged

Comment 1 Thierry Vignaud 2011-03-03 16:39:03 CET
I'ven't checked but I guess we lack the reactor perl packages needed by urpmi (should be a suggests by the name perl-Hal-Cdrom or something like this)
Comment 2 Juergen Harms 2011-03-03 17:28:29 CET
The problem has "gone away" - about a weak after I reported it. Apparently Mageia has secret mageicians working in the background (-
Thierry Vignaud 2011-03-04 10:39:42 CET

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 3 Peter D 2011-04-13 03:38:34 CEST
The problem is back in Beta 1.  

A work around is to comment out the cdrom line from /etc/fstab.  

The installation media was a dvd and /etc/urpmi/urpmi.cfg has a cdrom reference in it.

Status: RESOLVED => REOPENED
CC: (none) => 0123peter
Resolution: FIXED => (none)

Comment 4 Juergen Harms 2011-04-13 11:40:52 CEST
"Has gone away" might also mean that the problem only appears under certain conditions.

After installing Beta 1 I kept my CDROM in the drive. I will now make sure it is always removed and see if I can reproduce what Peter has seen
Comment 5 Peter D 2011-04-19 08:25:17 CEST
It is intermittent, but I have caught an episode on the command line.  


[start cut'n'paste]

[root@test ~]# xrandr
-bash: xrandr: command not found
[root@test ~]# urpmi xrandr
Please insert the medium named "Core media"


installing xrandr-1.3.4-1.mga1.i586.rpm from /media/cdrom/i586/media/core
Preparing...                     ###############################################################
      1/1: xrandr                ###############################################################
[root@test ~]# urpme xrandr
removing xrandr-1.3.4-1.mga1.i586
removing package xrandr-1.3.4-1.mga1.i586
[root@test ~]# eject /dev/sr1
[root@test ~]# urpmi --test xrandr
Please insert the medium named "Core media"
failed to mount /org/freedesktop/Hal/devices/volume_label_1_i586: org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sr1 is listed in /etc/fstab. Refusing to mount.

Please insert the medium named "Core media"

[end cut'n'paste]


After that it just waited, despite the DVD being in the drive.  The important thing seems to be, "Refusing to mount".  

Ejecting and reloading the DVD repeated the error message.  

Control C and repeating the command and it installed xrandr without complaint.
Comment 6 Thierry Vignaud 2011-04-19 10:35:21 CEST
Just to be sure, you've perl-Hal-Cdroms installed?
Can you try again by commenting out the CDROM entry in /etc/fstab?
Comment 7 Peter D 2011-04-21 00:53:34 CEST
[root@test rpms]# rpm -q perl-Hal-Cdroms
perl-Hal-Cdroms-0.03-5.mga1

The problem is intermittent.  One of the things that I did early was to comment out the cdrom line of fstab, which "solved" the problem (but that might have just been a co-incidence.  I put the line back and after a while got the error message, which I reported.
Comment 8 Manuel Hiebel 2011-07-14 20:03:10 CEST
*** Bug 396 has been marked as a duplicate of this bug. ***

CC: (none) => corneliu.dabija

Comment 9 Samuel Verschelde 2011-10-01 00:39:08 CEST
Assigning to maintainer now that our maintainer's database has an entry for this package. Please assign back to bugsquad@mageia.org in case of a mistake from me.

Assignee: bugsquad => thierry.vignaud

Comment 10 Thierry Vignaud 2011-10-10 19:18:45 CEST
But why did you put this line in fstab in the first time?
The installer didn't put it, did it?
You're just getting in the way of HAL...

Priority: Normal => Low
Summary: Urpmi does not install package not-mounted installation medium => Urpmi fails to mount cdrom when they're already listed in /etc/fstab
Severity: normal => enhancement

Comment 11 Peter D 2011-10-11 01:55:33 CEST
I don't think that I put it there.  It was a long time ago.  There is a history of Mandriva getting confused when there are multiple optical drives.  

On one of my computers - which is running Mageia 1 at the moment - there is a DVD reader and a CD writer.  That system has entries in /dev for sr0, sr1 and sr2.  (Also sg[0-4].)
Comment 12 Florian Hubold 2011-11-29 19:29:56 CET
(In reply to comment #10)
> But why did you put this line in fstab in the first time?
> The installer didn't put it, did it?
> You're just getting in the way of HAL...

Well, just FWIW, i've not touched fstab AFAIR, and this is my fstab entry on mga1 installation: 
/dev/sr0 /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0

CC: (none) => doktor5000

Comment 13 Juergen Harms 2011-11-29 21:59:47 CET
Is this bug related to https://bugs.mageia.org/show_bug.cgi?id=3476 ? The detailed behaviour of 3476 is different, but the "ingredients" look quite similar. And, commenting out the cdrom line is an effective workaround also for 3476 - that rather looks like sneeking out of the way of of HAL, not in its way (-.

And I confirm comment 12: I have also kept a copy of the 5-device /etc/fstab that came out of Mageia 1 system generation - identical.

Just to clarify: since comment 2, on my machines the problem (Mageia 1) has never happened again.
Thierry Vignaud 2011-12-06 10:19:23 CET

Source RPM: urpmi-6.40-5 => perl-Hal-Cdroms

Comment 14 Thierry Vignaud 2012-02-07 12:33:24 CET
Could you try with perl-Hal-Cdroms-0.04?

Keywords: (none) => NEEDINFO

Comment 15 Juergen Harms 2012-02-07 19:07:55 CET
Thank you, looks OK now:

For the record: I de-installed a package that is available on cdrom, did urpmi of the package. I am now correctly asked to mount the cdrom, and the package is then installed as it should,
Comment 16 Juergen Harms 2012-02-07 19:15:46 CET
Doing the exercise (comment 15), I got a perl error message (immediately following the "Please insert the medium named ..." message, and before inserting the cdrom:

Use of uninitialized value in subroutine entry at /usr/lib/perl5/vendor_perl/5.14.1/i386-linux-thread-multi/Net/DBus/Binding/Connection.pm line 257.

I tried serveral times: this is reproducible. Is this something to be filed as a new bug? if yes: on what package?
Comment 17 Thierry Vignaud 2012-02-07 22:23:57 CET
This is not an error, just a warning
Comment 18 Marja Van Waes 2012-02-25 18:03:34 CET
(In reply to comment #14)
> Could you try with perl-Hal-Cdroms-0.04?

(In reply to comment #15)
> Thank you, looks OK now:
> 
> For the record: I de-installed a package that is available on cdrom, did urpmi
> of the package. I am now correctly asked to mount the cdrom, and the package is
> then installed as it should,

So it is OK now for Mga2_b1 and this bug can be closed?

CC: (none) => marja11

Comment 19 Juergen Harms 2012-02-25 20:18:27 CET
Marja it worked during the last weeks of Alpha. But in Beta 1, mounting the DVD does not work any more. The behaviour is slightly different, but the problem is the same - unless the DVD is mounted before you launch urpmi (or a mount-point has been manually created), the DVD is not accepted.

Different behaviour:
- initially, after inserting the DVD nothing happened, and if you replied OK, the  sollicitation to mount the DVD appeared again

- now (beta 1), doing command-line urpmi ends up in a loop of the following message (about 1 sec interval)

Please insert the medium named "core media"
mount: mount point /media/cdrom does not exist
failed to mount /org/freedesktop/UDisks/devices/sr0: org.freedesktop.UDisks.Error.Failed: Error mounting: mount exited with exit code 1: helper failed with:
mount: mount point /media/cdrom does not exist

If, prior to launching urpmi, the mount-point is created manually, all goes well; when urpmi has finished and the DVD has been ejected, the mount-point is not deleted.
Comment 20 Marja Van Waes 2012-02-25 21:17:03 CET
@ Juergen

Thanks for the feedback.

Removing the NEEDINFO keyword

Keywords: NEEDINFO => (none)

Comment 21 Doug Laidlaw 2012-03-17 21:12:14 CET
On a fresh install of Beta2, neither /dev/cdrom nor /dev/sr0 had been created.  I can add the symlink, but I can't create /dev/sr0.  I removed all media and added all online sources as recommended for the Hal bug, and am currently updating.

CC: (none) => laidlaws

Comment 22 Doug Laidlaw 2012-03-17 21:24:02 CET
Updates have just finished and I have rebooted.  Both devices are still missing.  And I was hoping to stop reporting bugs!
Comment 23 Doug Laidlaw 2012-03-18 02:51:46 CET
From the MCC hardware list, the  CDROM drive is /dev/hda.  I created the symlink /dev/cdrom pointing to that and the directory /media/cdrom, and I am in business.  My hard drive is SATA, but my cdrom drive is IDE.  All the same, it has been /dev/sr0 for quite a while
Comment 24 Doug Laidlaw 2012-03-18 14:05:05 CET
The new symlink did not survive a reboot.
Manuel Hiebel 2012-03-18 17:30:05 CET

Priority: Low => Normal
Severity: enhancement => normal

Comment 25 Dave Hodgins 2012-03-18 23:35:53 CET
Doug, this bug report is about the mount point /dev/cdrom not existing
which happens when there is an entry for it in fstab, which prevents
udisks from auto-mounting the device.  That is explained in
https://wiki.mageia.org/en/Mageia_2_Errata#Base_system

The problem with the dvd being assigned /dev/hd? instead of /dev/sr?
is either
bug 3395 for devices that use pata_via, or
bug 1525 for devices that use pata_amd, that
has been reopened as bug 4997.

CC: (none) => davidwhodgins

Comment 26 Doug Laidlaw 2012-03-19 00:01:28 CET
Thanks Dave.  So should I remove the entry in /etc/fstab?  It was put there by the installer.  The Errata entry refers to Bug 1350, which I have looked at.

I am using an AMD Sempron, so I will follow bug 4997.
Comment 27 Doug Laidlaw 2012-03-19 00:26:09 CET
I commented out the line in /etc/fstab.  On a reboot, the installation DVD showed up in KDE's system tray.

I applied the workaround in bug 4997, and the drive is /dev/sr0 again, but with the other fix, it probably won't matter much.
Comment 28 Manuel Hiebel 2012-04-14 23:44:53 CEST
so for the pre-beta3, 
after the boot a line /dev/cdrom was in the fstab
it does'nt work if I remove or comment this line, even I mount the dvd with pcmanfm or nautilus

Since the reviewer or user use at least a little the dvd and not only the reposity, this should work out of the box for me.
Comment 29 Manuel Hiebel 2012-04-15 03:08:51 CEST
Sorry for my comment 28, in fact all works fine. Don't know what happen before.
Comment 30 Doug Laidlaw 2012-04-15 05:44:48 CEST
This is broken again for me.  I mentioned it in a forum thread: https://forums.mageia.org/en/viewtopic.php?f=15&t=1993

Today, I installed the latest updates including dracut, then commented out the line in /etc/fstab, removed /media/cdrom and rebooted.

When I inserted a data DVD, nothing was detected.  I couldn't eject it using the "eject" command because /dev/cdrom did not exist
or with "eject /dev/hda" device did not exist
or with "eject /dev/sr0"   ditto.

I can create /media/cdrom and mount the CD manually.
Comment 31 Dave Hodgins 2012-04-15 09:05:44 CEST
(In reply to comment #30)
> This is broken again for me.  I mentioned it in a forum thread:
> https://forums.mageia.org/en/viewtopic.php?f=15&t=1993
> 
> Today, I installed the latest updates including dracut, then commented out the
> line in /etc/fstab, removed /media/cdrom and rebooted.
> 
> When I inserted a data DVD, nothing was detected.  I couldn't eject it using
> the "eject" command because /dev/cdrom did not exist
> or with "eject /dev/hda" device did not exist
> or with "eject /dev/sr0"   ditto.
> 
> I can create /media/cdrom and mount the CD manually.

The /media directory is no longer being used as a tmpfs filesystem.

https://wiki.mageia.org/en/Mageia_2_Errata#Base_system no longer says
to remove the entries.  Don't remove the fstab entry.
Comment 32 Doug Laidlaw 2012-04-15 09:24:41 CEST
Thanks Dave.  So I need to restore the line in /etc/fstab, and what is in /media doesn't matter?  I will try that again when I can get back into Cauldron, but it sounds like what didn't work.
Comment 33 Doug Laidlaw 2012-04-15 13:15:34 CEST
Actually, the real problem was that I didn't have HAL installed.

So now I am left with a line in /etc/fstab which doesn't work.  The original was:

/dev/cdrom /media/cdrom....

 I changed that to 

/dev/hda /media/cdrom...

But with systemd, /dev/cdrom doesn't exist, and /media/cdrom no longer exists either.  I can't find a precedent (in legal terminology.)  How should the line read?
Comment 34 Juergen Harms 2012-04-15 23:12:15 CEST
For me (I specifically tested recently - Mageia 2 B2) urpmi now works as it should, and asks for the DVD when it is meant to do so
Comment 35 Sander Lepik 2012-04-16 11:04:22 CEST
(In reply to comment #33)
> Actually, the real problem was that I didn't have HAL installed.
> 
> So now I am left with a line in /etc/fstab which doesn't work.  The original
> was:
> 
> /dev/cdrom /media/cdrom....
> 
>  I changed that to 
> 
> /dev/hda /media/cdrom...
> 
> But with systemd, /dev/cdrom doesn't exist, and /media/cdrom no longer exists
> either.  I can't find a precedent (in legal terminology.)  How should the line
> read?

Mandriva/Mageia doesn't need line for cdrom in fstab. And that for years probably. If you add that line in fstab you just make your life harder.

CC: (none) => sander.lepik

Comment 36 Doug Laidlaw 2012-04-16 13:39:50 CEST
(In reply to comment #34)
> For me (I specifically tested recently - Mageia 2 B2) urpmi now works as it
> should, and asks for the DVD when it is meant to do so

Yes, it asks for the DVD, and that is as far as it gets.

Everything used to work, but something has changed.  At present I have:

/dev/cdrom does not exist.

My CD-ROM is /dev/hda

haldaemon is running, and polling /dev/hda every 2 seconds.

But the CD-ROM is still invisible. k3b complains that I have no optical drives.

And this is after a fresh reinstall, to clean up a couple of other issues.  This is why I posted to the forum thread referenced in Comment 30.  I am wondering if it is a history thing. The old structure was correct at install time.  Perhaps if I wait for Beta 3, I will have a proper setup from the start.

And am I in the right bug?  There are so many I have posted to.

And if nobody else is having any problems, why was the bug reopened?
Comment 37 Juergen Harms 2012-04-16 16:57:55 CEST
I tested again:
  1. disabled all resources except the dvd medium
  2. urpme htop
  3. urpmi htop
     3.1 I am asked to insert the DVD
     3.2 I insert the DVD
     3.3 The DVD spins up
     3.4 htop gets installed from the DVD

My environment:
- Dell Optiples 990 (64 bit, but presently running Mageia 32 bit version)
- Mageia 2 Beta 2 fully updated (minimum install, install of all additional
  packages once the system is up)
- my /etc/fstab contains 
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
- unless I do things while I am sleepwalking (my wife says I dont), I have not manually created this entry, but /etc/fstab.old does not contain that entry
- I cannot find any trace of a running hal daemon (ps -A, mcc->system->services, grep /var/log/syslog)

Once Beta 3 is out, I will install a new system and specifically watch and try to see when the entry for /dev/cdrom comes in.
Comment 38 Doug Laidlaw 2012-04-16 17:52:30 CEST
(In reply to comment #37)
> I tested again:
>   1. disabled all resources except the dvd medium
>   2. urpme htop
>   3. urpmi htop
>      3.1 I am asked to insert the DVD
>      3.2 I insert the DVD
>      3.3 The DVD spins up
>      3.4 htop gets installed from the DVD
> 
> My environment:
> - Dell Optiples 990 (64 bit, but presently running Mageia 32 bit version)
> - Mageia 2 Beta 2 fully updated (minimum install, install of all additional
>   packages once the system is up)
> - my /etc/fstab contains 
> /dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
> - unless I do things while I am sleepwalking (my wife says I dont), I have not
> manually created this entry, but /etc/fstab.old does not contain that entry
> - I cannot find any trace of a running hal daemon (ps -A,
> mcc->system->services, grep /var/log/syslog)
> 
> Once Beta 3 is out, I will install a new system and specifically watch and try
> to see when the entry for /dev/cdrom comes in.

> - I cannot find any trace of a running hal daemon (ps -A,
> mcc->system->services, grep /var/log/syslog)

I ran "service haldaemon status" ( I know that it is different under systemd, but it works.)

It printed out not only that haldaemon was running, but quite a bit of extra info, including that it was polling two devices, including /dev/hda, every 2 seconds.  I am not in Cauldron now, so I can't post the whole thing. 

Personally, I think that Mageia is like the Titanic -- going too fast.
Comment 39 Juergen Harms 2012-04-16 20:55:17 CEST
[root@pcjuergen harms]# service haldaemon status
Cannot find haldaemon service

That made me verify: perl-Hal-Cdroms-0.04-2.mga2 is really installed on my system.
Comment 40 Manuel Hiebel 2012-04-16 20:59:49 CEST
hal is deprecated, we use now udisk/udev
Comment 41 Dave Hodgins 2012-04-16 22:34:17 CEST
(In reply to comment #36)
> (In reply to comment #34)
> > For me (I specifically tested recently - Mageia 2 B2) urpmi now works as it
> > should, and asks for the DVD when it is meant to do so
> My CD-ROM is /dev/hda

Depending on which hardware you have, that's a bug related to
pata_acpi loading before pata_amd, pata_via, or ata_piix.

Have you installed all of the updates?
Comment 42 Doug Laidlaw 2012-04-17 02:27:12 CEST
(In reply to comment #40)
> hal is deprecated, we use now udisk/udev

Maybe, but k3b calls for hal.  When it can't find my drive, it asks "Is haldaemon running?"

Is the changeover perhaps incomplete?

(In reply to comment #41)

>Depending on which hardware you have, that's a bug related to
>pata_acpi loading before pata_amd, pata_via, or ata_piix.

>Have you installed all of the updates?

In my case,yes and modprobe.conf contains:
/sbin/modprobe pata_amd; /sbin/modprobe sata_nv; /sbin/modprobe ata_generic;

It doesn't change anything.
Comment 43 Dave Hodgins 2012-04-17 03:48:24 CEST
(In reply to comment #42)

> In my case,yes and modprobe.conf contains:
> /sbin/modprobe pata_amd; /sbin/modprobe sata_nv; /sbin/modprobe ata_generic;

Try adding rdloaddriver=pata_amd to the kernel options in /boot/grub/menu.lst.
Comment 44 Doug Laidlaw 2012-04-17 06:08:18 CEST
That fixed the device ID and hald:

1211 hald-addon-storage: polling /dev/sr0 (every 2 sec)...

and k3b can now find the drive.  I use k3b because dolphin never shows a cdrom.  Thunar does, but I have limited disk space in my test setup.  Inserting a CD used to make KDE's system tray pop up, but it didn't this time.

But I can't find a mount point for it, and there is nothing in /etc/mtab.  Presumably it isn't mounted yet.  It means that I can't mount it from the command line, just like my USB key.  Linux is no longer for the runlevel 3 users.

Actually, I saw the reference to rloaddriver in a forum post, but that recommended loading 2 modules, in the desired order.  I had no luck with doing that.

The question of hald being needed is something else.  From my point of view, as an end user, if it is called for, I will install it.

The whole thing reminds me of a Windows program I use.  It works only with copious workarounds, so our President claims that it works, and doesn't need fixing.
Comment 45 Marja Van Waes 2012-05-26 13:08:22 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 46 Doug Laidlaw 2012-05-26 13:23:43 CEST
No problem for some time now.  I don't have a clean installation of Mga 2.
Comment 47 Juergen Harms 2012-05-26 19:59:45 CEST
The problem has been resolved, the bug can be closed

Juergen
Comment 48 Sander Lepik 2012-05-26 20:13:13 CEST
Closing then.

Keywords: NEEDINFO => (none)
Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.