LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-27-2010, 05:44 PM   #31
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146

Ubuntu is awesome. Arch is too.

Ubuntu is stable and easy. In my experiences, I have never had a problem with upgrading to the next new version or anything.

Arch is great too, but it can be hard to get everything set up just as you like.

Debian is VERY STABLE and features, alongside Arch but apart from Ubuntu, a rolling-release cycle.
 
Old 02-27-2010, 05:58 PM   #32
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by dor View Post
Thank you! I'm glad to read incidents of an experienced user.
But where's the /media directory? I couldn't find it in the Linux's directory structure @ tuxfiles.org. Did you mean that you created that directory/partition in / (root) ?
I assume that your suggestion is to setup the following partitions schema:
  • ???GB ext3 for OpenSUSE root directory
  • ???GB ext3 for OpenSUSE /home directory
  • ???GB ext3 for OpenSUSE /media/DATA directory
  • ???GB NTFS for Windows
But can I exclude the /media/DATA directory and simply create a /media partition? (without creating further DATA directory)
What is /media/DATA
 
Old 02-27-2010, 06:16 PM   #33
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by MTK358 View Post
What is /media/DATA
I believe the OP was referring to his/her personal data being stored on an external HD, as mentioned here.

Quote:
Originally Posted by dor
I can store my personal data in my external HDD, so I'll make the /home partition quite small (about 80GB).
/media/DATA would be the mount point for the external drive.

@dor Speaking of, if the external drive is something you plan to always have mounted, I would simply create an entry for it in /etc/fstab, rather than dynamically mounting it in /media with HAL. The mount point can be pretty much where you like or makes sense for you. You could just create a mount point /DATA, if you want.
 
Old 02-28-2010, 08:01 AM   #34
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reed9 View Post
As I understand, back in the day, to mount external media, you would by convention create a mount point in /mnt. Since the advent of autodetection and mounting of external drives, a mount point based on the volume name of the external drive is dynamically created and destroyed as needed in /media instead of /mnt.

The basic process is:
*You plug in the drive, the kernel registers the device in /sys
*Udev create a device node, ie,/dev/sdb1
*The HAL daemon is notified via Dbus.
*Hal broadcasts via Dbus to listening applications, ie, nautilus, the GNOME file manager, or Thunar, the XFCE file manager, or a volume manager, like thunar-volman, or whatever GNOME uses these days.
*The volume manager dynamically creates the mount point at /media/<volume name>, or can open up your music player for CDs, or whatnot
Wow thanks for the details, but I'm yet an experienced user, so it's a bit difficult to understand the actual process and the meaning of all these names.I'm using KDE so it will probably be a different software than those you mentioned.
So /media is the directory for the mount points.

Quote:
Originally Posted by MTK358 View Post
What is /media/DATA
At first, I didn't understand that either, but reed9 explained and I understood. /media/DATA supposes to be a mount point, instead of being in /mnt, by auto-detecting the external device.

Quote:
Originally Posted by reed9 View Post
I believe the OP was referring to his/her personal data being stored on an external HD, as mentioned here.
Nope I was referring to amenditman's words:
Quote:
Originally Posted by amenditman View Post
I learned that there are a lot of config files in your /home directory which don't always work in the newer version if you don't format and re-install /home during the upgrade.

I always keep all personal data on a separate /media/DATA partition outside of /home. Then if I need to re-install I can do both / and /home.

It isn't always necessary, but the few times that it is you will be glad you kept it separate.
Quote:
Originally Posted by reed9 View Post
@dor Speaking of, if the external drive is something you plan to always have mounted, I would simply create an entry for it in /etc/fstab, rather than dynamically mounting it in /media with HAL. The mount point can be pretty much where you like or makes sense for you. You could just create a mount point /DATA, if you want.
Neat I found some relevant info about /etc/fstab here: How to edit and understand /etc/fstab - 1.1
 
Old 02-28-2010, 08:16 AM   #35
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
Wow thanks for the details, but I'm yet an experienced user, so it's a bit difficult to understand the actual process and the meaning of all these names.I'm using KDE so it will probably be a different software than those you mentioned.
So /media is the directory for the mount points.
The underlying programs are independent of KDE or other desktop environment. KDE does have it's own volume manager type program, off the top of my head I don't recall what it's called. The process is basically the same as far as the kernel registering the device, broadcasting via dbus, etc. HAL is being deprecated and will be gone in Ubuntu 10.04, I believe. I'm sure other distros will soon follow suite. Devicekit-disks, or I guess udisks now, and udev are replacing the functionality.
 
Old 02-28-2010, 09:46 AM   #36
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by amenditman View Post
I learned that there are a lot of config files in your /home directory which don't always work in the newer version if you don't format and re-install /home during the upgrade.

I always keep all personal data on a separate /media/DATA partition outside of /home. Then if I need to re-install I can do both / and /home.

It isn't always necessary, but the few times that it is you will be glad you kept it separate.
That just seems like a lot of extra difficulty and complication (not using /home/<user> as your home) for little reward.

Can't you archive your normal files and config files seperately, using these simple bash globs?

Code:
.*      # Get config (hidden) files
[^.]*   # Get non-hidden files

Last edited by MTK358; 02-28-2010 at 09:48 AM.
 
Old 02-28-2010, 01:20 PM   #37
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MTK358 View Post
Can't you archive your normal files and config files seperately, using these simple bash globs?

