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

Re: autodetecting MBR location

* 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 


which will remove 5 from /dev/hda5.


Tollef Fog Heen
Unix _IS_ user friendly... It's just selective about who its friends are.

Reply to: