# Mounting Errors IDE

## knurp

I have tried to mount a IDE harddrive.

I have created the folders where I want the driive to be mounted on

/mnt/hd

# ls /dev/hd

hda   hda1  hda2  hda3  hdc   hde   hde1

when i type just mount there  is no hde

 # mount

/dev/hda3 on / type ext3 (rw,noatime)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

udev on /dev type tmpfs (rw,nosuid)

devpts on /dev/pts type devpts (rw)

/dev/hda1 on /boot type ext2 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,devmode=0664,devgid=85)

/dev/hdc on /mnt/cdrom type iso9660 (ro)

I made new partions with fdisk

tried to run mke2fs -j /dev/hde1

# mke2fs -j /dev/hde1

mke2fs 1.38 (30-Jun-2005)

/dev/hde1 is apparently in use by the system; will not make a filesystem here!

I have had this disk in my other gentoo mashine and there it worked just fine 

Question then How to make mke2fs -j  work on this drive ??

How to mount this drive ??

# mount /dev/hde1 /mnt/hd/

mount: /dev/hde1 already mounted or /mnt/hd/ busy

I runned this comand before fdisk and mke2fs

the folder is busy?? I have just created it

I find it hard to belive that the drive is already mounted.

----------

## NeddySeagoon

knurp,

Try 

```
mount -t auto -o ro /dev/hde1 /mnt/hd
```

This command asks mount to try all the file systems it knows and if it finds one that works, to mount the partition read only.

Its really asking mount to guess what the file system is.  The read only mount stops you from trashing it when mount gets it wrong.

----------

## knurp

# mount -t auto -o ro /dev/hde1 /mnt/hd

mount: /dev/hde1 already mounted or /mnt/hd busy

Hugin mike #

does not work  :Sad: 

but thanx

----------

## NeddySeagoon

knurp, 

Boot with the liveCD and try  

```
mount -t auto -o ro /dev/hde1 /mnt/gentoo
```

I suspect the problem is that the file system on /dev/hde1 is not supported in your kernel.

What was the drive used for ?

What is on the partition ?

----------

## knurp

I know that the filesystem is ext3. And it has worked on my older gentoo mashine.

I used the disk for homedirs and photos not this disc though.

I have tried to run fdisk on it, that apears to work. I dont get any errors when i print w

But when I try to mke2fs -j  it says that it's not possible.

read the first note.

I find this problem quite disturbing 

Thanx for your help I shall try the live CD later. Dont know where I ve placed it  :Smile: 

----------

## NeddySeagoon

knurp,

Lets try a different approach.

That its /dev/hde means its not attached to the normal motherboard IDE interfaces.

Do you have a IDE disk interface card in a PCI slot or is it really a SATA drive pretending to be IDE ?

If the drive is really SATA, you should use the kernel SATA driver to make it appear as a SCSI drive.

----------

## knurp

I have a real IDE harddrive ond i use a promise card ultra 100

but its not possible to mount a disc that is on the motherboard either.

should I recompile the kernel ?

----------

## NeddySeagoon

knurp,

Your /dev/hda1 and /dev/hda3 are shown in your mount output, which confirms that you have ext2 and ext3 filesystems available. Therefore partitions from your main HDD are mounted.

Also your CDROM at /dev/hdc is shown mounted too, that all shows that the mount command works and some filesystems are available.

Please post the output of lspci (emerge pciutils) and we will check out your kernel settings

The output of 

```
hdparm -iI /dev/hde
```

may also be useful

----------

## knurp

Hugin mike # lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev c4)

00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]

00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)

00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)

00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)

00:07.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)

00:07.4 SMBus: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)

00:07.6 Communication controller: VIA Technologies, Inc. AC'97 Modem Controller (rev 20)

00:0e.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 04)

00:10.0 Mass storage controller: Promise Technology, Inc. PDC20268 (Ultra100 TX2) (rev 02)

00:11.0 Ethernet controller: Accton Technology Corporation SMC2-1211TX (rev 10)

01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1)

Hugin mike # hdparm -iI /dev/hde

/dev/hde:

 Model=ST3160023A, FwRev=3.06, SerialNo=3JS0HRED

 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }

 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4

 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=16

 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455

 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}

 PIO modes:  pio0 pio1 pio2 pio3 pio4

 DMA modes:  mdma0 mdma1 mdma2

 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

 AdvancedPM=no WriteCache=enabled

 Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2:  ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6

 * signifies the current active mode

ATA device, with non-removable media

        Model Number:       ST3160023A

        Serial Number:      3JS0HRED

        Firmware Revision:  3.06

Standards:

        Used: ATA/ATAPI-6 T13 1410D revision 2

        Supported: 6 5 4 3

Configuration:

        Logical         max     current

        cylinders       16383   65535

        heads           16      1

        sectors/track   63      63

        --

        CHS current addressable sectors:    4128705

        LBA    user addressable sectors:  268435455

        LBA48  user addressable sectors:  312581808

        device size with M = 1024*1024:      152627 MBytes

        device size with M = 1000*1000:      160041 MBytes (160 GB)

Capabilities:

        LBA, IORDY(can be disabled)

        bytes avail on r/w long: 4      Queue depth: 1

        Standby timer values: spec'd by Standard

        R/W multiple sector transfer: Max = 16  Current = 16

        Recommended acoustic management value: 128, current value: 0

        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5

             Cycle time: min=120ns recommended=120ns

        PIO: pio0 pio1 pio2 pio3 pio4

             Cycle time: no flow control=240ns  IORDY flow control=120ns

Commands/features:

        Enabled Supported:

           *    READ BUFFER cmd

           *    WRITE BUFFER cmd

           *    Host Protected Area feature set

           *    Look-ahead

           *    Write cache

           *    Power Management feature set

                Security Mode feature set

                SMART feature set

           *    FLUSH CACHE EXT command

           *    Mandatory FLUSH CACHE command

           *    Device Configuration Overlay feature set

           *    48-bit Address feature set

                SET MAX security extension

           *    DOWNLOAD MICROCODE cmd

           *    SMART self-test

           *    SMART error logging

Security:

                supported

        not     enabled

        not     locked

        not     frozen

        not     expired: security count

        not     supported: enhanced erase

HW reset results:

        CBLID- above Vih

        Device num = 0 determined by the jumper

Checksum: correct

I have also found another problem. this might be the cause of my problem...

 When I rebooted the system there where an error 

device-mapper:table:253:0:linear device lookup failed

device-mapper:ioctl:error adding target to table.

I dont realy know what this means though.

this is my fstab by the way if it helps:

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1               /boot           ext2            defaults,noatime     1 2

/dev/hda2               none            swap            sw                   0 0

/dev/hda3               /               ext3            noatime              0 1

#My other drives:

#/dev/hdb1              /mnt/filer/hd1              ext3            noatime                 0 1

#/dev/hdg1              /mnt/filer/hd2              ext3            noatime                 0 1

#/dev/hdd1              /mnt/filer/hd3              ext3            noatime                 0 1

#/dev/hde1              /mnt/filer/hd                ext3            noatime                 0 1

#/dev/hdf1              /mnt/filer/hd4               ext3            noatime                 0 1

#End of my drives

/dev/cdrom              /mnt/cdrom      auto            noauto,user          0 0

#/dev/fd0               /mnt/floppy     auto            noauto               0 0

# NOTE: The next line is critical for boot!

proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

Thanx again for helping me

----------

## NeddySeagoon

knurp,

There are two very similar drivers in the kernel for your Promise card, the old one, defined here

```
 │  Symbol: BLK_DEV_PDC202XX_OLD [=n]                                                                                                

  │ Prompt: PROMISE PDC202{46|62|65|67} support                                                                                      

  │   Defined at drivers/ide/Kconfig:631                                   

  │   Depends on: BLOCK && IDE && BLK_DEV_IDE && BLK_DEV_IDEDMA_PCI     

  │   Location:                                                                                                                      

  │     -> Device Drivers                                                                 

  │       -> ATA/ATAPI/MFM/RLL support                           

  │         -> ATA/ATAPI/MFM/RLL support (IDE [=y])        

  │           -> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support (BLK_DEV_IDE [=y])     

  │             -> PCI IDE chipset support (BLK_DEV_IDEPCI [=y])        

  │               -> Generic PCI bus-master DMA support (BLK_DEV_IDEDMA_PCI [=y])    
```

and the new one right next door to it. Try them both but only have one loaded at a time. Its always a bad idea to load

two drivers for the same hardware at the same time.

That means you either need to make them bith as modules and load them alternatly or make two kernels

----------

## knurp

OK so I have made a new kernel but i am not sure that I have loaded it sice I have used genkernel before.

the config file in grub shall maybe look different

I have just edited the kernel line and left the initrd line untouched.

Is this the right way to go??

If so than there is probably another error.

I still have the boot errors as desribed before.

----------

## NeddySeagoon

knurp,

If you prefer genkernel, do what you normally do but run genkernel with the --menuconfig option.

genkernel will run menuconfig for you and allow you to fine tune the configuration, when you exit menuconfig, genkernel will continue to build the kernel in the normal way.

I suspect the Promise drivers will be your problem, since I'm fairly sure genkernel, left to its own devices omits them.

----------

## knurp

When I ran genkernel last time Ive notised when I ran comand make menuconfig that both promise choises where selected.

he milliondollar question then  :Smile:  how to config grub.conf to run my kernel...

my grub.conf

```

default 0

timeout 10

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux 2.6.17-r5

root (hd0,0)

kernel /boot/vmlinuz-2.6.18-gentoo-r4 root=/dev/hda3

initrd /boot/initramfs-genkernel-x86-2.6.18-gentoo-r4 # is this useful or not ??                                              

                                                      # I quess it isnt but its not possible to boot without it.     

                                                      

```

----------

## NeddySeagoon

knurp,

Add a new booting block to grub.conf.

thats the 

```
title

root

kernel

initrd
```

lines. Copy what you have already, change the title, so it means something to you.

change the name of the kernel file to the name you used for your new kernel in boot.

The names must match or you will get Error 15 from grub when you try to boot the new kernel.

----------

## knurp

This subject will not be updatet for a while (by me that is). The problem is not yet solved.

Ill be back with this in feb 07 

Happy new year

----------

