Media partition

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Azazello

Media partition

Post by Azazello »

Hi , when I installed mint , I made 3 partitions - home , root , media ( and swap ) , the problem is system monitor doesn't recognize the media partition (sda9) , and I can access the media partition only thorough the root folder , any idea how to fix it?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
proxima_centauri

Re: Media partition

Post by proxima_centauri »

The problem, I think, is that "/media" is a default folder in the root directory. So if you specified /dev/sda9 to be used as "media" then it is being mounted there. This folder is typically used for "mounted (loaded) removable media such as CDs, digital cameras, etc...". If I understand you correctly, you wish to have a separate media folder for your personal things?
Can you please post the output of this in terminal:

Code: Select all

cat /etc/fstab
Azazello

Re: Media partition

Post by Azazello »

tnx for the fast replay ,
you understand correctly , I saw in mint installation manual to make a partition for media so I did it

fstab -
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda8 during installation
UUID=a18d6fde-eb1f-4bb1-88bb-6299d48400d5 / ext3 errors=remount-ro 0 1
# /home was on /dev/sda7 during installation
UUID=aec9ff5f-7796-43d3-8c2e-c6b129fa61d1 /home ext3 defaults 0 2
# /root/media was on /dev/sda9 during installation
UUID=3fe929d0-ecd2-4847-9eeb-4887dc33719c /root/media ext4 defaults 0 2
# swap was on /dev/sda6 during installation
UUID=3bb10aea-6d47-4eef-82fb-bba4078933cb none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
proxima_centauri

Re: Media partition

Post by proxima_centauri »

I think the easiest thing to do is to move the mount location from the root directory, to your home folder.

In the following example, username in /home/username refers to your actual login/username

For instance if you create the folder ~/media, which is the same thing as creating /home/username/media, you can mount /dev/sda9 there by changing fstab

Code: Select all

gksudo gedit /etc/fstab
Changing
# /root/media was on /dev/sda9 during installation
UUID=3fe929d0-ecd2-4847-9eeb-4887dc33719c /root/media ext4 defaults 0 2

To something like:
# /home/username/media from /dev/sda9
UUID=3fe929d0-ecd2-4847-9eeb-4887dc33719c /home/username/media ext4 defaults 0 2
Azazello

Re: Media partition

Post by Azazello »

ok, I made the changes , reset , but I don't see any media folder on my home\username folder
the current fstab is

# /home/s/media from /dev/sda9
UUID=3fe929d0-ecd2-4847-9eeb-4887dc33719c /home/s/media ext4 defaults 0 2
proxima_centauri

Re: Media partition

Post by proxima_centauri »

Remember that the folder "media" actually has to exist, you must create it in your home folder.
To avoid restarting, you can type

Code: Select all

sudo mount -a
to effect the changes in fstab without a reboot
Azazello

Re: Media partition

Post by Azazello »

ok , problem solved , thank you very much , but why do I have 1.2 GB used space in this empty folder , I have only lost+found folder inside , and it's size is 16kb ?
proxima_centauri

Re: Media partition

Post by proxima_centauri »

Perhaps you are seeing the used space of /home as a total, and not /home/s/media.
StanTheMan

Re: Media partition

Post by StanTheMan »

I mount data partitions like this - - lets say your data partition is sda9

First I make my UserName a member of the group ' users ' (system>Users&groups)

Terminal
cd /media
sudo mkdir sda9
(this creates a mount directory for the data partition)

ls -l
This shows how permissions are set for folders in /media , look for sda9

sudo chgrp users sda9
sudo chmod g+rwx sda9
(this gives permissions for a member of the grouup 'users' to read write and execute files which will be mounted to /media/sda9 )

cd /etc
sudo nano fstab

Here you can edit the fstab file using the Nano text editor.

add
/dev/sda9 /media/sda9 ext3 (or ext4) user.exec 0 0

write and save the edited ffstab file.

Now re-boot and sda9 should be automatically mounted and read and writeable to UserName.
Locked

Return to “Beginner Questions”