This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
HDD
This article describes the setup of an internal SATA or PATA (IDE) rotational hard disk drive.
Installation
Hardware detection
To choose the right driver, first detect the used storage controller. lspci can be used for this task:
root #
lspci | grep --color -E "IDE|SATA"
(At runtime) show identification and feature info:
root #
hdparm -I /dev/sdX
For more detailed information see the hdparm article.
BIOS
For AHCI SATA controllers, check the system's BIOS or firmware to see if if AHCI has been activated.
Kernel
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
Configuration
Generally when configuring a hard disk drive one or more partition will need to be created and filesystem written into them.
Usage
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.
Troubleshooting
See also
- SSD — describes how to set up SSDs (Solid State Drives) on Linux.