Tuesday, September 2, 2008

Re: [BLUG] Amarok

Ummm, well, UUIDs are funny things.

For one thing, taking the image of a partition and restoring that
partition on any other media will have the effect of creating a
filesystem with the same UUID.

This is GREAT if you're taking an Ubuntu image from one machine and
moving it to another, as your filesystems will have the same UUID and
thus the mounting will work right.

HOWEVER, just as I use images to save time installing a large number
of machines; it seems that some external hard drive manufacturers have
taken to using images to save time slapping the read me files onto all
their hard drives.

I learned this when my computer wouldn't mount both my brand new 1TB
USB drive and the one my father bought at the same time, same place;
it thought of them as the same hard drive, since the UUIDs were
identical.

Just a tangential heads up.

Simón

On Tue, Sep 2, 2008 at 2:16 PM, Steven Black <blacks@indiana.edu> wrote:
> This is one of the reasons Ubuntu migrated /etc/fstab to refer to
> devices by UUIDs (you can also refer to them by label, but UUID is
> guaranteed to be unique).
>
> Cheers,
>
> --
> Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
> Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok



On Tue, Sep 2, 2008 at 12:45 PM, Steven Black <blacks@indiana.edu> wrote:
On Tue, Sep 02, 2008 at 11:17:38AM -0400, Michel Salim wrote:
> On Tue, Sep 2, 2008 at 10:35 AM, Shei, Shing-Shong <shei@cs.indiana.edu> wrote:
> > Make sure that your UID is consistent between these two; i.e., if
> > you create an account foo on both distro's, the UID on both distro's
> > should be the same.  The tricky part is that the program you compiled
> > on distro 1 (and put in /home/foo/bin) might use different shared libraries
> > than the one on distro 2.  In this case, the program can only be run on
> > distro 1 but not distro 2.
> >
> So anything in ~/bin should preferably be architecture-independent
> scripts, or statically-compiled binaries. Of course, that won't help
> you if /home is shared between two different architectures
> (i386/x86_64 and ppc, perhaps)

You can have a totally shared /home with multiple platforms, you just
need to be trickier.

You can use `uname -p` and `uname -o` to get the basic processor and
operating system information. (Though note that you can be x86 and have
a number of potential options for "uname -p". Ex. A distribution which
supports 386's may report i386.)

I would possibly rely on "uname -m". I have never gotten 'uname -p' to show either x86 or i386 on Ubuntu. For some reasons, it just says "unknown".
It's a bug with either Ubuntu or coreutils which noone seems to keen to fix.

My 2 cents,
Thanks,
 -- Abhishek
 

Re: [BLUG] Amarok

On Tue, Sep 02, 2008 at 11:17:38AM -0400, Michel Salim wrote:
> On Tue, Sep 2, 2008 at 10:35 AM, Shei, Shing-Shong <shei@cs.indiana.edu> wrote:
> > Make sure that your UID is consistent between these two; i.e., if
> > you create an account foo on both distro's, the UID on both distro's
> > should be the same. The tricky part is that the program you compiled
> > on distro 1 (and put in /home/foo/bin) might use different shared libraries
> > than the one on distro 2. In this case, the program can only be run on
> > distro 1 but not distro 2.
> >
> So anything in ~/bin should preferably be architecture-independent
> scripts, or statically-compiled binaries. Of course, that won't help
> you if /home is shared between two different architectures
> (i386/x86_64 and ppc, perhaps)

You can have a totally shared /home with multiple platforms, you just
need to be trickier.

You can use `uname -p` and `uname -o` to get the basic processor and
operating system information. (Though note that you can be x86 and have
a number of potential options for "uname -p". Ex. A distribution which
supports 386's may report i386.)

Provided you actually install lsb-release (or whatever package contains
lsb_release) you can reliably get the distribution information using
`lsb_release -si` and `lsb_release -sr` (or `lsb_release -sc`).

Using this information you should be able to generate some unique key
value for your setup. You would then have a ~/bin with the universal
scripts, and have sets of ~/my/SOMEKEY directories which mirror the
structure of /usr. You could then have a ~/my/src directory and use that
to generate a ~/my/SOMEKEY/stow directory, and use GNU Stow to handle
versioning.

All it requires is setting some information in your ~/.profile to assign
the correct environment variables. Once you have the platform key you'll
be using, that should be relatively straight-forward.

> Perhaps you can get by with compiling against a pre-defined LSB
> target, though. Anyone knows how feasible that is in current
> distributions?

There's a problem. Not all distributions support LSB fully.

It can be easier to just recompile it for the systems where you need it.
I'm thinking it will usually be something fairly small, as big packages
tend to have native alternatives.

Of course, in some cases binaries will work across distributions. You do
need to know what to do when things fail, though.

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Re: [BLUG] Amarok

Not anymore. The latest kernels use the sdX nomenclature for either one.

Shei, Shing-Shong wrote:
> AFAIK those are for SATA drives not for PATA (aka IDE). --SS
>
>> PS on newer kernels the device names will probably be sd* rather than
>> hd* -- even for IDE devices: the new IDE controller exposes a
>> SCSI-like interface, AFAIR.

--
Mark Warner
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

On Tue, Sep 02, 2008 at 02:07:06PM -0400, Shei, Shing-Shong wrote:
> AFAIK those are for SATA drives not for PATA (aka IDE). --SS
>
> > PS on newer kernels the device names will probably be sd* rather than
> > hd* -- even for IDE devices: the new IDE controller exposes a
> > SCSI-like interface, AFAIR.

Right, however only old hardware will have PATA drives. It is easy to
think "UltraIDE" and to still have the device names shift on you.

This is one of the reasons Ubuntu migrated /etc/fstab to refer to
devices by UUIDs (you can also refer to them by label, but UUID is
guaranteed to be unique).

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Re: [BLUG] Amarok

AFAIK those are for SATA drives not for PATA (aka IDE). --SS

> PS on newer kernels the device names will probably be sd* rather than
> hd* -- even for IDE devices: the new IDE controller exposes a
> SCSI-like interface, AFAIR.
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

On Tue, Sep 2, 2008 at 10:35 AM, Shei, Shing-Shong <shei@cs.indiana.edu> wrote:
> Yes, it's possible to share both swap partition and /home between
> distributions although the later might be a little bit tricky. Let's
> say, you paritioned the drive into 4 (primiary) ones:
>
> hda - / for distro 1
> hdb - swap
> hdc - /home
> hdd - / for distro 2
>
> When you boot to distro 1, your /etc/fstab (on hda) looks like:
> /dev/hda / ext3 defaults 1 1
> /dev/hdc /home ext3 defaults 1 2
> /dev/hdb swap swap defaults 0 0


PS on newer kernels the device names will probably be sd* rather than
hd* -- even for IDE devices: the new IDE controller exposes a
SCSI-like interface, AFAIR.

> Make sure that your UID is consistent between these two; i.e., if
> you create an account foo on both distro's, the UID on both distro's
> should be the same. The tricky part is that the program you compiled
> on distro 1 (and put in /home/foo/bin) might use different shared libraries
> than the one on distro 2. In this case, the program can only be run on
> distro 1 but not distro 2.
>
So anything in ~/bin should preferably be architecture-independent
scripts, or statically-compiled binaries. Of course, that won't help
you if /home is shared between two different architectures
(i386/x86_64 and ppc, perhaps)

Perhaps you can get by with compiling against a pre-defined LSB
target, though. Anyone knows how feasible that is in current
distributions?

Sharing between a Debian-derived and a Red Hat-derived distribution,
sticking to the Debian-style UID might be preferable. Red Hat and
other RPM distributions tend to start at 500, Debian at 1000, and as
far as I can tell anything above 500 on Red Hat is reserved for normal
users anyway.

--
Michel Salim
http://hircus.jaiku.com/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

Yep. Thanks. --Bruce

Mark Warner wrote:
> Shei, Shing-Shong wrote:
>> Yes, it's possible to share both swap partition and /home between
>> distributions although the later might be a little bit tricky. Let's
>> say, you paritioned the drive into 4 (primiary) ones:
>>
>> hda - / for distro 1
>> hdb - swap
>> hdc - /home
>> hdd - / for distro 2
>
> Nitpik (but the OP might not pick up on it) -- the above designations
> would be for four *drives*, not four partitions on a single drive.
>
> Four partitions on a single drive would be designated as:
>
> hda1
> hda2
> hda3
> hda4
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

Shei, Shing-Shong wrote:
> Yes, it's possible to share both swap partition and /home between
> distributions although the later might be a little bit tricky. Let's
> say, you paritioned the drive into 4 (primiary) ones:
>
> hda - / for distro 1
> hdb - swap
> hdc - /home
> hdd - / for distro 2

Nitpik (but the OP might not pick up on it) -- the above designations
would be for four *drives*, not four partitions on a single drive.

Four partitions on a single drive would be designated as:

hda1
hda2
hda3
hda4

--
Mark Warner
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

Yes, it's possible to share both swap partition and /home between
distributions although the later might be a little bit tricky. Let's
say, you paritioned the drive into 4 (primiary) ones:

hda - / for distro 1
hdb - swap
hdc - /home
hdd - / for distro 2

When you boot to distro 1, your /etc/fstab (on hda) looks like:
/dev/hda / ext3 defaults 1 1
/dev/hdc /home ext3 defaults 1 2
/dev/hdb swap swap defaults 0 0

When you boot to distro 2, your /etc/fstab (on hdd) looks like:
/dev/hdd / ext3 defaults 1 1
/dev/hdc /home ext3 defaults 1 2
/dev/hdb swap swap defaults 0 0

Make sure that your UID is consistent between these two; i.e., if
you create an account foo on both distro's, the UID on both distro's
should be the same. The tricky part is that the program you compiled
on distro 1 (and put in /home/foo/bin) might use different shared libraries
than the one on distro 2. In this case, the program can only be run on
distro 1 but not distro 2.

Shing-Shong

>
> Question: If you install another Linux on your hard drive, how do you
> make enough partitions? /home obviously can be used by whatever distro
> is on there, so you don't need more that one /home, but are you still
> limited by the <4 primary partitions? Do you have to set up logical
> partitions to manage the different Linuxes you have installed? I
> prefer to have several primary partitions, but have never needed more
> than /, /home, and /swap. That's three already, so suppose you like to
> set up / , /usr, /home, /swap, and you want another Linux with its own
> /, and /usr, making a total of six partitions?
>
> Thanks,
> Matthew
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

Steve,

This is a symptom that the X server has crashed. There might be some
clues in some logs you can dig out. On Red Hat and Fedora, you can take
a look at the /var/log/Xorg.o.log.old (not /var/log/Xorg.0.log as that's
the log for the current X session not the previous one, the one that
crashed.) Sometimes you can get some clue from ~/.xsession-errors if
you can find one (in the use's home directory who was logging on the
console when X server crashed. If none of these helped, you can try to
run amarok using 'strace -fvo /tmp/amarok.log amarok ...' to see if you
can find some clue from strace's output.

Good luck!

Shing-Shong

Steve Beckley wrote:
> I'm running Linux Mint at the moment and loving it. The one problem
> that I can't fix is that when I try to start Amarok, it logs me out.
> I get the initial Amarok load screen and then I get a black screen,
> then a black screen with lines of code, then the GNOME login screen.
> Synaptic says my installed version is 2:1.4.9.1-0ubuntu3+medibuntu1.
> I can't really seem to find any information about it on either Ubuntu
> or Linux Mint forums. Any help would be greatly appreciated.
>
> -Steve B.
> ------------------------------------------------------------------------
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] Amarok

On Mon, Sep 01, 2008 at 02:40:44PM -0400, Matthew Patenaude wrote:
> I like deb systems as well. I have used others: Suse, Fedora, but ever since I
> started using Ubuntu and other deb based derivs, I have been reluctant to go
> back.
>
> Question: If you install another Linux on your hard drive, how do you make
> enough partitions? /home obviously can be used by whatever distro is on there,
> so you don't need more that one /home, but are you still limited by the <4
> primary partitions? Do you have to set up logical partitions to manage the
> different Linuxes you have installed? I prefer to have several primary
> partitions, but have never needed more than /, /home, and /swap. That's three
> already, so suppose you like to set up / , /usr, /home, /swap, and you want
> another Linux with its own /, and /usr, making a total of six partitions?

If you like DEB-based systems, and are a GNOME person, you may really
like Foresight Linux. http://www.foresightlinux.com/ Foresight uses
package management that actually has more features than DEB-based
package managers. (This is in sharp contrast to RPM-based package
management which is barely better than Windows package management, and
much more crude than DEB-based package management.)

If I were going to be playing with multiple Linux partitions I'd go for
a layout more like:

/boot (shared by all distros)
/home (shared by all distros)
swap (shared by all distros)
extended
Distribution A (/ or /media/distA)
Distribution B (/ or /media/distB)
...

If you're trying out multiple distributions I do not recommend
partitions finer grained than this. While there is a Linux file system
standard, an unfortunate number of distributions ignore part or all of
it. (Here's an example of how thoroughly people ignore the filesystem
standard. The /usr/local tree should mirror /usr. It should never have
application trees, so /usr/local/apache and /usr/local/mysql violate the
Linux file system standard. To conform to the standard they should be
located off of /opt or split up.)

You need to get off of the x86 BIOS before you can have more than 4
primary partitions. The bootable partition must be one of the primary
partitions, however in the case of Linux all you need is /boot as a
primary partition. (Even that isn't always an issue with the right
boot manager, as long as the boot manager's partition is a primary
partition.)

There are Intel-based systems which use EFI instead of the BIOS, and
they have a different partitioning scheme. (The most common consumer
systems using EFI right now would probably be Intel Macs.)

Personally, I'm a big fan of Logical Volume Management (LVM). It allows
you to dynamically resize partitions (including shrinking one partition
to create a new one). It does need the partition to be *unmounted* to
do the work, which means either a bootable CD, a single-user mode that
allows the partitions you want to change to be unmounted, or simply a
small Linux installation on an alternate partition. However, I doubt
LVM will really cooperate with multiple distributions. (There's an
expectation that you can backup the LVM configuration in /etc, and you
can't do that if you have /etc available on multiple partitions.)

One important note, if using a multiple physical partitioning scheme (as
opposed to logical volume management) you have hard operating system
limits for the numbers of partitions available. More than that, these
limits have traditionally been larger for ATA (hd[a-f]) drives than they
have been for SCSI (sd[a-h]) drives. However, newer Linux kernels have
SATA devices using the SCSI infrastructure, causing SATA devices to no
longer use the traditional 'hd' prefix, and changing the limits on the
number of partitions.

There are no limits to the number of partitions available for Logical
Volume Management. If you're going to use a fine-grained partitioning
scheme, you will want to go with LVM.

Personally, you may be in for trouble even sharing a /home between
distributions. The problem is that differing distributions can use
radically different versions of a program, and that program can
"upgrade" your configuration file for you, this would be fine if you
were sticking with one version, but when you go back to the other
distribution things may not work correctly.

Also, since you'll be sharing /home, make sure that they all agree on
your user-id. Some distributions start user-ids at 500, while others
start with user-id 1000. Even then, some distributions have the initial
user-id be 1000, while others have the initial user-id be 1001.

Personally, when I've been exploring alternate distributions, I tend to
just reuse a single partitioning scheme. I keep the /home distribution,
and wipe everything else. My important configuration files don't change
and anything that does complain (such as that god-awful gconf crap) just
gets wiped if there are any problems.

Many, if not most distributions, can also be tested using virtual
machines. VMs are a perfect way to test distributions. You can test
an arbitary number, compare them side-by-side, and decide on which to
explore on real hardware.

Cheers,
Steven Black


_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug