[opensuse-autoinstall] I don't want /dev/disk/by-id/ in my fstab :-(
Hi, I guess it was with SP1 when AY for SLES 10 suddenly started naming my partitions /dev/disk/by-id/scsi-... instead of /dev/sda in /etc/fstab. Although I'm using /dev/sda in the AY profiles and not /dev/disk/by-id. Now this is quite bad, because I have some post-installation scripts that assume that /etc/fstab is somewhat equivalent to my xml profile, i.e., if the profile names /dev/sda as main disk, /etc/fstab would do, too. I know that AY tries to be nice to me, but I take care myself about the order of disks and I do control what disk becomes /dev/sda and what sdb etc. :-) Is there a way to tell AY to name the entries in /etc/fstab the same way I did in the AY? cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Mon, Oct 08, 2007 at 02:46:51PM +0200, Frank Steiner wrote:
/dev/disk/by-id/scsi-...
instead of /dev/sda in /etc/fstab. Although I'm using /dev/sda in the AY profiles and not /dev/disk/by-id.
If there's no option to do what you want, a pretty simple script can do it for you... quick example: #!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin cat /etc/fstab | while read line do dev=`echo $line | awk '/by-id/{print $1}'` if [ -n "$dev" ] then real_dev=`ls -l $dev | awk -F/ '{print $NF}'` echo $line | sed -e 's|'$dev'|'/dev/$real_dev'|g' else echo $line fi done Only drawback to that is it screws up the whitespacing that was lined up. Side effect of the while read line bit.. works though. Probably more elegant ways to accomplish the same thing too. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com [Desperate for a doughnut, Homer opens his "Emergency Procedures" manual to reveal a cutout with some crumbs and a note...] Homer: [reads note] "Dear Homer, I.O.U. one emergency donut. Signed, Homer. Bastard! He's always one step ahead." ==> Simpsons, Treehouse of Horror IV. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Thanks a lot, I will use this in case AY cannot do it itself! cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Just in case someone else steps on this... Here's the solution I got from the support: <mountby config:type="symbol">device</mountby> will make fstab use "device" entries. You can define the other methods like by-id etc., too. I could have found that in the docs if I had searched better :-) cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (2)
-
Frank Steiner
-
Mike Marion