# Set up a sata drive [question]

## region-g

Hello !!!

I have a problem setting a sata disk in fstab. Drive is /dev/sda at live-cd. In my gentoo is invisible.

I formatted it using fdisk in live-cd, as ext3. In fstab after gentoo-wiki guide i set /dev/sda1 my usbstick.

How can i set my sata drive ?

----------

## desultory

A good start would be to verify that you have the module for your SATA chipset builtin or loaded.

----------

## Hydraulix

We need to see your fstab, kernel config, dmesg, pictures of your girlfriend, and credit card number before we can help.  :Very Happy: 

No really post up some more info about your setup. And also check out..... 

http://gentoo-wiki.com/HARDWARE_SATA

----------

## region-g

@desultory, drivers are builtin, i prefer it for my newbie level in gentoo.

@Hydraulix

fstab

 *Quote:*   

> /dev/hda1		/boot		ext2		defaults,noatime	1 2
> 
> /dev/hda3		/		ext3		noatime	        	0 1
> 
> /dev/hda2		none		swap		sw	          	0 0
> ...

 

My kernel is configured by the guide, is use  "Silicon Image SATA support"

Thanx in advance !!!

----------

## desultory

 *region-g wrote:*   

> @desultory, drivers are builtin, i prefer it for my newbie level in gentoo.

 

Somehow, for core infrastructure, I doubt that preference will radically change soon.

 *region-g wrote:*   

> 
> 
> /dev/sda1 /mnt/usbstick vfat noauto,user,exec,sync 0 0
> 
> /dev/sda /mnt/sda ext3 defaults,noatime 0 0
> ...

 

I seriously doubt this is what you want. That indicates what is practically speaking a mutually exclusive state for sda to be in, that is having and ext3 filesystem on the raw device (in itself somewhat odd) and somehow embedded in that ext3 filesystem a valid vfat filesystem under a valid partition table, if this can actually be done I would be very interested in a walkthrough of how it was managed.

In order for us to get a better idea of what you really need in your /etc/fstab could you post the output of 'ls /sys/block/[hs]d?', when the SATA drive is present and the stick drive is not?

Also, so far as the stick drive is concerned, to disambiguate it I recommend setting up a pseudonym for it with udev, it is well documented, convenient and not difficult.

----------

## region-g

What i posted in fstab it isn't actually right, that's for sure.

Why can't i fdisk /dev/sda while running gentoo, and i can while running live-cd.

```
ls /sys/block/[hs]d?

/sys/block/hda:

dev  device  hda1  hda2  hda3  queue  range  removable  size  stat  uevent

/sys/block/hdc:

dev  device  queue  range  removable  size  stat  uevent

/sys/block/hdd:

dev  device  queue  range  removable  size  stat  uevent

```

Just as i expected to be. I'm not sure but i think it can't be detected at all.

----------

## desultory

 *region-g wrote:*   

> What i posted in fstab it isn't actually right, that's for sure.

 

I did not mean to be harsh, my apologies if I appeared so, I was mostly musing that it would be a very cool hack if it worked.

 *region-g wrote:*   

> Why can't i fdisk /dev/sda while running gentoo, and i can while running live-cd.

 

Good question.

 *region-g wrote:*   

> I'm not sure but i think it can't be detected at all.

 

It looks that way.

When you boot into the live-cd and have access to the drive, what modules are loaded?

What SATA drivers have you built in?

----------

## drbenway

HI.

Try to remove the following line in your fstab (back it up 1st)

/dev/sda1 /mnt/usbstick vfat noauto,user,exec,sync 0 0 

And replace it with

/dev/sda1 /mnt/sda ext3 defaults,noatime 0 0 

Does this help?

----------

## region-g

 *drbenway wrote:*   

> HI.
> 
> Try to remove the following line in your fstab (back it up 1st)
> 
> /dev/sda1 /mnt/usbstick vfat noauto,user,exec,sync 0 0 
> ...

 

Yes i know, but it did't work, unfortunately, so i will be back soon with more info, about lsmod in live-cd.

Thanx   :Wink: 

----------

## region-g

Ok good news   :Rolling Eyes: 

After booting livecd, i've managed to mount -t reiserfs /dev/sda1 /mnt/sata, so far all fine !!!

Then with lsmod i have noticed that livecd loads all sata related modules and also a libata-thing.

So, i loaded the silicon image sata suppot [*], in kernel which is needed for Silicon Image 3112 onboard controller.

So what do you suggest, i think i'm close enough to use the disk.

Thanx   :Smile: 

----------

## desultory

I suggest that you get all of the SATA related modules that the livecd uses built and installed on your installed system, boot the resulting kernel, give it a try and post what happens. If you post of problems, again post  'ls /sys/block/[hs]d?' (and lsmod if you are using modules which are not builtin).

----------

## region-g

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

/dev/hda3               /               ext3            noatime                 0 1

/dev/hda2               none            swap            sw                      0 0

/dev/sda1               /mnt/sata       reiserfs        defaults,noatime        0 0

/dev/sda2               /mnt/sata2      reiserfs        defaults,noatime        0 0

/dev/hdc                /mnt/cdrom      iso9660         unhide,noauto,ro        0 0

/dev/hdd                /mnt/dvdr       iso9660         unhide,noauto,ro        0 0

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

```

```
 ls /sys/block/[hs]d?

/sys/block/hda:

dev  device  hda1  hda2  hda3  queue  range  removable  size  stat  uevent

/sys/block/hdc:

dev  device  queue  range  removable  size  stat  uevent

/sys/block/hdd:

dev  device  queue  range  removable  size  stat  uevent

```

merged dbus and hal

Loaded in kernel as builtin all modules that were also loaded in livecd --> English approach, not real.

You know, when i needed some network i only played around with kernel and finally i found which modules i need, in this case i really don't know what to do, i also receive unknown fs error for reiserfs.

----------

## desultory

 *region-g wrote:*   

> Loaded in kernel as builtin all modules that were also loaded in livecd --> English approach, not real.
> 
> 

 

I do not know what you mean, please explain.

 *region-g wrote:*   

> You know, when i needed some network i only played around with kernel and finally i found which modules i need, in this case i really don't know what to do, i also receive unknown fs error for reiserfs.

 

It appears as though you posting your running kernels .config and the output of lspci would be a step down the fastest path to a solution.

----------

## region-g

I had to compile in kernel sata support as module, but still i receive a boot error.

Some filesystems failed to mount, it reffers to my sata - reiserfs disk.

But i can mount the disk manually and it reads - writes quite fast. It could be better though

Anyone had the same in the past or any suggestions ?

Thanx - region-g

----------

