entries in /etc/fstab

I have a multiboot system with ubuntu and suse.
On my system i have 2 data EXT3 partitions : sda7 and sdb6
in ubuntu I edited /etc/fstab with the following entries :

/dev/sda7	/media/sda7	ext3	defaults	0	0
/dev/sdb6	/media/sdb6	ext3	defaults	0	0

In order to mount them at startup. can i use the same entries in /etc/fstab in suse and put them at the end of the file or should I entry something else ?

When you want them mounted on the same place as you did in Ubuntu, why not? But /media/sda7 and /media/sda6 (what an awfull names you choose) must exist.

Why not, isn’t very clear like that. Better than C,D or E in windows :frowning:
In ubuntu I labeled them “LINUXDATA_SDA7” and “LINUXDATA_SDB6”
Simple and clear.
So I can use exact the same entries in suse’s /etc/fstab ?

I already said: Why not? It is all Unix/Linux and /etc/fstab is as old as …

BTW to compare with Windows C, D … may not be very clever here. The way this is done in Windows is completely different from Unix/Linux. The main things in Unix/Linux are:
. that it hides any connection to the hardware away, something that you reintroduce by giving them the partition names they got because of the partitioning and not of any logical usage of that disk space;
. they can be mounted in the directory tree where needed and are not, as in Windows) sitting at the bottom of a new tree (starting at A:, B:, etc.), again I doubt if you mount them on a place logicaly connected to their usage (/media being the place where it is logical to mount the removable datacontainers like CDs, DVDs, USB-sticks and the like).

But As I already pointed out, it is your choice (Linux is about choice) and nobody stops you from mounting a DVD with a movie at /lib/modules/home/var/elephant.

It is always difficult to assess the level of knowledge from people asking questions here, so forgive me if I point you to something trivial for you, but maybe a look at SDB:Basics of partitions, filesystems, mount points - openSUSE may be of interest to you.

Okay, so if I understand correctly there is no harm in mounting the part. in /media/sda7 and /media/sdb6 but you would rather mount in let’say /home/guy/documenten and /home/guy/movies and so on. It’s a matter of taste or personal organisation or is ther more to it than that :expressionless:

This should work.
It doesn’t really matter where in the file, but I would place them with the other partitions.

Thanks very much to all. Let you know the outcome :wink:

It is a matter of organising ones system. You are not only the user, but also the system manager. May be I am a bit … about it, but I feel that a lot of people are very much influenced by how it was once when they used a MS-DOS bases system. Forget it and try to learn how a real OS does manage these things.

Alternative: you can mount in /media/moviedisk and then as *guy *inside your homedirectory do:

ln -s /media/moviedisk movies

It has the same result that when you start your file-manager (in your home), you will immideately see your movies directory (well working in your desktop I should say “folder movies” shouldn’t I?).

So you say to put the mount point in /media/moviedisk and put a link in /home/guy.
Why not mount directly on /home/guy/moviedisk. I haven’t used links in linux before so I have no experience with it :wink:
What is the advantage of mounting in /media/moviedisk and put a link in /home/guy

ln -s /media/moviedisk movies

I did not say you “must” mount and then use a link.

I suggested to mount where you want/need it (because I come from a Unix background and think that is a very normal way to do this).

Then I suggested you an “alternative”. Mount somewhere else (albeith stll on a locical place with a logical name) and then make a symbolic link. Or may be even more symbolic links, what when you have more users and they all want see the movies? Make a link from everebodys home and they will all be happy.

I only show you that there are more solutions and that it is up to you (as system manager) to choose between them. But you can only make the (halfway) correct choices when you have knowledge. It is therefore that I give you hints and a link (in an earlier post above). Only to increase your Unix/Linux knowledge and experience, so that you can make the right decisions.

And when you say: “I haven’t used links in linux before so I have no experience with it”, then gather some experience. You do not need a mount point or any troublesome thing. Just, as guy, create a link inside your home directory:

ln -s /etc/sysconfig sconf

Now you can search/read through this directory by using sconf from your home.
Enough of it? From your home:

rm sconf

And you are back to the original situation.
Read the man page on ln, try to find out what the difference is between “hard” and “soft/symbolic” links and why hard links are confined to be within the same file system.

Back to you original question. Your suggestion to mount in /home/guy/movies is perfect. Put this line not before the one about /home if you have one, so /home is mounted before you mount /home/guy/movies. Read the man pages on fstab and mount, so you understand where it is used for (mainly for mounting at boot and also when using *mount *you do not have to specify all the parameters, because *mount *finds them in fstab).

thank you for the detailed explanation.I tried the (s) link and it works fine. In the early days of me trying out ubuntu I studied the theory (basics and the items I needed to get an installation right) so I know what you are talking about. But be honest, the “/etc/fstab” file does not need changing or manipulating every day.

