![:)](http://reboot.pro/public/style_emoticons/default/smile.png)
I hope some of U will be able to help me with an unusual request / question:
The thing is, that I'm trying to get the next available free hdX (X should be the next free hd device number) so that I can map a new HD disk image.
ex:
- if I map hd0, then after boot the real hd0 will be invisible (I will see the image instead),
- if I map as hd8 or any other higher number then the real existing hdX+1 then it will not be mapped.
- if I have 2 HDD's I will have hd0, hd1... if I map the image as hd2 it will be OK, but in different systems I have different number of real HDD's...
so I'm trying to find the number X from hdX, where the X is the real existing HDD number (in the last example it is 2)
I would use the line:
map --mem (pd)/test.ima %nexthdx%
map --hook
where %nexthdx% would be the next available hd device
My problem is that I cannot get around how to get the %nexthdx% variable string...
10x in advance for anybody who could help me in this case...
![:)](http://reboot.pro/public/style_emoticons/default/smile.png)
Sz.