LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   OS - upgrade or a fresh install? and, which distro. is best in handling upgrades? (https://www.linuxquestions.org/questions/linux-newbie-8/os-upgrade-or-a-fresh-install-and-which-distro-is-best-in-handling-upgrades-791566/)

lupusarcanus 02-27-2010 04:44 PM

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.

MTK358 02-27-2010 04:58 PM

Quote:

Originally Posted by dor (Post 3879338)
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 :confused:

reed9 02-27-2010 05:16 PM

Quote:

Originally Posted by MTK358 (Post 3879396)
What is /media/DATA :confused:

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.

dor 02-28-2010 07:01 AM

Quote:

Originally Posted by reed9 (Post 3879352)
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 (Post 3879396)
What is /media/DATA :confused:

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 (Post 3879415)
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 (Post 3878978)
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 (Post 3879415)
@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

reed9 02-28-2010 07:16 AM

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.

MTK358 02-28-2010 08:46 AM

Quote:

Originally Posted by amenditman (Post 3878978)
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


dor 02-28-2010 12:20 PM

Quote:

Originally Posted by MTK358 (Post 3879949)
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. :)

amenditman 02-28-2010 01:24 PM

@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.

MTK358 02-28-2010 02:33 PM

@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


dor 03-02-2010 03:28 AM

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 :doh:

reed9 03-02-2010 05:40 AM

/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...

dor 03-02-2010 06:53 AM

Quote:

Originally Posted by reed9 (Post 3882308)
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)

:)


All times are GMT -5. The time now is 04:21 AM.