This article describes the setup of an internal SATA or PATA (IDE) rotational hard disk drive.
To choose the right driver, first detect the used storage controller. lspci can be used for this task:
lspci | grep --color -E "IDE|SATA"
(At runtime) show identification and feature info (replace
/dev/sdX with the right device):
hdparm -I /dev/sdX
For more detailed information see the hdparm article.
For AHCI SATA controllers, check the system's BIOS or firmware to see if if AHCI has been activated.
If the root partition is on this drive, the file system drivers have to be built into the kernel.
Activate the following kernel options:
Device Drivers ---> <*> Serial ATA and Parallel ATA drivers ---> [*] ATA ACPI Support If the drive is connected to a SATA Port Multiplier: [*] SATA Port Multiplier support Select the driver for the SATA controller, e.g.: <*> AHCI SATA support (ahci) If the drive is connected to an IDE controller: [*] ATA SFF support [*] ATA BMDMA support Select the driver for the IDE controller, e.g.: <*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support (ata_piix) SCSI device support ---> <*> SCSI device support <*> SCSI disk support
Filesystems can be mounted in several ways. Notable methods include:
- The mount command.
- /etc/fstab file - Automatic mount at boot time (does not support on demand mount).
- removable media - Automated mount on demand.
- AutoFS - Automated mount on demand.
- SSD — provides guidelines for basic maintenance, such as enabling discard/trim support, for SSDs (Solid State Drives) on Linux.