Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK, I will leave that as you wish. However, I run six distros, one machine with two SATA drives, two IDE drives and they are all identified as sd(X) with the fdisk -l command in all six distros running the 2.6 kernel. This is also true for removable pen drives when inserted. But, if you see it differently, that's OK with me.
In Grub configuration hd0 means the primary harddisk and hd1 secondary; that naming is different on your Linux operating system itself, because there devices are (at least as of now, unless you've made your own changes) called hdXN, where X is a letter and N a number. In the past IDE disks used to be hda(primary)/hdb(secondary), but in newer operating systems the naming is "unified" a little and so even IDE disks are now called sda/sdb and so on, just like the other harddisks. USB devices are called that too, to bring up a little mixing..but I think it still works like this:
- your primary harddisk is sda
- your secondary harddisk (if any) is sdb
- your other devices are sdX, where X is some other letter
For example my harddisk is sda, it's partitions sda1-sda6, and if I plug a USB stick in, it's sdf (partition sdf1, it only has one partition). And I don't have any hdX devices.
OK, I will leave that as you wish. However, I run six distros, one machine with two SATA drives, two IDE drives and they are all identified as sd(X) with the fdisk -l command in all six distros running the 2.6 kernel. This is also true for removable pen drives when inserted. But, if you see it differently, that's OK with me.
In Grub configuration hd0 means the primary harddisk and hd1 secondary; that naming is different on your Linux operating system itself, because there devices are (at least as of now, unless you've made your own changes) called hdXN, where X is a letter and N a number. In the past IDE disks used to be hda(primary)/hdb(secondary), but in newer operating systems the naming is "unified" a little and so even IDE disks are now called sda/sdb and so on, just like the other harddisks. USB devices are called that too, to bring up a little mixing..but I think it still works like this:
frenchn00b
would be great that grub could have a --list to tell us what are those disks and partitions ...
tricky
grub > list or ls disks could be a great stuffs for newbies that fight
grub-installer --root-directory isnt working so great better by far: root (hd0,0 ) & setup (hd0)
Um what does it matter to Grub what the setup is? All Grub needs to know is where Grub is found. You can ask Grub, at bootup or from a terminal window.
At the boot menu press c then ask, the command is find /boot/grub/menu.lst and Grub will tell you what drive Grub is on.
Or you can open a terminal log in as root then type grub this will start the grub command line, then give the command find /boot/grub/menu.lst
Or you can ask Grub the partitioning scheme with the command geometry (hd0)
As for a list of all drives fdisk -l <- what linux sees
Or try dmesg
And yes I believe as of kernel-2.6.20 all devices are seen as sd- except floppy drives.
Last edited by mrrangerman; 05-04-2008 at 05:55 AM.
Um what does it matter to Grub what the setup is? All Grub needs to know is where Grub is found. You can ask Grub, at bootup or from a terminal window.
At the boot menu press c then ask, the command is find /boot/grub/menu.lst and Grub will tell you what drive Grub is on.
Or you can open a terminal log in as root then type grub this will start the grub command line, then give the command find /boot/grub/menu.lst
Or you can ask Grub the partitioning scheme with the command geometry (hd0)
As for a list of all drives fdisk -l <- what linux sees
Or try dmesg
And yes I believe as of kernel-2.6.20 all devices are seen as sd- except floppy drives.
Thank you
Sounds good that [B]geometry (hd0)
Even better, with the knoppix installation, grub had the (hd0) to fd0
That's kind of amazing thing, with 3 harddrives.
Grub's (legacy 0.97) hd0, hd1, hd2 have little to do with /dev/hd0 ,1 2 etc. or, as they now are /dev/sd0, 1, 2 etc.
If you have an older machine with a Zip drive the names can change under grub. On my machine the first IDE drive is hd0, the fakeraid card is hd1, unless the zip drive is active (with a cassette in it) on the second IDE channel, in which case the zip is hd1 and the fakeraid card is hd2. Obviously a grub menu booting off anything but hd0 is affected depending on whether or not there's a zip disk in the drive. The BIOS boot order settings don't change these things.
However, everybody comes up consistently under slackware, where the first IDE is /dev/hda, the zip is /dev/hdb (regardless of whether the drive has a cassette) and the fake raid card comes up /dev/hde and /dev/hdg.
Grub's device.map file may not list the devices the same if it is run from a floppy (native installation) or from the harddisk. So you can ask grub what it thinks the geometry is, but it may change its mind.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.