Linux Linux not detecting new hard disks

Discussion in 'Software' started by dark_avenger, 29 Mar 2010.

  1. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    Recently bought two Seagate 2TB drives and have them connected to my Gentoo server via a 2xSATA -> IDE converter.

    BIOS can see both drives and reports the size correctly however when i boot to Gentoo there is no /dev/hda or /dev/hdb

    The actual install is on a mirrored 1.5TB array which appears as /dev/sda.

    I'm thinking maybe i don't have the correct IDE modules or something but that is a bit out of my linux knowledge.

    Any ideas?
     
  2. knuck

    knuck Hate your face

    Joined:
    25 Jan 2002
    Posts:
    7,671
    Likes Received:
    310
    what does fdisk -l say ?
     
  3. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    It shows the 2 1.5TB sata hdd's
    /dev/sda and /dev/sdb which are mapped from /dev/sg0 and /dev/sg1

    there a hardware mirror using the onboard RAID controller.

    at work atm so i can't get the actual output
     
  4. Kumo

    Kumo What's a Dremel?

    Joined:
    18 Oct 2004
    Posts:
    698
    Likes Received:
    0
    You could run a live distro to check if it detects all HDDs.

    I don't know how gentoo works but maybe you have to add some lines on fstab file (or gentoo equivalent) to indicate the system the mount point of those HDDs.
     
  5. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    here's what fdisk -l outputs
    /dev/sda and /dev/sdb are the mirrored 1.5TB drives.


    Code:
    Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
    255 heads, 63 sectors/track, 182401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xc121e16a
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          12       96358+  83  Linux
    /dev/sda2              13         135      987997+  82  Linux swap / Solaris
    /dev/sda3             136        6215    48837600   83  Linux
    /dev/sda4            6216      182401  1415214045   83  Linux
    
    Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
    255 heads, 63 sectors/track, 182401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/sdb doesn't contain a valid partition table
    There are no hd devices found
    Code:
    ls /dev/hd*
    ls: cannot access /dev/hd*: No such file or directory
    
    Fstab reads

    Code:
    /dev/sda1               /boot           ext2            noauto,noatime  1 2
    /dev/sda3               /               ext3            noatime         0 1
    /dev/sda2               none            swap            sw              0 0
    
     
  6. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    Sata drives were/are historically slung in with scsi that's why you don't have any /dev/hd.

    sda has been correctly set up, though sda4 isn't mounted any where you are probably accessing sda3 with out relising it since its mounted at root.

    sdb needs to be partitioned fsdisk can do it but you might be more comfortable with a gui based portioning program. Once you've done that you can adjust fstab to mount the disk where you like ditto sda4.


    :read: :wallbash:

    sorry mate, misread the op. Do the adaptors show under a live cd? or windows?

    Did you compile the kernel your self? You may have missed out the ide modules in which case they wont show, a precompiled kernel would normally include them. But its better to find out if the adaptors work properly before running of and recompiling your kernel.
     
  7. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    The adapter is transperant, both drives appear in bios and show the correct size.

    Is there a way i can see if the IDE modules are loaded?
     
  8. steveo_mcg

    steveo_mcg What's a Dremel?

    Joined:
    26 May 2005
    Posts:
    5,841
    Likes Received:
    80
    run lsmod and post the result, i'm not sure what the module is called of the top of my head, but i or someone else should recognise it. That will tell us if the module is loaded, if that fails we'll need to try and work out what its called and run insmod to load it, if that fails its probably not compiled in.
     
  9. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    lsmod just returns the headings

    Code:
    Module                  Size  Used by
    
    i'm guessing this means my install might be broken?
     
  10. aradreth

    aradreth What's a Dremel?

    Joined:
    20 Aug 2009
    Posts:
    390
    Likes Received:
    61
    Code:
    zcat /proc/config.gz
    Post the out put somewhere like pastebin though as there is a lot of it.
     
  11. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    Code:
    speaker / # zcat /proc/config.gz
    gzip: /proc/config.gz: No such file or directory
    
    i'm going to take a guess and say that's a bad sign...
     
  12. aradreth

    aradreth What's a Dremel?

    Joined:
    20 Aug 2009
    Posts:
    390
    Likes Received:
    61
    Nah it just means you don't have ikconfig enabled. I assume this is a custom kernel do you still have the .config by any chance?
     
  13. Glider

    Glider /dev/null

    Joined:
    2 Aug 2005
    Posts:
    4,173
    Likes Received:
    21
    You probably didn't include your IDE drivers in your kernel... add them in and reboot with that kernel...
     
  14. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    i'm not sure on how to compile a custom kernal, it might be possible that i modified it while it was installing?

    is there a good guide you guys know of to recompile the kernal on Gentoo so i can add in the drivers?
     
  15. aradreth

    aradreth What's a Dremel?

    Joined:
    20 Aug 2009
    Posts:
    390
    Likes Received:
    61
    I've not used gentoo in years but the handbook was brilliant last time I tried. I assume you did the manual configuration rather then the genkernel (or else you'd have ikconfig enabled) and didn't include the IDE modules which is why you can't see the hard disks.
     
  16. dark_avenger

    dark_avenger Minimodder

    Joined:
    9 Jul 2008
    Posts:
    1,117
    Likes Received:
    47
    I did some reading and have used make menuconfig to create the new kernal with IDE and RAID support.

    Problem now is when i go to mount /boot i get a message
    "mount: unknown filesystem type 'ext2'"
    from what i understand this means my kernal is missing ext2 support and needs to be recompiled from scratch.

    How do i go about doing this?
     
  17. aradreth

    aradreth What's a Dremel?

    Joined:
    20 Aug 2009
    Posts:
    390
    Likes Received:
    61
    It exactly the same steps as you did last time. I assume that you can't boot so you'll need to boot a liveCD to do it. May I suggest that you boot the gentoo liveCD and use genkernel to make a backup kernel for when you are playing around with the custom kernel that way you can always boot.

    But anyway to recover the system boot a liveCD mount the file systems under /mnt/chroot/ or similar.

    Code:
    mkdir -p /mnt/chroot/
    mount $rootfs /mnt/chroot/
    mount $bootfs /mnt/chroot/boot
    ... etc
    zcat /proc/config.gz > /mnt/chroot/tmp/config
    chroot /mnt/chroot/
    emerge genkernel
    genkernel --no-menuconfig --kernel-config=/tmp/config --install all
    
    I'd use the config file from /mnt/chroot/tmp/ to make a generic kernel for when things go fubar you can still boot without a liveCD then if you want you can also make your custom kernel.

    edit: I've not used gentoo (and therefore genkernel/emerge) in a long time so I'd check the command though I think it is right
     

Share This Page