Author Topic: SOLVED: Mounting a Partition at Boot Time  (Read 1346 times)

Offline GreggB

  • Jr. Member
  • **
  • Posts: 45
SOLVED: Mounting a Partition at Boot Time
« on: November 16, 2012, 01:31:31 PM »
I have a system (sda1) and swap partition (sda2) that mount as part of the boot process, but my data partition (sda3) doesn't. Hald will eventually mount it under "media", but I'd like it to be there all of the time.

So... if I put an entry in /etc/fstab for my data patition, will that mount it at boot time?

And... what is the "proper" mount point? Should it be /mnt?

Thanks,
           Gregg.
« Last Edit: November 18, 2012, 10:52:43 AM by GreggB »

Offline tschommer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1890
  • MLU and BLU (Bacon lovin' user)
Re: Mounting a Partition at Boot Time
« Reply #1 on: November 16, 2012, 02:02:03 PM »
Gregg, it's a lot easier to use the PCC (PCLinuxOS Control Center) found under "Configure Your Computer".

Select "Local Disks" on the left and then the partition manager. Then click on partition sda3 and give it a mount point of your choice (/mnt/<whatever you like> would be fine).

After a reboot your partition should be mounted right away  ;)
Our defense is in the preservation of the spirit which prizes liberty as the heritage of all men, in all lands, everywhere."
Abraham Lincoln --September 11, 1858 Speech at Edwardsville, Illinois

Offline GreggB

  • Jr. Member
  • **
  • Posts: 45
Re: Mounting a Partition at Boot Time
« Reply #2 on: November 16, 2012, 03:56:13 PM »
That was too easy! (no command line, no editing config files  :) )

I'd actually been into the Local Disks screen, but because the partition had always been mounted I never saw the Mount Point option.

I was hoping there was some "standard" place  to mount it, but as far as I can tell, there isn't one (just places you shouldn't). I didn't like the idea of putting it under /home (even though that's probably the best place), so I opted for /mnt. The only catch being that /mnt is owned by root, so I had to modify permissions before I could see my files.

Thanks,
            Gregg.

Offline jimwilk

  • Hero Member
  • *****
  • Posts: 1120
Re: Mounting a Partition at Boot Time
« Reply #3 on: November 16, 2012, 04:40:31 PM »
Gregg,
I find that the easiest way to configure your data partition is to use PCC > Local Disks > Manage Disk Partitions.

Click on your data partition. Under mount point I would type in /data Then, press toggle to expert mode. Under Options click on user. This allows an ordinary user to access the partition.

When you have done that, Toggle to Normal Mode > Done.

When you next boot up, you will be able to access your data partition

Good luck,

Jim
PCLinuxOS 2013.01 KDE (2 desktop computers)
PCLinuxOS  2013.04 KDE on Asus  laptop


Windows free since 2005
Our house has windows: our computers have no Windoze!
Registered Linux User #409991

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10696
  • MLUs Forever!
Re: Mounting a Partition at Boot Time
« Reply #4 on: November 16, 2012, 05:34:45 PM »
Its even easier in KDE .....  use the Device Notifier settings .....  tick a couple of boxes and its set.
It mounts under /media/<partition name if any><else 'disk'> with user permissions.

It therefore can be unmounted from the Dolphin Places menu if required .....  right click & unmount.

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Mounting a Partition at Boot Time
« Reply #5 on: November 16, 2012, 06:16:32 PM »
Quote
I have a system (sda1) and swap partition (sda2) that mount as part of the boot process, but my data partition (sda3) doesn't.

--How did you come by such a system setup ?
--was it a system you installed yourself ?
--someone else did it for you ?
--other ?

Just curious  :D

Xena
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline GreggB

  • Jr. Member
  • **
  • Posts: 45
Re: Mounting a Partition at Boot Time
« Reply #6 on: November 17, 2012, 12:31:43 PM »
Well... The reason the partition wasn't picked up at install time, is because it wasn't visible (I was being cautious).

Backtracking a bit... I initially installed 2012.02 in June as per the usual recommendations - 3 partitions: o/s, swap and home. However, I quickly discovered the drawback of this setup. i.e. /home, rather than being a pure data partition, also contained a slew of config files for KDE and apps. (being a Linux novice, I didn't realize this until some time after the install).

So recently, rather than upgrade to KDE 4.8, I opted to install 2012.08 and configure things the way I wanted - with /home on the o/s partition. I still occasionally boot the 2012.02 partition to check the way I had thing set up, but once I have 2012.08 fully set up I won't need to do that. Then I will be able to have two totally independent boot partitions and a data partition.

Gregg.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6395
  • I'm going South
Re: Mounting a Partition at Boot Time
« Reply #7 on: November 17, 2012, 01:24:22 PM »
That was too easy! (no command line, no editing config files  :) )

I'd actually been into the Local Disks screen, but because the partition had always been mounted I never saw the Mount Point option.

I was hoping there was some "standard" place  to mount it, but as far as I can tell, there isn't one (just places you shouldn't). I didn't like the idea of putting it under /home (even though that's probably the best place), so I opted for /mnt. The only catch being that /mnt is owned by root, so I had to modify permissions before I could see my files.

Thanks,
            Gregg.

Well, directories under /mnt are supposed to be temporary mountpoints. Directories under /media are supposed to be mountpoints created by the system for removable media. The most standards-compliant mountpoint for a permanent data partition that is only accessed by you would no doubt be under your home directory (i.e. not /home but /home/<your-name>/your-mount-point). There isn't really a standard place four mounting data partitions used by several users. But whatever works for you is right for you.
« Last Edit: November 17, 2012, 01:33:31 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline GreggB

  • Jr. Member
  • **
  • Posts: 45
Re: Mounting a Partition at Boot Time
« Reply #8 on: November 17, 2012, 06:05:05 PM »
jimwilk - Thanks for the tip.

just17 - it was being mounted by hald, but I didn't like the fact that it mounted it when it felt like it, and that /media is the wrong place for a permanent partition.

bald brick - I read somewhere else that /mnt is for "temporary" mounts, so not really the right place either. I'm coming around to the idea of mounting my data under my home directory. I need to be finished with my 2012.02 system so that I can get rid of the folder with my username (to avoid confusion) and I'll probably delete the Documents, Downloads, etc. directories from /home for the same reason.

Thanks,
           Gregg.

Offline jimwilk

  • Hero Member
  • *****
  • Posts: 1120
Re: Mounting a Partition at Boot Time
« Reply #9 on: November 17, 2012, 06:29:06 PM »
Set up here is as follows
/   in sda1
/home in sda5
/disk   in sda7
plus swap in sda6

/disk contains, among other things, the Thunderbird folder. That has been the same for several distros over the years. Each new install is setup for Thunderbird to access the emails in that folder. Photos of grandchildren, accounts files, documents, backups of bookmarks and address books, etc etc are there. When  I do a fresh installation, I reformat sda1 and sda5 only. Thus, all my valuable data remains intact.

Downloads and Documents in /home are not as valuable. Of course, the latest PCLinuxOS magazine is copied from Downloads across to its own folder in /disk. Photos are also copied from /disk via USB stick to each of the two other computers in the house.
There's my $NZ 0.02 worth.

Jim
PCLinuxOS 2013.01 KDE (2 desktop computers)
PCLinuxOS  2013.04 KDE on Asus  laptop


Windows free since 2005
Our house has windows: our computers have no Windoze!
Registered Linux User #409991

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Mounting a Partition at Boot Time
« Reply #10 on: November 17, 2012, 06:39:06 PM »
Quote
I read somewhere else that /mnt is for "temporary" mounts, so not really the right place either.

Sorry, the writer has it wrong.
/mnt is for whatever you want it to be

/mnt is permanently mounted on my system.
There are different partitions on it.
One partition is called /mnt/Workplace-sda12
All my download stuff goes there, K3b gets directed to there, Ktorrent gets directed to there.
It's my Home where I live.
/mnt/music, is where Mozart , lady gaga and Elvis Presly have a condominium
/mnt/language is.............
/mnt/system (small one) is where Firefox and Thunderbird live together with all system backups
/mnt/virtual is where I store about 20 virtual images made by virtual box

my /home only contains what the system puts there and that is very little.
For me, it's just how I

Not saying you must copy me or the others, but reading about it is never bad.
Your computer is nothing more than your slave, and slaves do what you tell them.

Yeepers, that's a lot of words so early in the morning.
Maybe I should go for my 2nd cup of coffee and wipe the sleep out of my eyes.

 8) 8) 8)
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline GreggB

  • Jr. Member
  • **
  • Posts: 45
Re: Mounting a Partition at Boot Time
« Reply #11 on: November 17, 2012, 08:51:46 PM »
Jim / Xena - thanks for the input - it all helps. As I said, I'm pretty new to Linux, so I'm still figuring things out.

I dug back through my history and found the page stating that /mnt was for temporary mounts - it was dated 2003.

I suppose what I was looking for was "accepted practices"... I've read lots of posts (not here) advising mounting at /media - that seems wrong to me because that's where HAL mounts things it finds. I suppose I'm being a bit to obsessive about the "accepted practices" thing anyway - especially since I've already decided to toss the "/home on a separate partition" practice.

One of these days I'll be pulling  the second drive out my old windows box and adding it to my new Linux box. Then I'll have to decide where to mount it's 3 NTFS partitions. Or perhaps I'll just re-format it to ext4.

Gregg.

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Mounting a Partition at Boot Time
« Reply #12 on: November 17, 2012, 09:21:55 PM »
Quote
Or perhaps I'll just re-format it to ext4.

As linux can read and write to NTFS perfectly well, this is an option, but not a necessity.
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6395
  • I'm going South
Re: Mounting a Partition at Boot Time
« Reply #13 on: November 17, 2012, 09:28:57 PM »
Quote
I read somewhere else that /mnt is for "temporary" mounts, so not really the right place either.


Sorry, the writer has it wrong.
/mnt is for whatever you want it to be


No, the writer has it right. From the first draft of the Linux Filesystem Hierarchy Standard 3.0:

Quote
3.12. /mnt : Mount point for a temporarily mounted filesystem
3.12.1. Purpose

This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.

This directory must not be used by installation programs: a suitable temporary directory not in use by the system must be used instead.


http://www.linuxbase.org/betaspecs/fhs/fhs/ch03s12.html

Which doesn't mean that you have to be standards-compliant....


Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Mounting a Partition at Boot Time
« Reply #14 on: November 17, 2012, 10:55:38 PM »

There seem to a move or a proposed move from "/media" to "/run/media/$USER" as a mount place for removable media.

Reason given are:
1. "/media" location is public and hence different users on the same system may end up attempting to use the same mount point at the same time.

2. "/media" path is public,any user may get access to any user's content if the mount point is not set up with proper permissions.

"/run/media/$user" on the other hand is private.Each user get their own place to mount their devices and only the user can access the folder and hence a mounted partition with improper mount permissions will not be a security risk.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..