I fixed this by using this patch
(https://launchpadlibrarian.net/73763550/hdparm-functions.patch) that
translates (unlinks) HDD path symlink inside /etc/hdparm.conf to
/dev/sdX

but I also had to create this patch to the /lib/udev/hdparm, because I had to:
1) convert (readlink) DEVNAME input parameter to hdparm_options function in 
'/lib/hdparm/hdparm-functions' - this fixes issue when as input to 
/lib/udev/hdparm someone puts symlink
2) trim the trailing digits from the DEVNAME, because the udev rule puts disk 
device as well as partitions as input into the /lib/udev/hdparm

Example scenario I had:
1) udev rule runs /lib/udev/hdparm and passes /dev/sda1 as DEVNAME => outcome 
was that /dev/sda1 was not in /etc/hdparm.conf which made it apply DEFAULT 
settings
2) udev rule runs /lib/udev/hdparm and passes /dev/sda as DEVNAME => outcome 
was that /dev/sda was in /etc/hdparm.conf which made it apply CORRECT settings
3) udev rule runs /lib/udev/hdparm and passes /dev/sda2 as DEVNAME => outcome 
was that /dev/sda2 was not in /etc/hdparm.conf which made it apply DEFAULT 
settings

All in all, for me, between reboots, the order was random. Sometimes the
disk came last and applied correct settings and sometimes partition came
into play and was overwriting the /etc/hdparm.conf with the DEFAULTS


** Patch added: "hdparm.patch"
   
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/595138/+attachment/5047121/+files/hdparm.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/595138

Title:
  Settings in /etc/hdparm.conf are not applied during boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/595138/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to