[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autodetecting MBR location

>>>>> " " == Tollef Fog Heen <tollef@add.no> writes:

     > * Russell Coker | My lilo configuration scripts need to be able
     > to infer the correct location | for the MBR.  I am currently
     > using the following algorithm: | take root fs device from
     > /etc/fstab and do the following: | s/[0-9]*// | s/part$/disc/

     > What is the use of the first s/?  Unless your first letter is a
     > digit, it will just remove the zero-width string '' between the
     > first / and the beginning of the string.

     > A better solution will probably be to

     > s/[0-9]$//

     > which will remove 5 from /dev/hda5.

You forgot /dev/hda17, which would become /dev/hda1 with your syntax.


Reply to: