LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-19-2009, 08:01 AM   #16
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66

Were you using Mandriva, all of this would happen in a GUI tool. For Ubuntu, I don't know…

Yves.
 
Old 02-19-2009, 08:04 AM   #17
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by QueenZ View Post
Wow, you guys really are good at explaining how things work

Just wondering if there could be some program to manage partition mounting..
Why didn't we think of that???????........

mount -a ##mounts everything in fstab

mount <device> <mountpoint> ##manual mounting

mount <device>
OR
mount <mountpoint> ## mounts the specified device (by device name or mountpoint name---if there is an entry in fstab)

For more lite reading:

man mount
man fstab
 
Old 02-19-2009, 08:11 AM   #18
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Quote:
Originally Posted by theYinYeti View Post
Please be a bit more gentle with QueenZ. He/She obviously is newbie.

So you currently have /dev/sda2 mounted automatically (and /dev/sda5 is swap). Would you be able to tell us what partition you would also want to have automatically mounted*? Refer to the output of fdisk that you pasted in a previous post. Is it /dev/sda1 (should be your Windows C: drive) or is it /dev/sda4 (seemingly another Linux partition)?

As for the mount point, /mnt is usually for permanent storage, and /media is usually for removable (USB, floppy, CD…) media.

Yves.
the other linux partition..
 
Old 02-19-2009, 08:33 AM   #19
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by QueenZ View Post
Just wondering if there could be some program to manage partition mounting..
It depends what do you mean.

For permanent mounts (i.e. non removable devices) the best bet is always to use fstab to mount them at bootup.

The rest of devices (removable disks, pendrives, optical disks like cdrom or dvd, etc) you can as well have an entry on fstab for them, and then just mount them with a simple command.

There are also desktop applets that can do this and there are also desktops like kde and gnome which have their own way to deal with devices and can even automount. It all depends on the concrete problem I guess.

Some people do like automounting, and you shouldn't have a problem with that if you use any of the major desktops. Some others like me do not like automount, and prefer to mount the drives manually in one or another way.

In either case, having a correct entry for every disk on your fstab never hurts.
 
Old 02-19-2009, 08:35 AM   #20
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by QueenZ View Post
what's /etc/fstab anyway??
IN terminal type "man fstab" and read. Also check "man mount".
 
Old 02-19-2009, 08:35 AM   #21
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
So it is /dev/sda4. You'll have to find this partition's UUID. You'll find it by executing this command:
Code:
ls -l /dev/disk/by-uuid/
Here's my output:
Code:
[yves@localhost ~]$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-02-19 08:01 21f8c95d-78ba-4eef-b1e2-87127cd8580d -> ../../sda5
lrwxrwxrwx 1 root root 10 2009-02-19 08:01 26b73a60-f487-4ee8-9bda-9b80cdc98c06 -> ../../sda6
lrwxrwxrwx 1 root root 10 2009-02-19 08:01 6A64F60A64F5D931 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-02-19 08:01 83a67e7e-6e4e-4c15-a7e1-5fa304c85825 -> ../../sda7
For me, the UUID for, say, sda1 (Windows C: drive) would be “6A64F60A64F5D931”.

What is your sda4's UUID?

Yves.
 
Old 02-19-2009, 08:49 AM   #22
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Here's mine..

Quote:
queenz@queenz-ubuntu:~$ man ls
queenz@queenz-ubuntu:~$ ls -l /dev/disk
total 0
drwxr-xr-x 2 root root 280 2009-02-19 09:47 by-id
drwxr-xr-x 2 root root 60 2009-02-19 09:47 by-label
drwxr-xr-x 2 root root 180 2009-02-19 09:47 by-path
drwxr-xr-x 2 root root 120 2009-02-19 09:47 by-uuid
queenz@queenz-ubuntu:~$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-02-19 09:47 56DC07E7DC07C06B -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-02-19 04:27 57bc2b98-6257-4270-8a8e-000c4c0ac505 -> ../../sda5
lrwxrwxrwx 1 root root 10 2009-02-19 04:27 b414c172-c717-4908-8bcd-3060cec08864 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-02-19 09:47 f8cbec94-b273-45e1-9b00-34aad25ccf0b -> ../../sda4
queenz@queenz-ubuntu:~$
 
Old 02-19-2009, 10:04 AM   #23
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
OK. So “f8cbec94-b273-45e1-9b00-34aad25ccf0b” is sda4's UUID.
Open a terminal window (such as Konsole or Gnome-terminal), and become root by entering the command “su - root” and then providing root's password. Then, execute this command:
Code:
cat >>/etc/fstab <<-"ENDOFFILE"

# /dev/sda4
UUID=f8cbec94-b273-45e1-9b00-34aad25ccf0b /mnt/sda4 ext3 relatime,errors=remount-ro 0 1
ENDOFFILE
This will append three lines to your /etc/fstab, that will make sda4 be mounted automatically on next reboot exactly the same way sda2 is (alternatively, those three lines can be added by editing the file with “sudo kedit /etc/fstab”). You can see I chose /mnt/sda4 as a mount point but you can change that if you want. Whatever the name, the directory has to exist, so, still as root, in the same terminal window for example, run this command:
Code:
mkdir /mnt/sda4
Now if you don't want to wait for the next reboot to have access to the files in this partition, you can immediately mount the filesystem with (still as root):
Code:
mount /mnt/sda4
One small thing though… I've heard all sort of things about the root account on Ubuntu but I*never used it. If the “su - root” command doesn't prompt for a password, or if you don't know this password, then it is worth trying to use this command instead: “sudo su root”.

Yves.

Last edited by theYinYeti; 02-19-2009 at 10:07 AM.
 
Old 02-19-2009, 10:13 AM   #24
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
sudo su root worked fine

Last edited by QueenZ; 02-19-2009 at 10:15 AM.
 
Old 02-19-2009, 10:22 AM   #25
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
hmm.. something's wrong..

Quote:
queenz@queenz-ubuntu:~$ su -root
su: invalid option -- 'r'
Usage: su [options] [LOGIN]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd

queenz@queenz-ubuntu:~$ su - root
Password:
su: Authentication failure
queenz@queenz-ubuntu:~$ sudo su root
[sudo] password for queenz:
root@queenz-ubuntu:/home/queenz# mkdir /mnt/sda4
root@queenz-ubuntu:/home/queenz# cat >>/etc/fstab <<-"ENDOFFILE"
>
> # /dev/sda4
> UUID=f8cbec94-b273-45e1-9b00-34aad25ccf0b /mnt/sda4 ext3 relatime,errors=remount-ro 0 1
> ENDOFFILE
root@queenz-ubuntu:/home/queenz# mount /mnt/sda4
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

root@queenz-ubuntu:/home/queenz#
 
Old 02-19-2009, 10:32 AM   #26
SkinnerC
Member
 
Registered: Dec 2007
Location: New England, USA
Distribution: Ubuntu 8.04 LTS, Slackware 12.2
Posts: 138
Blog Entries: 1

Rep: Reputation: 20
Code:
sudo su <return>
Then enter your password (not root's)

This will give you a root terminal to work in. Make sure you close this terminal as soon as you finish what you are doing.
 
Old 02-19-2009, 10:33 AM   #27
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
There's good and there's bad

The good points are:
— The mount command looks at the /etc/fstab. It located the /mnt/sda4 right (hence the associated UUID).
— The mount command finds a UUID in /etc/fstab and reports an error on the /dev/sda4 partition. So the UUID is the good one.

In short, what you did, you did right. Good.

Now the bad point: it doesn't work. I see two possible reasons:
— Either the type isn't good (ie: it is not an Ext3 partition).
— Or the partition isn't formatted at all.

Do you have any clue which is the good one?
What is the output of this command?
Code:
lshal | sed -n '/sda4/,/fstype =/ p'
Yves.
 
Old 02-19-2009, 10:38 AM   #28
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373

Original Poster
Blog Entries: 2

Rep: Reputation: 32
Quote:
queenz@queenz-ubuntu:~$ lshal | sed -n '/sda4/,/fstype =/ p'
block.device = '/dev/sda4' (string)
block.is_volume = true (bool)
block.major = 8 (0x8) (int)
block.minor = 4 (0x4) (int)
block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_1ATA_FUJITSU_MHV2060BH_PL_NW9AT662A20T' (string)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
info.parent = '/org/freedesktop/Hal/devices/storage_serial_1ATA_FUJITSU_MHV2060BH_PL_NW9AT662A20T' (string)
info.product = 'other' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_f8cbec94_b273_45e1_9b00_34aad25ccf0b' (string)
linux.hotplug_type = 3 (0x3) (int)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:12.0/host2/target2:0:0/2:0:0:0/block/sda/sda4' (string)
org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list)
org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list)
org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)
org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)
storage.model = '' (string)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'ext2' (string)
queenz@queenz-ubuntu:~$
....
 
Old 02-19-2009, 10:46 AM   #29
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by QueenZ View Post
Wow, you guys really are good at explaining how things work

Just wondering if there could be some program to manage partition mounting..
there is one called webmin that provides a nice web based interface for administering common tasks
however it should be noted that this isn't a substitue for understanding how it works

one if the advantages is if gui programs fail we still have command line and all configuration files are plain text unlike windows where the registry is in a prorpietary binary format and if regedit breaks your outa lukc
 
Old 02-19-2009, 11:09 AM   #30
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i'm not sure why universally unique identifiers are necessary ?

would putting this line in /etc/fstab work:

/dev/sda4 /mnt/sda4 ext3 relatime,errors=remount-ro 0 1

?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Mount New Partition JonBL Linux - Software 2 07-12-2007 02:53 AM
installed FC 3 on another partition but can not mount that partition. MurX Fedora 15 02-01-2006 05:28 AM
Cant mount partition bvav22 Linux - Hardware 1 06-05-2005 09:04 PM
How to resize a partition and create/mount a new partition? Maarten_Holland Linux - Newbie 1 04-20-2005 08:56 AM
Why does my XP partition never mount? Kramer Linux - Laptop and Netbook 9 09-26-2003 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration