2004-03-20 12:58:18

by Pascal Maillard

[permalink] [raw]
Subject: independence from ide master/slave

Hi list,

recently, I had changed my IDE disk from primary master to slave. I've got
SUSE, Debian and Windows XP installed on it. I was ashamed to see that
Windows loaded immediately, but the Linuxes didn't, because all of the
filesystems were thought to be on /dev/hda. So I asked myself if there should
not be device files that point to the _current_ hard disk (which should be
defined at startup by the kernel) and its partitions. This way, it wouldn't
matter which IDE channel a disk is connected to. What do you mean about this?

Please cc me!

c?,
Pascal Maillard


2004-03-20 13:31:16

by Andre Tomt

[permalink] [raw]
Subject: Re: independence from ide master/slave

Pascal Maillard wrote:
> Hi list,
>
> recently, I had changed my IDE disk from primary master to slave. I've got
> SUSE, Debian and Windows XP installed on it. I was ashamed to see that
> Windows loaded immediately, but the Linuxes didn't, because all of the
> filesystems were thought to be on /dev/hda. So I asked myself if there should
> not be device files that point to the _current_ hard disk (which should be
> defined at startup by the kernel) and its partitions. This way, it wouldn't
> matter which IDE channel a disk is connected to. What do you mean about this?

The kernel already supports identification of partitions through user
defined labels or UUIDs. If I remember correctly, RedHat uses/used them
per default.

With other distributions, some tweaking may be needed for the root fs.

man 5 fstab

2004-03-22 19:44:47

by Pascal Maillard

[permalink] [raw]
Subject: Re: independence from ide master/slave

Hi,

thanks for your answers. I didn't know of UUIDs and user defined labels and
you're right, it is much more flexible. But, according to man fstab, it is
currently only supported by ext2 and xfs. What about the others?

One last note about the term "current hd" I used: I did not define it as the
hd where the root fs is located, but I said that it should be defined by the
kernel at startup. That is, it could be any disk. The default could have
been, for example, the root fs.

> perhaps you are thinking of the rather
> specialized case where a system has only one disk, and the root partition
> is on it.
Do you really think, that it is such a specialized case? I know that Linux is
used much more on servers than on desktop computers, but I suppose we all
hope that Linux' market share on desktops can grow further.

c?,
Pascal Maillard

Mark Hahn wrote:
> > filesystems were thought to be on /dev/hda. So I asked myself if there
> > should not be device files that point to the _current_ hard disk (which
> > should be defined at startup by the kernel) and its partitions.
>
> "current hd" has no meaning. perhaps you are thinking of the rather
> specialized case where a system has only one disk, and the root partition
> is on it. if so, you really mean "/dev/root" (which is a notional device
> that the kernel uses in /proc/mounts for instance - I don't know whether
> it has any assigned major/minor number that would let it appear in /dev.)
>
> note that RedHat has used a relatively simple mechanism called
> mount-by-label which permits the kind of cable/controller independence that
> you're asking for. it's vastly more logical than your /dev/root approach,
> and extends beyond a single disk.
>
> > This way, it wouldn't
> > matter which IDE channel a disk is connected to. What do you mean about
> > this?
>
> mount by label.