Re: Naming harddisks (Linux)
- From: Douglas Mayne <doug@xxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Aug 2007 10:53:28 -0600
On Tue, 21 Aug 2007 11:32:25 +0200, Ravishankar S wrote:
Hello,You may need just a bit more background knowledge. All of the remaining
I would like to get some clarification on linux's naming convention for
haddisks. What I knew was:
/dev/hda ../dev/hd(x) for fixed hard disks interfaced by parallel ATA
/dev/sda.. /dev/sda(x) for fixed hard disks interfaced by either serial ATA
or SCSI ATA. But I also see that for an USB drive it uses /dev/sd(x) as the
On my VAIO laptop with Ubuntu live dvd,
Harddisk is being recongnized as /dev/sda and USB drive as /dev/sdb. Does
this mean I have a SCSI hard disk instead of normal ATA harddisk ? In Vista
it shows normal ATA disk..
But..GRUB does not recognize the hard disk at all. It simply recognized
(hd0) as the usb drive. Why is that happenning.
Does GRUB recognize SCSI drives ?
If I install GRUB during installing, will it work or will I not be able to
discussion requires some basic understanding of the hardware environment
in the PC world and the rules for disk partitioning. This post explains
the rules for disk partitioning:
Back to your problem...
The naming convention you are seeing with respect to SATA and USB is
normal. The first step in understanding the boot process is to
understand which environment is active at that moment, and which naming
convention is used by that respective environment. There can be various
_separate_ working environments as the bootstrap proceeds.
1. BIOS setup.
3. Linux (kernel -> initrd -> root filesystem)
When any of these environments are active, then you may need to give
input using the naming convention that it expects. For example, you
might need to specify which drive to boot first from within the
environment of BIOS setup. All three environments (above) require proper
input to proceed to the point where your system is "fully operational."
I'll define "fully operational" as when your system ends bootstrap and
offers a login prompt.
Even more background...
1. The BIOS
The BIOS uses its own naming convention for drives and allows for the boot
priority to be adjusted. These programs vary by manufacturer, but are
mostly similar on modern hardware. Originally, the BIOS could be set to
boot from a floppy, IDE drive, or cdrom. Now, more options are
available- including the ability to boot from a USB disk. Some older
boards will only boot from USB after updating the BIOS to the latest
version, and some older boards cannot be set to boot from USB at all.
Caveat: I don't have (or want) a Sony Vaio. I can't advise you how to set
your BIOS to boot the way you intend.
2. The Bootloader
Grub is well documented. Spend some time reading the manual- it is time
which can pay dividends later. I'll give this quick overview of Grub here:
The bootloader's job is to load the OSs kernel. Grub is one bootloader.
I have found it to be a very flexible and capable bootloader. I like to
think of Grub as a self-contained mini-OS, whose job is to load other OSs.
Grub uses its own nomenclature. Grub's nomenclature is unique unto itself.
Grub counts drives beginning at zero. The drives it counts first are most
likely in the same order as set by the BIOS (the boot order). There
can still be confusion about how the BIOS presents drives to the
loader. Luckily, grub includes the command, "geometry," which is
often useful in clarifying which drives are found. The "geometry" command
is one of several available from within the grub boot environment. This
boot environment is known as the grub shell. This shell is where grub
shows its flexibility. The full set of grub commands can be entered here,
including manually specifying the location of your kernel, etc. Caution is
in odered, though, whenever using it. The power is in your hands, and you
could damage your system with a misplaced command. Be sure of your
intended target when installing grub, for example.
3. The kernel
The linux kernel's first job is to identify all hardware and prepare to
use the root filesystem, and then finally transfer control to init.
3.a Kernel modules
The linux kernel is usually compiled as a modular kernel. The
kernel modules are "drivers" for various hardware components, filesystems,
and kernel operations. The idea is to save memory by not loading drivers
for things that won't be used on a specific computer. The common example
for why modules are used is that there are 20 different manufacturers
of SCSI adapters. Each requires specific hardware control for the chipset
on the adapter. Only the modules for boards which are present must
be loaded. The other drivers which are not present can be omitted,
saving memory. The USB situation is similar; there are various chipset
manufacturers, and chipsets for USB 1.1, USB 2.0, etc. Modules are used
for software concepts, too. For example, advanced filesystems are usually
compiled as modules: xfs, reiserfs, jfs, etc.
3.b. The Catch 22 at boot
Yossarian: That's some catch, that Catch 22.
Doc: It's the best there is.
In linux, the kernel may need various kernel modules to boot completely.
In this case, I think you'll need a module to program your USB chipset
which controls your USB disks. Without the hardware driver, the kernel's
boot progress is blocked. This is a classic Catch 22: You can load the
module as soon as the OS is ready. Your OS wil be ready after the module
is loaded. Luckily, there is a way around this circularity: an initrd.
An initrd's job is to make final preparations to begin using the root
filesystem. The initrd gets around the Catch 22 because it is loaded into
memory by the bootloader, not the kernel. The kernel only needs
instruction on how to start using the initrd, if it is present. The grub
loader can load the initrd into memory.
3.c. Anatomy of an initrd
Unfortunately, creating an initrd is distribution dependant. Perhaps,
Ubuntu's setup process created a working initrd for you when you ran setup.
As I said in an earlier response, your intended setup target is "just
outside the norm." It could be that Ubuntu's setup would lead you to a
bootable system, if you were able to specify exactly what you want. It is
a difficult problem- both for the user and for the setup program.
Unfortunately, the resposibility for fixing setup errors (big and small)
falls back onto the user if something goes wrong. I am not sure how far
your setup proceeded, and whether or not it is worth trying to salvage
that setup. That is for you to gauge.
I think that this is one area where the learning curve goes from very flat
to quite steep in a hurry. I don't know where you are in the spectrum of
Linux users, but in general, people who are anxious to try GNU/Linux,
may start by allocating resources which they think will be adequate for
the trial. (And consider, that this same problem (AFAIK), setting up
Windows to boot directly from USB might be a difficult trick, too. Be sure
to have the so-called "F6" boot floppies handy.) I know that Linux can do
what you are asking- I've done it- but everything must be aligned to work.
Here is an explanation where I describe setting up booting from a USB
Here is one final thing to consider. Do you have a spare system which you
could sacrifice as a learning platform? If so, you could practice running
the Ubuntu setup program on that computer, and you'd learn what to expect
in general, without the complication of USB.
- Re: Naming harddisks (Linux)
- From: Ravishankar S
- Re: Naming harddisks (Linux)
- Naming harddisks (Linux)
- From: Ravishankar S
- Naming harddisks (Linux)
- Prev by Date: updating autimatically fedora with new patches
- Next by Date: Re: updating autimatically fedora with new patches
- Previous by thread: Naming harddisks (Linux)
- Next by thread: Re: Naming harddisks (Linux)