 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

18th November 2011, 04:26 PM
|
 |
Registered User
|
|
Join Date: Jan 2008
Age: 39
Posts: 5

|
|
|
Requesting help mounting a directory at system startup time
Friends,
I need some help to solve a weird problem. I recently switched from Ubuntu to Fedora, after using Ubuntu for about 8 years. I've found Fedora really great. However, when I built my brand new Fedora box, I decided to mount a different disk as /media to house my music, videos, and photos. On my old Ubuntu system, I kept some of this in my home directory and that isn't terribly efficient, etc. The problem is, when I boot my computer, /media is not mounted. When I issue the command sudo mount /media, it mounts with no problem. How can I set my computer up so that /media mounts when I start/reboot my computer?
Here are some data points.
Output of /etc/fstab after booting:
Code:
#
# /etc/fstab
# Created by anaconda on Sat Sep 17 07:44:12 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_eminem-lv_root / ext4 defaults 1 1
UUID=1abb75a9-8635-4916-b52e-d82778407c2f /backup ext4 defaults 1 2
UUID=b32a3c77-c6a1-46cd-830c-cbacc05e7754 /boot ext4 defaults 1 2
/dev/mapper/vg_eminem-lv_home /home ext4 defaults 1 2
UUID=180f4025-92f9-4087-b4dd-4adbe77686c2 /media ext4 defaults 1 2
/dev/mapper/vg_eminem-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
Output of df -h |grep media after booting:
Code:
tmpfs 3.9G 0 3.9G 0% /media
Output of mount command after booting:
Code:
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,rootcontext=system_u:object_r:mnt_t:s0,seclabel,mode=755)
After I run the command sudo mount /media, the output of mount looks like this:
Code:
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,rootcontext=system_u:object_r:mnt_t:s0,seclabel,mode=755)
/dev/sdb2 on /media type ext4 (rw,relatime,seclabel,user_xattr,barrier=1,data=ordered)
Can anyone guide me, please?
|

18th November 2011, 04:43 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Location: India
Age: 27
Posts: 36

|
|
|
Re: Requesting help mounting a directory at system startup time
the defaults options in fstab is "rw, suid, dev, exec, auto, nouser, and async"...and "nouser" means that only root can mount the device...so according to me you should try changing "defaults" i.e. fourth column this link may help..
http://www.tuxfiles.org/linuxhelp/fstab.html
|

18th November 2011, 04:50 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,108

|
|
|
Re: Requesting help mounting a directory at system startup time
What release of fedora are you using?
Fedora 15/16 moves /media to a memory disk that is handled by udev.
If you want something mounted permanently you need to mount it somewhere else - one suggestion is a mountpoint in /mnt (such as /mnt/media) instead of /media.
/media is now aimed at SD cards and other external USB storage. These should be automatically mounted as /media/<name> where name may be taken from the storage media. Internal disks (such as those listed in /etc/fstab) have to be mounted elsewhere.
|

18th November 2011, 04:58 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711

|
|
|
Re: Requesting help mounting a directory at system startup time
Quote:
Originally Posted by jpollard
/media is now aimed at SD cards and other external USB storage.
|
To be fair, /media was added to the FHS specifically for this purpose. "Media" mean CDs, DVDs, external storage devices etc., not "multimedia".
So yes, use a non-system directory, such as /mnt or /mnt/media etc.
Gareth
|

18th November 2011, 06:24 PM
|
 |
Registered User
|
|
Join Date: Jan 2008
Age: 39
Posts: 5

|
|
|
Re: Requesting help mounting a directory at system startup time
Ah, I see! Yes, I'm using Fedora 15. I did not know this about /media, so I'll change that and report how it goes. Thank you!
---------- Post added at 01:24 PM ---------- Previous post was at 12:06 PM ----------
All, I was able to execute mv /media/* /mnt/media/* and now my system works perfectly. Thank so much for the help.
|

19th November 2011, 02:13 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Location: Como - Italy
Posts: 248

|
|
|
Re: Requesting help mounting a directory at system startup time
Quote:
Originally Posted by bswilson
All, I was able to execute mv /media/* /mnt/media/* and now my system works perfectly. Thank so much for the help.
|
 Maybe I'm missing something... with the command mv you moved all the data you had on the secondary disk onto the primary disk in the /mnt/media folder. Now you don't have the data in the secondary disk, but in the primary, and the secondary disk is not mounted at startup in the /mnt/media folder!
Is it this you wanted?
|

19th November 2011, 08:20 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,711

|
|
|
Re: Requesting help mounting a directory at system startup time
Quote:
Originally Posted by bswilson
All, I was able to execute mv /media/* /mnt/media/* and now my system works perfectly. Thank so much for the help.
|
Yes, that confused me too.
Have you now got your media partition mounted on /mnt/media (and listed in /etc/fstab)? And were the files previously somehow copied into the tmpfs mounted on /media? Unless we're missing something, you'd better check that everything is indeed where you think it is!
Gareth
|

2nd December 2011, 02:25 PM
|
 |
Registered User
|
|
Join Date: Jan 2008
Age: 39
Posts: 5

|
|
|
Re: Requesting help mounting a directory at system startup time
Gareth, you and marvin_ita are absolutely correct. I don't think I have things set up the way I want. I am going to start a new thread to get additional help.
It does appear that now my /mnt/media/ folder is in the same logical volume group as /home, which means I really have all my stuff on the same physical disk, which is not what I want.
Thank you.
|

2nd December 2011, 03:08 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Location: India
Age: 27
Posts: 36

|
|
|
Re: Requesting help mounting a directory at system startup time
first copy your all /media back to where it was....and then edit fstab...
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 08:11 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|