grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: device syntax again


From: Hollis Blanchard
Subject: Re: device syntax again
Date: Tue, 18 Jan 2005 19:59:00 -0600

On Jan 18, 2005, at 9:36 AM, Yoshinori K. Okuji wrote:

On Tuesday 18 January 2005 15:52, Hollis Blanchard wrote:
For now let's not talk about where aliases are created. What about my
original question: grub has just booted, and when it asks what device
it was booted from (the /chosen/bootpath property) it gets this:
        /address@hidden,0/address@hidden,1/address@hidden/address@hidden,0
(that is the real "disk" device on Vincent's UltraSparc). The next
thing we want to do is load a config file from the same device. What
value should we put into "prefix"?

This has already been discussed. Marco suggested to have a "boot drive"
for this.

He mentioned that to me on IRC today, but I had not heard the idea before. I believe that will work fine.

Is the only reason you're suggesting this "alias" scheme is to keep
the PC-style device syntax?

Don't call it "PC-style". This is not accurate. It is GRUB-style as _we_
define the syntax.

I assumed it was written solely with PCs in mind, as that is where GRUB Legacy is used. Obviously, this syntax works perfectly well for PCs, but I'm trying to explain that it will not work very well for larger systems. That is fine too! I don't think GRUB was originally designed with such systems in mind, so of course some changes may be needed if we wish to support them.

2) frustrating UI requirements ("no no, you have to run 'alias'
first"), and

GRUB can automatically create aliases.

Here is what I see happening:
        > boot /address@hidden,0/<tab><tab><tab>
        >
        > boot 
/address@hidden,0/address@hidden,1/address@hidden/address@hidden,0
        No such device
        > alias thatdisk 
/address@hidden,0/address@hidden,1/address@hidden/address@hidden,0
        > boot thatdisk

I don't think GRUB can automatically create aliases in this case.

3) require users to learn yet another syntax.

We have already discussed this, and I got no objection to my opinion at
that time. I'm surprised that you refrain this.

I agreed at the time, but the more I thought about it I changed my mind.

Don't assume that ordinary users know Open Firmware or EFI. Basically,
they don't know anything quite technical.

It is true that many home users do not understand technical things. It is also true that advanced users (e.g. users with complex hardware) must be allowed to do advanced things without being forced into a too-simple model...

So GRUB should provide an unique syntax rule so that users do not have to learn
new things when they get new architectures.

Users must be expected to learn how to boot their new architectures... In the case of a small Open Firmware system, this need not be any more complicated than an x86 PC. In the case of a large Open Firmware system, though, users will need to become at least slightly familiar with their firmware. I speak from experience here. :)

And, have you ever asked any ordinary person to
type /address@hidden,0/address@hidden,1/address@hidden/address@hidden,0 rather 
than hd0? I'm sure that
she will be scared. In addition, this would make remote assistance very
hard. It should be easy to imagine how difficult it is to pronounce the
long and mysterios string by phone.

I agree, phone support would be difficult, but also very unlikely. :)

An Open Firmware devalias (e.g. "disk" = "/address@hidden,0/address@hidden,1/address@hidden/address@hidden,0") is a convenience. It is not intended to entirely replace the device tree. Macintosh users will likely find that they already have devaliases for the internal disks, so you will not have to tell your aunt about the device tree over the phone. However, pSeries and Sparc systems may have many more disks than devaliases, and these users need to be able to boot easily as well.

As far as I know, most people use /dev/hda instead
of /dev/ide/host0/bus0/target0/lun0/disc on Linux, whenever possible.
This is simply because shorter is easier. Ordinary people think "the
first IDE disk" instead of "the hard disk attached to the master of the
first IDE bus of the main controller". Don't you agree?

This is a key point.

Even on small systems, the difficulty in naming is easy to see. I have one SCSI disk and one ATA disk. Which is "the first"? On a PC I guess you would say "it depends on the BIOS and SCSI BIOS, but the ATA disk is probably first". With Open Firmware, the question is unambiguously answered.

The systems I use may have dozens of PCI buses. Each bus may contain many PCI SCSI adapters, and each adapter may have many disks attached. How would you number these devices? (The bus connections do not match the physical positions, so you cannot say "the top left disk is #0, the next to the right, is #1, etc".)

Open Firmware answers this question too. There are tools that can map a device path to a physical location in the chassis, or blink a disk light from just a device path. In Linux (and AIX) we already have a namespace problem: "I have just installed my system, and now I want to boot from /dev/sda. What device name should I use in Open Firmware?" Would you add yet a third namespace? In Open Firmware use "disk"; in GRUB use "hd0"; in Linux use "/dev/sda"?




Most of us have only had to deal with small computers, and I agree that things should be optimized to make life as easy as possible for these users. However, please also keep large systems in mind. Try to imagine yourself in front of a small rackmount system with only 12 hotplug disks wondering which one is /dev/sda under Linux. Then imagine you need to hotplug the correct disk into another system, and after telling firmware to boot from the new disk, GRUB and Linux "just work". It is hard to imagine, but I hope we can agree that such users have different needs from our aunts sitting at their PCs at home. Thanks!

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]