LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   scsi disk but grub uses hda (https://www.linuxquestions.org/questions/linux-newbie-8/scsi-disk-but-grub-uses-hda-848377/)

ilvista 12-04-2010 03:50 PM

scsi disk but grub uses hda
 
hi
i've a scsi hard disk(sda)

Code:

[root@benchabane benchabane]# parted /dev/sda print
Model: ATA Hitachi HTS54161 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system  Flags
 1      32.3kB  45.7GB  45.7GB  primary  ntfs
 2      45.7GB  46.2GB  524MB  primary  ext4        boot
 3      46.2GB  120GB  73.8GB  primary              lvm

[root@benchabane benchabane]#

Code:

[benchabane@benchabane ~]$ su
Password:
[root@benchabane benchabane]# fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfaafb49d

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              63    89257202    44628570    7  HPFS/NTFS
/dev/sda2  *    89257984    90281983      512000  83  Linux
/dev/sda3        90281984  234440703    72079360  8e  Linux LVM

BUT grub is using hda nomination in the grub.conf

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_benchabane-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.6-45.fc14.i686)
        root (hd0,1)
        kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/vg_benchabane-lv_root rd_LVM_LV=vg_benchabane/lv_root rd_LVM_LV=vg_benchabane/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=fr rhgb quiet
        initrd /initramfs-2.6.35.6-45.fc14.i686.img
title Morad WindowS
        rootnoverify (hd0,0)
        chainloader +1


I just dont understand why?cause i was trying to add windows to the grub bootloader ,i did it anyway but i don't get this point?
thx in advance

EDDY1 12-04-2010 03:55 PM

open terminal
sudo os-prober
sudo update-grub
will detect wins

gd2shoe 12-04-2010 04:04 PM

(hd0) is not /dev/hda. It is the first hard drive detected by your BIOS. In your case, it's a scsi drive.

abi0909 12-04-2010 04:33 PM

(hd0,0) does not mean to be the HDA disk. It denotes the address of the first harddrive.

yancek 12-04-2010 04:35 PM

Grub does not use letter to identify drives or partitions. So sda can be (hd0)in Grub, hda can also be (hd0) as indicated above by gd2shoe, it is the first drive detected. The output from commands like fdisk showing sda or hda have little to do with Grub notation. Grub refers to drives with (hd) and count physical drives from zero, partitions from zero in Grub Legacy and partitions from one in Grub2. The only letter you will see in this type of Grub entry will be the (hd...).

yancek 12-04-2010 04:36 PM

Grub does not use letters to identify drives or partitions it uses numbers. So sda can be (hd0)in Grub, hda can also be (hd0) as indicated above by gd2shoe, it is the first drive detected. The output from commands like fdisk showing sda or hda will not necessarily correspond to Grub notation. Grub refers to drives with (hd) and counts physical drives from zero, partitions from zero in Grub Legacy and partitions from one in Grub2. The only letters you will see in this type of Grub entry will be the (hd...).

ilvista 12-05-2010 04:47 AM

Yes it make sense to me now.sda1 is for the grub (hd0,0)wich contain in my case the windows boot, and sda2 is (hd0,1) with contain fedora boot.

by the way EDDY1 ,i think os-prober concerns only Debian,it's one of his installer's
features.http://joey.kitenet.net/code/os-prober/

thx a lot you guys.

ericson007 12-05-2010 01:43 PM

Also an interesting note, SATA, SCSI and USB drives are all recognised as sda, sdb etc while other types are hda, hdb etc

EDDY1 12-05-2010 03:56 PM

It's in ubuntu also and any packages that use grub2 as long as grub2(grub-pc) is installed.

ilvista 12-06-2010 06:36 AM

yeah sure EDDY1,grub-pc does do that,but it exists only in DEB format.i'm trying to convert it to RPM using Alien.

thx for the tip


All times are GMT -5. The time now is 12:00 AM.