Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I have just installed Feisty Fawn in my newly upgraded PC. I partitioned the HD into 2 so that I can store data in the other partition and learn how to make partitions manually. Here are the partitions when I type fdisk:
Device Boot Start End Blocks Id System
/dev/sda1 1 6687 53713296 83 Linux
/dev/sda2 6688 9729 24434865 5 Extended
/dev/sda5 6688 9483 22458838+ 83 Linux
/dev/sda6 9484 9729 1975963+ 82 Linux swap / Solaris
I really am not familiar with the file system of Linux but when I made the partitions the "/" is the root is in ext 3 format and I allocated 50+ GBs. I also made a swap partition and the other one that is making me confused is the format ext2 and I can see this at the file system but the problem is I can not access it because when I click properties/permission it says that I am not the owner and I can not access this folder. Now, how do I gain access and use this partition? Should I login as the root and change the permissions? How do I do this? If I am going to use the terminal, what are the commands? Thanks and have a nice day to all of you out there. Peace.
To start with, get familiar with a command or two.
Open a terminal and type:
Code:
man df
This is tha manual for the command "df"
Type "q" to exit the manual.
Now type:
Code:
df
You should now see your "mounted" filesystems.
Now try:
Code:
man fstab
again, "q" to exit the manual.
Now try:
Code:
sudo gedit /etc/fstab
Note: you can use the TAB key to autocomplete stuff in a terminal.
Gedit should start and you are now editing your filesystem table (which filesystems exist and which will mount at boot time).
For now, do NOT edit you fstab, you could cause major problems if your / partition can't mount at boot! But don't worry too much, everything is fixable.
You need to mount your spare partition with your normal user priveleges yes?
Read the ouptut of "df" and post it here please and I will help you to modify your fstab correctly.
to access any partition you should mount it in you filesystem "/" usually under /media in ubuntu or /mnt in other linux systems but it can be mounted almost anywhere like /home/account/sharedfiles
first create a directory where your going to mount it
Code:
mkdir /media/newDirectoryName
then mount the partition there
Code:
mount /dev/sdaN /media/newDirectoryName
if your mounting /dev/sda2 you directory name should be sda2 so you remember
the /dev/sda5 is the other partition I made when I installed Ubuntu and its partition name is /garage. Does it mean that it is mounted but there are no necessary permissions that will enable me to access and store files here right? Thanks a lot for all the help I really want to learn Ubuntu so that I will stay away from XP.
I made a directory for the partition where I will mount it and here is what I typed in terminal:
mkdir /home/mapmaker/Hangar
A Hangar directory was created in my mapmaker account
Then, I typed the following commands:
mapmaker@mapmaker-desktop:~$ sudo su
root@mapmaker-desktop:/home/mapmaker# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-generic/volatile type tmpfs (rw)
/dev/sda5 on /garage type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
root@mapmaker-desktop:/home/mapmaker# sudo mount /dev/sda5 home/mapmaker/Hangarmount: mount point home/mapmaker/Hangar does not exist
However, the /dev/sda5 was not mounted on Hangar. What should I correctly do to mount the /garage to Hangar? Thanks.
no need for the "sudo" command, you were already root!
You should NOT be root to do the following:
un-mount /garage:
Code:
sudo umount /garage
now mount it:
Code:
sudo mount -o uid=1000 /dev/sda5 /home/mapmaker/Hangar
You missed off the "/" for /home/mapmaker/Hangar!!
the above will work if you are uid 1000, to check, do this:
Code:
less /etc/passwd
This is the global user identity file
Look for your username, the number "1000" should appear in the 3rd and 4th fields on that line.
hit "q" to exit the "less" command.
I tried to mount and these are what I did in the Terminal:
mapmaker@mapmaker-desktop:~$ sudo umount /garage
Password:
mapmaker@mapmaker-desktop:~$ sudo mount -o uid=1000 /dev/sda5 /home/mapmaker/Hangar
mount: wrong fs type, bad option, bad superblock on /dev/sda5,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I tried to mount and these are what I did in the Terminal:
mapmaker@mapmaker-desktop:~$ sudo umount /garage
Password:
mapmaker@mapmaker-desktop:~$
mount: wrong fs type, bad option, bad superblock on /dev/sda5,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
mapmaker@mapmaker-desktop:~$
Okay, we need to tell it to use ext2:
Code:
sudo mount -o uid=1000,rw -t ext2 /dev/sda5 /home/mapmaker/Hangar
I added the "rw" option to make sure it mounts "read/write" (not read only)
I added the "-t ext2" option so that it mounts it as a ext2 filesystem.
Did you try the suggested command? This one:
Code:
dmesg | tail
"dmesg" prints the system message log on screen
"| tail" pipes the output through the program "tail", this has the effect of only showing the last few lines (10 by default) of the system messages.
"dmesg" is very useful in determining system problems such as mount errors.
I also noticed that there is padlock icon on top of the Hangar folder and I clicked it on the properties tab and permissions and and it says that I am not the owner and I can not change permissions. Hmm. I really am not familiar with the commands using terminal and the manual helps but am not that familiar and comfortable with typing commands that much. Here is less /etc/passwd command and this what it says:
I added the line in the fstab using sudo gedit /etc/fstab and added the line to the last.
I also mounted the drive and this appeared in Terminal:
Quote:
mapmaker@mapmaker-desktop:~$ umount /dev/sda5
umount: /dev/sda5 mount disagrees with the fstab
mapmaker@mapmaker-desktop:~$
And when I mount it it says:
Quote:
mapmaker@mapmaker-desktop:~$ mount /dev/sda5
mount: according to mtab, /dev/sda5 is already mounted on /garage
mount failed
mapmaker@mapmaker-desktop:~$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.