Bug 3476 - /etc/fstab entries for removable media should be removed while installing Mageia2*
Summary: /etc/fstab entries for removable media should be removed while installing Mag...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Olivier Blin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-26 20:06 CET by Juergen Harms
Modified: 2014-05-08 18:04 CEST (History)
10 users (show)

See Also:
Source RPM: draklive-install
CVE:
Status comment:


Attachments

Description Juergen Harms 2011-11-26 20:06:56 CET
Description of problem:

After inserting a DVD, the medium does not become accessible - neither using the "Open with File Manager" option of the "Available Devices" popup, nor when inserting the medium in response to a mount request from urpmi.

Apparently, this is due the fact that a mount point (according to /etc/fstab "media/cdrom") is not automatically created when the medium is inserted (though, the insertion is seen by the system: the "Available Devices" window pops up).


Version-Release number of selected component (if applicable):
udev-173.3.mga2 - but maybe the problem is due to some other component (Hal?)

How reproducible:
always


Steps to Reproduce:

A. use by urpmi
---------------

1. do a command-line urpmi for a package that needs to be fetched from the installation DVD
2. when requested, insert the installation DVD
***        Please insert the medium named "core media"

After insertion, the following message is displayed:

mount: mount point /media/cdrom does not exist
failed to mount /org/freedesktop/Hal/devices/volume_label_FREE_2_i586_alpha1: o
rg.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sr0 is listed in
 /etc/fstab. Refusing to mount.


B. mount for access via dolphin
-------------------------------

1. insert a DVD
2. wait for the "Available Devices" window to pop up
3. hit the "Optical Disk ..." item

An error message appears at the bottom of the popup window:

Could not mount the following device <device-label>

Pulling down the details button, I get
The requested operation has failed.: Error mounting: mount exited with exit code 1: helper failed with: mount: mount point /media/cdrom does not exist

Work around (A and B): prior to the insertion of the DVD medium, manually create the
mount point at /media/cdrom
Manuel Hiebel 2011-11-26 22:31:16 CET

CC: (none) => anssi.hannula, boklm, dmorganec, eugeni, mageia, mageia, misc, pterjan, thierry.vignaud, tmb

Comment 1 Manuel Hiebel 2011-11-26 22:32:10 CET
Hi, thanks for reporting this bug.
As there is no maintainer for this package I added the committers in CC.
Comment 2 Thomas Backlund 2011-11-26 23:03:07 CET
Hmm,

I wonder if this is a fallout of systemd mounting /media as tmpfs,

so even if installer has added /media/cdrom, it goes "missing" as soon as tmpfs gets mounted...
Comment 3 Colin Guthrie 2011-11-27 13:06:46 CET
If Thomas is correct, dropping a unit file in /lib/systemd/system called media-cdrom-mountpoint.service with the following contents should solve the problem....


Description=Create mountpoint for CD/DVDs
DefaultDependencies=no
Wants=media.mount
After=media.mount

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mkdir /media/cdrom



After creating this file, do:

cd /lib/systemd/system/local-fs.target.wants
ln -s ../media-cdrom-mountpoint.service


Then reboot and hopefully all will be well.
Comment 4 Thomas Backlund 2011-11-27 17:01:09 CET
Thinking some more of it, isn't udev supposed to handle this too.
Maybe we have a bad interaction between udev and systemd

I mean hardcoding dirs wont scale as someone might not have a cdrom/dvd (netbook, ultrabook), and someone might have 2 or more cdroms/dvds like workstations, media servers, ...
Comment 5 Colin Guthrie 2011-11-27 17:38:51 CET
Well, under Gnome here, when I try and mount a CD, it automatically creates a folder named after the CD's volume label, mounts it, then unmounts it, and removes the folder again.

So gnome works fine, but perhaps other mount managers do not. I don't fully know the bits involved here, so cannot really comment further.
Comment 6 Thomas Backlund 2011-11-27 19:58:04 CET
Hm, yeah you are right.
So this is mostly a install from cd/dvd issue.

We should probably fix installer to add install media with the label mount.

but for now your fix in comment 3 should cope with current installer setup  (still need to be tested)
Comment 7 Juergen Harms 2011-11-27 20:31:22 CET
This should should not be an issue that depends on a specific desktop environment. Therefore I tried doing "urpmi xcalc" in a login console.

After sollicitation  and inserting the DVD, I get precisely the same error message in that environment.

I then applied the fix suggested in comment 3 (using copy-paste for file contents and the link commands to be safe against typos - also verification with "cat" and "ls" was ok): after applying this fix, booting the system ended in a hang. There were more than a dozen "failed" messages flashing by (without applying the fix, I always observe 3 "failed" messages).

I did not want to invest time without more directions from you on how I can provide more pertinent info without trying to manually copy messages that scroll over the screen. In Mageia 1, I could find messages that happen during boot in /var/log/prcsys.log, but this file does not exist in Mageia2 - and I did not find the messages in /var/log/syslog, probably they happen to early.

There is always the clumsy, but effective, workaround to do a manual mkdir /dev/cdrom before physically inserting a dvd - for an alpha 1 release not an unsurmountable difficulty in case the definite solution will come with the alpha 2 iso and an easier workaround cannot be made work.
Comment 8 Juergen Harms 2011-11-27 20:53:27 CET
Remembering https://bugs.mageia.org/show_bug.cgi?id=145 (comment 3), I re-discovered a more efficient work around: comment out the cdrom line in /etc/fstab
Comment 9 Marja Van Waes 2012-01-23 06:48:51 CET

(In reply to comment #6)
> Hm, yeah you are right.
> So this is mostly a install from cd/dvd issue.
> 
> We should probably fix installer to add install media with the label mount.
> 
> but for now your fix in comment 3 should cope with current installer setup 
> (still need to be tested)

(In reply to comment #8)
> Remembering https://bugs.mageia.org/show_bug.cgi?id=145 (comment 3), I
> re-discovered a more efficient work around: comment out the cdrom line in
> /etc/fstab

Bug 3550 is about this issue, too, but I won't close it as a duplicate because it is already assigned.

tmb said in comment 6 this is a install from cd/dvd issue, and bug 3550 was already assigned to drakx-installer-stage2, so I'll leave this one open for cd install.

Assigning to draklive-install and blino

CC: (none) => marja11
Hardware: i586 => All
Assignee: bugsquad => mageia
Summary: DVD does not become accessible after inserting the medium => /etc/fstab entries for removable media should be removed while installing Mageia2*
Source RPM: udev-173.3.mga2 => draklive-install

Comment 10 Colin Guthrie 2012-04-11 02:16:55 CEST
Is this still a problem? /media is no longer a tmpfs mount so existing mountpoints should still exist there....
Comment 11 Juergen Harms 2012-04-11 08:51:27 CEST
Good news: problem has gone - thanks!
Comment 12 Colin Guthrie 2012-04-11 10:42:16 CEST
OK, marking as resolved as per comment 11

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

Nicolas Vigier 2014-05-08 18:04:37 CEST

CC: boklm => (none)


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