LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Making a libata-only install to a PATA system (https://www.linuxquestions.org/questions/slackware-installation-40/making-a-libata-only-install-to-a-pata-system-713622/)

kirkengaard 03-22-2009 04:21 PM

Making a libata-only install to a PATA system
 
Basic desire: I want to go from install media through first boot and be able to run my system through the libata/scsi layer. This involves the kernel IDE system not taking over the drives first. Unfortunately, IDE taking the devices is the current default even in huge, where both are compiled in.

I have a system with ICH4 and HPT372 PATA controllers, both of which work perfectly well under libata PATA support (2.6 series, obviously). Hard drives, DVD drives, everything works. I use several USB storage peripherals, which automatically are SCSI-identified. It's more convenient for me simply to have the SCSI layer run all of my storage devices.

However, on a default slackware installation (I run -current, and this has been the case since libata became usable), the IDE support takes the drives, and then the installer deals with /dev/hd?# identifiers. LILO and fstab are set up this way. When I have recompiled and installed my current kernel, with libata/scsi only, I have to go through both LILO and a copy fstab to change everything to /dev/sd?#, and then detour into another system on reboot to switch the new fstab in. Once I do this, everything works. I'm just tired of having to do it every time.

I know that the proper solution is compiling a kernel without IDE, installing it so that the installer can use it, calling it from the prompt, and then having everything come up SCSI. What I want to know is, has anyone had any success getting it done with existing kernels under some set of options? If not, does anyone have a good tutorial on how the distribution kernels are compiled and packaged for the installer?

Thanks!

Matt

H_TeXMeX_H 03-22-2009 04:27 PM

Have you tried something like 'hda=noprobe' as a boot option / append in lilo ? (or even 'hda=none') where hda is the drive you want to skip ?

guanx 03-22-2009 05:55 PM

Quote:

Originally Posted by kirkengaard (Post 3484289)
Basic desire: I want to go from install media through first boot and be able to run my system through the libata/scsi layer. This involves the kernel IDE system not taking over the drives first. Unfortunately, IDE taking the devices is the current default even in huge, where both are compiled in.

I have a system with ICH4 and HPT372 PATA controllers, both of which work perfectly well under libata PATA support (2.6 series, obviously). Hard drives, DVD drives, everything works. I use several USB storage peripherals, which automatically are SCSI-identified. It's more convenient for me simply to have the SCSI layer run all of my storage devices.

However, on a default slackware installation (I run -current, and this has been the case since libata became usable), the IDE support takes the drives, and then the installer deals with /dev/hd?# identifiers. LILO and fstab are set up this way. When I have recompiled and installed my current kernel, with libata/scsi only, I have to go through both LILO and a copy fstab to change everything to /dev/sd?#, and then detour into another system on reboot to switch the new fstab in. Once I do this, everything works. I'm just tired of having to do it every time.

I know that the proper solution is compiling a kernel without IDE, installing it so that the installer can use it, calling it from the prompt, and then having everything come up SCSI. What I want to know is, has anyone had any success getting it done with existing kernels under some set of options? If not, does anyone have a good tutorial on how the distribution kernels are compiled and packaged for the installer?

Thanks!

Matt

You can use UUID instead of device name in /etc/fstab.
e.g.
Code:

# dumpe2fs /dev/hda1 | grep UUID
dumpe2fs 1.41.2 (02-Oct-2008)
Filesystem UUID:          b97632c8-fa7a-46d0-b64c-14ab82b6631b

Then, change
Code:

/dev/hda1    /    ext3    defaults,acl    1  1
in /etc/fstab to
Code:

UUID=b97632c8-fa7a-46d0-b64c-14ab82b6631b  /    ext3    defaults,acl    1  1
However, I do not see it more convenient to run PATA disks as sd*. I think if it's hd* then it's more easy for me to distinguish my harddisks from USB sticks. So when I dd to the USB stick I will not destroy my whole system.

kirkengaard 03-22-2009 07:30 PM

Thank you for your suggestions, guanx and TeX.

A) I've tried playing with UUIDs, and
B) I know which devices are which.

The trouble with UUID, as far as I've played with it, is that 1) the slackware installer doesn't deal with it, so I still have to modify my lilo.conf and fstab after the fact (at which point, I have to do the same amount of different work), and 2) I can't always get the system to boot properly with UUIDs instead of device names (I also use GRUB). This has to do with not messing around with initrd.

While I know they're a good solution for not having to mess with what driver deals with what disk, I'm not sanguine on UUIDs as a solution to this particular problem. I also don't know by looking which UUID is which disk, so even if the installer did work with them, it would drive me crazy! :)

and,

C) It's not the detection I mind, so much as which driver operates. I still need the install partitions, and I'm not clear on how making the kernel skip the drive helps. Please, TeX, I'd be glad if you could tell me more about using noprobe and manually defining hardware for the installer kernel.

Basically, If I can get it right in the installer, when laying down the OS the first time, it will be right every time afterwards. If I can't, well, I already have a process to do what I want at that point.

H_TeXMeX_H 03-23-2009 12:00 PM

So, when you get a 'boot:' prompt after booting the install CD, put in there something like:

Code:

hugesmp.s hda=noprobe

# or

hugesmp.s hda=none

Where hda is the name of the drive you don't want to be probed or used by the IDE drivers.

If that seems to work, add it to your '/etc/lilo.conf' append line near the top, so change:

Code:

append=" vt.default_utf8=0"

# to

append=" vt.default_utf8=0 hda=noprobe"

then run 'lilo' to apply changes.

guanx 03-25-2009 01:06 PM

Quote:

Originally Posted by kirkengaard (Post 3484433)
A) I've tried playing with UUIDs, and
B) I know which devices are which.

The trouble with UUID, as far as I've played with it, is that 1) the slackware installer doesn't deal with it, so I still have to modify my lilo.conf and fstab after the fact (at which point, I have to do the same amount of different work),

After running setup, before rebooting, "chroot /mnt", that is your new system. Then run "vim /etc/fstab", "lilo", or whatever you need.

Quote:

and 2) I can't always get the system to boot properly with UUIDs instead of device names (I also use GRUB). This has to do with not messing around with initrd.
I don't understand. Do you mean UUID breaks initrd?

kirkengaard 03-27-2009 07:49 PM

guanx, thanks for the tip on how to edit files ahead of the first system boot. I hadn't figured that out, and it will save me a lot of hassle!

As to UUIDs and initrd, if I'm not using the default kernel, I tend to build a kernel that doesn't need an initrd. Which causes trouble in my experience when I try to define partitions by their UUIDs, because the system doesn't seem to have that information on boot without me including it in an initrd. Caused me some pain a while back, and I just found it simpler to do without.


All times are GMT -5. The time now is 12:07 PM.