Back to you original question. Your suggestion to mount in /home/guy/movies is perfect. Put this line not before the one about /home if you have one, so /home is mounted before you mount /home/guy/movies. Read the man pages on fstab and mount, so you understand where it is used for (mainly for mounting at boot and also when using mount you do not have to specify all the parameters, because mount finds them in fstab).

You say mounting in “/home/guy/movies” is perfect but what do you mean when you are saying “do not put this line before the one /home, if you have one”
Here is an output of my /etc/fstab :

 linux-ccxm:~ # cat /etc/fstab
/dev/disk/by-id/ata-WDC_WD2500AAJB-00WGA0_WD-WCARY0588249-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD2500AAJB-00WGA0_WD-WCARY0588249-part6 /                    ext3       acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

What about my question : mounting in “/home/guy/movies” and have also a s-link in my /home/guy folder. What is the advantage of that ?

As you can see in your /etc/fstab, you do not have a separate partition to be mounted as /home. Most people have, because then they can reinstall/upgrad their system without touching evrything that is in /home (the users won data).
I think you can understand that having something like:

/dev/sda8 /home/guy/movies
/dev/sda7 /home 

will cause trouble because you can not mount on something inside /home that only shows up after /home is mounted. Thus:

/dev/sda7 /home
/dev/sda8 /home/guy/movies

would be the correct sequence. But as you do not have a separate /home this is not valid in this case.

And I do not understand you last question. When you have /home/guy/movies and you mount there, everything is there. What do you want a link for. You could (if you have english, french and dutch days in your live) make links (as guy within your home dir) like:

ln -s movies 'des films'
ln -s movies films

and all would lead to the same contents, but I doubt you mean this.

Why do you not just add a line at the end of /etc/fstab and call

mount -a

and then check what happens? You can always *umount *and change /etc/fstab back to what it was when you are not satisfied with the results. A little bit more guts please;)

First of all many thanks as your replies to my endless questions come almost imediately. On the ubuntu.nl forum, answers come in days later or do not come at all. Good point for the opensuse forum and of course for you :wink:
Your point is exactly what I meant, what’s the use of getting a (s)link when everything is at your disposal when you mount at /home/guy/movies. The only thing now I have to work out is an oppropriated name for the partition as I put not only movies in it. But there you cannot help me I am afraid. And do not worry, there is no lack of guts, believe me lol!

Allright, everything works great. Thanks and till next time :stuck_out_tongue:

Congrats! You are welcome. I am sure your insight in a real operating system has grown. lol!

Very true. I am now moving most of my files (video, music, photos, …) which came from the old ntfs partitions to the new EXT3 partitions. I discovered that the rights of those files where all 777
I even tried first to alter those rights in the ntfs partitions, but that’s not possible of course. Is it wise to leave those files -rwxrwxrwx (video and music files)

summer69 wrote:
> Is it wise to leave those files -rwxrwxrwx (video and music files)

depends on what you need…i mean, (for example) lets say the video
or music files of are of a very ‘mature’ nature and you let your
daughter (mom, sister, kid brother, whatever) use your machine…if
you want to keep those folks from easily watchin’/listenin’ then you
can do that by just putting them in YOUR /home, and then if they do
not have root password they can’t easily browse inside
/home/[you]/hotstuff (for example)… [if they have a Live CD and the
know how they CAN see/hear whatever hey want.]

but, if you wanted to put your stuff on (say) a USB attached drive and
sometime let other folks put some of there stuff on it, or watch some
of the stuff on it…then you could make your user the owner and
change permissions so that they are not readable/writable by anyone else…

and, you might try to think up a good reason for a movie/song to be
writable…so, you might wanna make’em all read only…

and, of course there is no need for them to be executable, but on
the other hand it shouldn’t be a huge problem if they are [BUT, are
you absolutely 100% certain what you think is a photo file is not
actually a bash script saying to (say) delete everything under ~/home
??? and if you click on it, BOOM!]

do you know you can change both ownership, read/write permissions and
ability to execute from a command line interface…and do an entire
directory tree at once? (lots faster then click click clicking on each
and every file…)?

see man for chmod and chown, enjoy…and once you think you have the
correct incantation ask here…or PRACTICE on a little bit of data
that you have another copy of…


I have some files of"mature nature" but I’m the only one that uses the systems here

You should not be to sure about that :wink:

But as palladium explains, there is no need to have x access on those files. And an extra security against accidental removal is removing the w bit. Security must be something automatic. Use chown and chmod and be saver.

I am already busy doing just that. Now that I’m putting most files on a ext3 partition I can modify the rights.
Impossible on a ntfs partition :\