How to avoid HDD spin up at system start? (Ubuntu from SSD)

Thanks to hdparm -B1 /dev/sdb my HDD does no longer spin up when powered up on boot. But after completing the BIOS POST messages and starting Ubuntu the HDD gets a signal over the SATA data cable and spins up.

Leaving the data cable (but still with plugged in SATA power cable) let the system boot up completely from my SSD without spinning up the HDD.

What causes the HDD to spin up? Maybe Grub2?


Edit: nope, doesn't seem to be Grub2 that spins up the drive. I just set up Grub to show its menu without timer. Nothings happens until I hit the Ubuntu standard boot option, then a few seconds later the drive spins up.


Edit: dmesg | grep sdb:

[    7.080043] ata2.00: qc timeout (cmd 0xef)
[    7.080057] ata2.00: failed to IDENTIFY (SPINUP failed, err_mask=0x4)
[    9.830035] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    9.836555] ata2.00: ATA-8: SAMSUNG HD105SI, 1AJ10001, max UDMA/133
[    9.836564] ata2.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    9.842364] ata2.00: configured for UDMA/133
[    9.842644] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HD105SI  1AJ1 PQ: 0 ANSI: 5
[    9.843249] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    9.843270] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    9.843487] sd 1:0:0:0: [sdb] Write Protect is off
[    9.843497] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    9.843590] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    9.844091]  sdb:
[    9.845127] scsi 2:0:0:0: CD-ROM            ATAPI    iHDS118   5      RL0C PQ: 0 ANSI: 5
[    9.851182] sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
[    9.851191] Uniform CD-ROM driver Revision: 3.20
[    9.851554] sr 2:0:0:0: Attached scsi CD-ROM sr0
[    9.851802] sr 2:0:0:0: Attached scsi generic sg2 type 5
[    9.942896]  sdb1
[    9.943773] sd 1:0:0:0: [sdb] Attached SCSI disk

I think you meant to say hdparm -s, not -B1, which asks APM compatible hard disks (which pretty much means only laptop ones) to automatically standby after a short period of inactivity. Also Western Digital disks don't seem to accept the -s command to power on in standby, but have a jumper on the back you can use to enable it.

The kernel sd (scsi disk) driver starts the disk up the first time it is accessed, which happens during boot to scan the partition table. It also will restart the drive after resume from suspend by default, but you can disable that by writing 0 to /sys/block/sda/device/scsi_disk/*/manage_start_stop.

I usually do this and then manually suspend drives I don't plan on using with hdparm -y after a reboot.

My last motherboard bios would simply not detect the drives that powered on in standby, but my new Asus sandy bridge one is apparently "smart" enough to notice that the drive is in standby and start it up.