Description of problem: On booting into Alpha 2, all subdirectories of /media are deleted (except Windows.) I need to re-create /media/cdrom before I can mount to it. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Boot into Alpha 2. 2. 3.
alpha 2 ? your directory are not in the fstab ?
Keywords: (none) => NEEDINFO
Sorry, yes. There is only one, for cdrom. The relevant line is: /dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0 Once I have created the directory, I can rely on that line to say "mount /media/cdrom."
So I don't see the issue
So it is normal to need to put that directory back on each bootup? Everybody has to do it?
mount | grep media tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) I'm seeing the same problem, although I didn't notice it before, as I had disabled the dvd repository in drakrpm-edit-media. Manuel, I'm using systemd and dracut. Doug, if you run "umount /media", I expect you'll find the cdrom directory is there. I haven't yet tracked down where /media is getting mounted as a tmpfs.
CC: (none) => davidwhodgins
Yes, I see the same line for tmpfs that you saw. In addition, there is a line for windows on /dev/sda1 : mount | grep media tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) /dev/sda1 on /media/windows type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096) I notice that tmpfs is mounted rw. cd /media should show the contents of tmpfs. It shows only the windows/ subdirectory. "ls -a" shows nothing more. If there is a filesystem mounted to /media, shouldn't it hide the windows/ subdirectory? I can browse /media/windows/ quite normally. The command "umount /media" gives: umount: /media: device is busy. -- even if I cd back to / .
Sorry, I wasn't thinking straight. Of course /media was busy, because /media/windows was mounted. After unmounting Windows, I could unmount /media cleanly. Then I couldn't get it back - not in /etc/fstab. After rebooting I unmounted /media/windows again. Then I got only the one line as Dave did for tmpfs, but there was nothing in /media except the (empty) windows/ directory.
Here is the output of the "df" command. I have never seen one like it. When I installed from the LiveCD, "df" showed a copy of what I would see with the LiveCD running, but this was a clean reinstall: Filesystem Size Used Avail Use% Mounted on rootfs 8.5G 3.5G 4.6G 44% / /dev/root 8.5G 3.5G 4.6G 44% / /dev 2.0G 0 2.0G 0% /dev tmpfs 2.0G 1.2M 2.0G 1% /dev/shm tmpfs 2.0G 516K 2.0G 1% /run tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup tmpfs 2.0G 0 2.0G 0% /media /dev/sda1 33G 12G 21G 38% /media/windows /dev/sda10 68G 55G 13G 81% /media/oldhome And here is fstab (sda12 is my root and only partition for Alpha) : # Entry for /dev/sda12 : UUID=001e97d6-99b0-4cfb-a9ee-1d42cd37a8dd / ext4 acl,relatime 1 1 /dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0 /dev/fd0 /media/floppy auto umask=0,users,iocharset=utf8,noauto,exec,flush 0 0 # Entry for /dev/sda10 : UUID=26e485e0-9453-4898-909c-873d51613cd6 /media/oldhome ext4 defaults 1 2 # Entry for /dev/sda1 : UUID=D8C4D6BCC4D69C56 /media/windows ntfs-3g defaults 0 0 none /proc proc defaults 0 0 # Entry for /dev/sda6 : UUID=3b53204e-112c-4384-b5f2-1fedd2562b9e swap swap defaults 0 0
It's /lib/systemd/system/media.mount that causes /media to be mounted as a tmpfs file system. The idea is that systemd will now automatically create mount points, as needed for removable filesystems. The windows directory gets created automatically, in the tmpfs, when that filesystem gets mounted. Try removing the fstab entry for the cdrom (or at least comment it out), and then insert a cd/dvd. The device notifier should give you an option to open it in a file manager. Select that option, and confirm it gets mounted ok. Did the installer create the fstab cdrom entry, or is it left over from a prior installation?
Plugging in a USB key for the first time was OK. Commenting out the fstab entry: On first attempt KDE Notifier said it could not mount it. On a second attempt, it was mounted OK to /media/1-i586 and opened in Dolphin. Fine for keyboard-and-monitor Windows types. In answer to your question, I can't say. The installer looks at my previous file list even on a clean reinstall: I don't know how much is temporarily backed up. But the previous system was the liveCD, so I think that the installer for the DVD created it.
I just checked the fstab from a clean install of mageia 2 alpha 1, and it does not have an entry for the cdrom, so this should be ok. I'll keep an eye out for fstab cd/dvd entries, in future test installs. I will also suggest a release notes entry suggesting that people should remove cd/dvd entries from their fstab with systemd. I'll have to experiment a bit first to see what happens with run level 3 only installations.
(In reply to comment #11) > I just checked the fstab from a clean install of mageia 2 alpha 1, > and it does not have an entry for the cdrom, so this should be ok. > > I'll keep an eye out for fstab cd/dvd entries, in future test > installs. > > I will also suggest a release notes entry suggesting that people > should remove cd/dvd entries from their fstab with systemd. > I don't see it in the Errata. Is that because this got fixed? https://wiki.mageia.org/en/Mageia_2_Errata > I'll have to experiment a bit first to see what happens with run > level 3 only installations.
CC: (none) => marja11
AFAIK even Mandriva didn't need cdrom entry in fstab nor cdrom directory under media. That directory was created automatically when mounting.
CC: (none) => sander.lepik
I've added an entry about this to https://wiki.mageia.org/en/Mageia_2_Errata#Base_system
(In reply to comment #13) > AFAIK even Mandriva didn't need cdrom entry in fstab nor cdrom directory under > media. That directory was created automatically when mounting. That wasn't my experience. The disk was mounted only when inserted, but the mount point had to exist from the beginning. With the new arrangement in Mageia RC3, everything seems to be created on-the-fly, and it may be different. The problem seems not to exist any longer. I use a CD only for package installation, and I have to click in MCC after it has had a chance to mount, but that was always the case. Installation then proceeds normally.
(In reply to comment #15) > (In reply to comment #13) > > AFAIK even Mandriva didn't need cdrom entry in fstab nor cdrom directory under > > media. That directory was created automatically when mounting. > > That wasn't my experience. The disk was mounted only when inserted, but the > mount point had to exist from the beginning. With the new arrangement in > Mageia RC3, everything seems to be created on-the-fly, and it may be different. > The problem seems not to exist any longer. I use a CD only for package > installation, and I have to click in MCC after it has had a chance to mount, > but that was always the case. Installation then proceeds normally. Further to the above, if I insert a CD just to browse, it is not visible in Dolphin until I mount it in a Konsole. My USB key, on the other hand, is visible in Dolphin but not mounted, and no mount point is created until I open it.
@ Doug I understand (from comment 5) that Dave installed from DVD. In comment 8, you say: > When I installed from the LiveCD, "df" showed a copy of what I would see with > the LiveCD running, but this was a clean reinstall: The word "but" gives me the impression that this time, you did not use the LiveCD. Do I misunderstand? It would be nice if those /etc/fstab entries for removable media were removed during install Assigning to drakx-installer-stage2 maintainer and cc'ing draklive-install maintainer. I'll clone this bug for LiveCD install, when someone confirms this is an issue there, too.
Keywords: NEEDINFO => USABILITYPriority: Normal => HighCC: (none) => mageiaComponent: RPM Packages => InstallerBlocks: (none) => 3342Summary: Mount point /media/cdrom absent after each boot => /etc/fstab entries for removable media should be removed while installing Mageia2*Source RPM: (none) => drakx-installer-stage2
/media is mount as tmpfs due to systemd.
CC: (none) => balcaen.john
(In reply to comment #17) > > It would be nice if those /etc/fstab entries for removable media were removed > during install > > Assigning to drakx-installer-stage2 maintainer and cc'ing draklive-install > maintainer. > > I'll clone this bug for LiveCD install, when someone confirms this is an issue > there, too. Assigning and cc'ing at the same time didn't work, this time. Assigning again
Assignee: bugsquad => thierry.vignaud
(In reply to comment #17) > I'll clone this bug for LiveCD install, when someone confirms this is an issue > there, too. Bug 3476 (this one is more or less a duplicate of that one) is now left open for the same issue with draklive-install
CC: (none) => marcello.anni
I can confirm this bug on a clean install x64 system, commeting out the entry fixes the issue.
CC: (none) => lazerousz
*** Bug 4774 has been marked as a duplicate of this bug. ***
CC: (none) => AndrewL733
Any fix possible for this bug ?
I've posted a comment on the developers mailing list. Three options I can see ... 1. Have the installer remove /media fstab entries 2. Have systemd parse fstab and generate the mountpoints. 3. Have dracut parse fstab and generate the mountpoints. As it's systemd that's forcing /media to be on tmpfs, that would be the logical place to put it, however dracut already has code to parse fstab (for finding /usr etc.), so that would be the simplest in my opinion.
*** Bug 4915 has been marked as a duplicate of this bug. ***
CC: (none) => t.blackwell
my bug 4915 has been marked as a duplicate of this. They are clearly related, but mine had a different emphasis. Fully installed system failed to make any updates because there was no /media/cdrom directory created so the mount of install disk failed and no update was possible - until manually creating the /media/cdrom mount point. I mention this again as reading the discussion here it is mainly about cleaning up /media, not about stalled package updates (or anything else requiring the DVD) failing due to not creating the mount point directory.
Created attachment 1861 [details] /lib/systemd/mageia-media-mountpoints I've put together a solution for this. The attached script has been tested, and works on my system.
Created attachment 1863 [details] /lib/systemd/system/mageia-media-mountpoints.service In addition to adding the to files, the symlink has to be created in /lib/systemd/system/local-fs.target.wants/ as ln -s ../mageia-media-mountpoints.service If the systemd maintainer could add these to the package, then this bug can be closed.
I've changed the rpm this bug is about, as this is a change needed for systemd.
Source RPM: drakx-installer-stage2 => systemd-44-2.mga2.src.rpm
Attachment 1863 mime type: application/octet-stream => text/plain
CC: (none) => mageia
Yeah I think this seems like a reasonable solution. I'll see what upstream think about this as if it's a common problem we may be able to drop the mageia prefix. That said, perhaps /media is meant to be reserved for removable media. Static mounts are perhaps meant to be in /mnt... Obviously people will still set things up like this so it's no harm in being extra safe I guess. As a side note, you probably want a: [Install] WantedBy=local-fs.target in your unit. This way we can enable it by default, but allow users to disable/reenable it as needed. If /media is meant to be reserved (as I suspect) then this script should probably put a big fat warning into syslog (i.e. just by echoing it out thanks to the journal) to let users know (for various values "let them know") that their mountpoint decisions are bad.
Status: NEW => ASSIGNEDAssignee: thierry.vignaud => mageia
CC: (none) => luigiwalser
(In reply to comment #30) > As a side note, you probably want a: > > [Install] > WantedBy=local-fs.target > > in your unit. This way we can enable it by default, but allow users to > disable/reenable it as needed. Ah. Thanks. I wasn't sure how the symlinks normally get created, so I just did it manually.
(In reply to comment #30) > > That said, perhaps /media is meant to be reserved for removable media. Static > mounts are perhaps meant to be in /mnt... Obviously people will still set > things up like this so it's no harm in being extra safe I guess. > > It isn't only the users. The trend seems to be for distros to put everything under /media, the Windows partition, for one.
The general chat with a few folk (from various distros) upstream was that /media should be reserved for transient media and /mnt still used for administrator configured mounts. So while I agree we should do something about this for mga2, we should also ensure users are "reeducated" too :) I suspect we'll use something pretty much like Dave's script, but will add in a warning too (there are things this script doesn't catch such as automounts etc. but provided we get 99% of it, I suspect the kitten casualties can be minimised).
Just for reference, a thread spawned while discussing with upstream on IRC: http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/4761
So basically, we'll solve this issue by simply abandoning making /media a tmpfs mount. Job done :)
OK, so current systemd no longer makes /media a tmpfs mount: [colin@jimmy ~]$ mountpoint /media /media is not a mountpoint Resolved I think.
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED