{"id":50,"date":"2007-06-09T09:50:15","date_gmt":"2007-06-09T08:50:15","guid":{"rendered":"http:\/\/patrick-nagel.net\/blog\/archives\/50"},"modified":"2007-06-09T09:56:43","modified_gmt":"2007-06-09T08:56:43","slug":"switch-from-old-ataide-driver-to-libata","status":"publish","type":"post","link":"https:\/\/patrick-nagel.net\/blog\/archives\/50","title":{"rendered":"Switch from old ATA\/IDE driver to libata"},"content":{"rendered":"<p>Today I switched to libata on my laptop. Libata now not only handles SATA anymore, but also got PATA support. <a href=\"http:\/\/www.uwsg.iu.edu\/hypermail\/linux\/kernel\/0608.1\/0806.html\">Read more here<\/a>. I suppose I&#8217;m early with that switch, libata for PATA is still marked experimental&#8230; but sooner or later this will be standard.<\/p>\n<p>On the surface there is not much change, except that my harddisk is \/dev\/sda now instead of \/dev\/hda (what caused me to have to change a few scripts and configs here and there). The optical drive is now \/dev\/sr0 instead of \/dev\/hdb.<\/p>\n<p>If you want to switch, too, here is what you basically have to do:<br \/>\nIn menuconfig, deactivate the whole &#8220;ATA\/ATAPI\/MFM\/RLL support&#8221; tree under Device Drivers &#8211; this is the old driver architecture &#8211; nothing inside is needed anymore. Then go to &#8220;Serial ATA (prod) and Parallel ATA (experimental) drivers&#8221; (which will probably get renamed soon \ud83d\ude09 ). Activate &#8220;ATA device support&#8221; and find the right option for your IDE controller. My laptop has an ICH 7 built in (00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)).<br \/>\nNow here is one thing which took me a while. Because I never needed \/dev\/sd* devices in an early stage of booting, I had &#8220;Device Drivers \/ SCSI device support \/ SCSI disk support&#8221; (CONFIG_BLK_DEV_SD) only compiled as module. But modules can only be loaded after the Kernel can access the root partition. So make sure this option is compiled into the kernel.<br \/>\nThen change your GRUB config so that root=\/dev\/hd* is root=\/dev\/sd* now. Furthermore you need to adjust the \/dev\/hd* entries in your \/etc\/fstab to also read as \/dev\/sd*.<br \/>\nAfter building the kernel you should be able to boot your system as normal.<\/p>\n<p>I had another minor complication involving udev: It symlinked \/dev\/cdrom7 to \/dev\/sr0. Why the hell 7? I only have exactly one optical drive in my laptop. After poking around a bit in \/etc\/udev, I figured out that there was some cruft in \/etc\/udev\/rules.d\/70-persistent-cd.rules. After I deleted it and re-initialised udev (&#8220;udevstart&#8221;), the file respawned without the cruft, and I have my good old \/dev\/cdrom symlink back (which links to \/dev\/sr0).<\/p>\n<p>That&#8217;s it. Enjoy the new technology \ud83d\ude42 I bet in a few years, we will consider \/dev\/hd* device names as archaic relics from long gone times \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I switched to libata on my laptop. Libata now not only handles SATA anymore, but also got PATA support. Read more here. I suppose I&#8217;m early with that switch, libata for PATA is still marked experimental&#8230; but sooner or later this will be standard. On the surface there is not much change, except that &hellip; <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/50\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Switch from old ATA\/IDE driver to libata&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-linux-general"],"_links":{"self":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":0,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"wp:attachment":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}