Code:
.*      # Get config (hidden) files
[^.]*   # Get non-hidden files
I believe that instead
Code:
[^.]*   # Get non-hidden files
One should write:
Code:
[^\.]{1}.*   # Get non-hidden files
I'm not sure about the syntax, but I mean to:
[^\.]{1} - matches a dot in the first character of the filename.
.* - matches 0 or more characters (doesn't matter if these are dots or not)

(unless a filename like '.' is forbidden)

That's what I think from my PHP's REGEX experience.
 
Old 02-28-2010, 02:24 PM   #38
amenditman
Member
 
Registered: Apr 2008
Location: Valley of Gold
Distribution: Arch / Mepis
Posts: 58

Rep: Reputation: 16
@reed9 said @dor Speaking of, if the external drive is something you plan to always have mounted, I would simply create an entry for it in /etc/fstab, rather than dynamically mounting it in /media with HAL. The mount point can be pretty much where you like or makes sense for you. You could just create a mount point /DATA, if you want.

Exactly what I was meaning. When I partitioned my HDD, I created an extra ext3 partition with the bulk of the space and put a Label on it of DATA. Now, it just shows up in the file tree under /media/DATA.

I didn't need to do anything except make myself the owner with chown command as root.

It 'just works'.

It is especially useful when switching distros. Like I went from Ubuntu to Kubuntu to PCLinuxOS to Mepis to sidux to Debian Testing KDE to Arch to Mandriva to sidux. If my personal files had been in /home, I would have needed a much better back up system than I currently have. It is nearly required to format and reinstall /home with these kinds of changes.
 
Old 02-28-2010, 03:33 PM   #39
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
@dor:

They aren't regular expressions, they're BASH globs.

Try this:

Code:
$ echo .*
$ echo [^.]*
An example:

Code:
$ mkdir hiddenfiles
$ cp .* hiddenfiles/
$ tar -czf hiddenfiles.tar.gz hiddenfiles

Last edited by MTK358; 02-28-2010 at 03:36 PM.
 
Old 03-02-2010, 04:28 AM   #40
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by amenditman
@reed9 said @dor Speaking of, if the external drive is something you plan to always have mounted, I would simply create an entry for it in /etc/fstab, rather than dynamically mounting it in /media with HAL. The mount point can be pretty much where you like or makes sense for you. You could just create a mount point /DATA, if you want.

Exactly what I was meaning. When I partitioned my HDD, I created an extra ext3 partition with the bulk of the space and put a Label on it of DATA. Now, it just shows up in the file tree under /media/DATA.

I didn't need to do anything except make myself the owner with chown command as root.
Sounds great, I plan to work this way. Please correct me if I'm wrong, but that directory contains actually anything: config files, bash/php/perl scripts, media (videos, audios, documents etc.), except the installed programs which are in /usr/local.

So, for example, if you'd want a script to work on startup, you would append a line at the end of the startup script that's in /etc/inittab. That line tells to execute a script that's in /media/DATA (assuming /media/DATA is the access point to the partition).

Quote:
Originally Posted by MTK358
They aren't regular expressions, they're BASH globs.
Right, my bad
 
Old 03-02-2010, 06:40 AM   #41
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
/etc/inittab has information such as which runlevel to boot into, and then points to scripts associated with that runlevel in /etc/rc.d.
http://www.linux.com/news/enterprise...nd-rcd-scripts

So in Arch for example I have
Code:
id:3:initdefault:
rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p
Which says I'm going to boot into runlevel 3, start the boot process for every runlevel with the script at /etc/rc.sysinit, and then in runlevel 2-5, run the script at /etc/rc.multi.

If you want a script to run at startup, you generally put it in /etc/rc.local. Specifics might vary by distro.

Installed binaries can be in a couple of locations. Usually in /usr/bin, /bin, and /sbin.
EDIT: Type echo $PATH to see where your system is looking for executables.

I'm not really following what you mean by that directory contains anything. Your external drive? It contains whatever files you store on it...

Last edited by reed9; 03-02-2010 at 06:43 AM.
 
Old 03-02-2010, 07:53 AM   #42
dor
LQ Newbie
 
Registered: Feb 2010
Posts: 26

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reed9 View Post
Installed binaries can be in a couple of locations. Usually in /usr/bin, /bin, and /sbin.
EDIT: Type echo $PATH to see where your system is looking for executables.

I'm not really following what you mean by that directory contains anything. Your external drive? It contains whatever files you store on it...
By saying "that directory contains anything" I mean to each and every file that you append. In other words, instead of creating new files in some directory inside / (root), you'll create it inside /media/DATA (or any other name that you'll assign to the mount point).
This way, even if you'll re-install the same version that you already have - it will not matter, since every config file or script is located in /media/DATA. You'll just have, for example, to append a line to the startup script in /etc/rc.local that asks to execute another script file that's located somewhere in /media/DATA.
(Although by re-installing the system, you delete the software that you installed. Which is actually a good thing if you install another version/distro)

 
  


Reply

Tags
install, upgrade


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Upgrade 10.2 or Install 11 Fresh? NightSky Slackware 14 05-19-2007 06:14 PM
should I upgrade to 11.0 or install it fresh adityavpratap Slackware 4 10-16-2006 03:45 AM
Upgrade or fresh install Atif_Khan Fedora 12 02-07-2005 01:16 PM
Upgrade or fresh install? im_an_elf Suse/Novell 2 01-26-2005 10:08 AM
Redhat 6.2 to 7.0 -- Upgrade or Fresh Install? scoats Linux - Software 2 10-21-2001 01:17 AM


All times are GMT -5. The time now is 07:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration