Hi
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...
Sz.
PXE Boot + adding a new hd device next after real ones from image
Started by
Szabolcs Raduly-Zorgo
, Jan 23 2012 08:06 PM
grub4dos image pxe boot
5 replies to this topic
#1
Posted 23 January 2012 - 08:06 PM
#2
Posted 23 January 2012 - 08:52 PM
Why not just pick a high number and map it to that
e.g.
map --mem (pd)/test.ima (hd9)
e.g.
map --mem (pd)/test.ima (hd9)
#3
Posted 23 January 2012 - 09:45 PM
You can get the number of hard disks from the BIOS parameter at 0x475
This seems to work
This seems to work
#unhook all mappings in case we reload the menu using configfile map --unhook map --unmap=0:0xff # check location 475h for number of HDDs seen by BIOS checkrange 0x00 calc *0x475 & 0xff && set NEWHD=(hd0) checkrange 0x01 calc *0x475 & 0xff && set NEWHD=(hd1) checkrange 0x02 calc *0x475 & 0xff && set NEWHD=(hd2) checkrange 0x03 calc *0x475 & 0xff && set NEWHD=(hd3) checkrange 0x04 calc *0x475 & 0xff && set NEWHD=(hd4) checkrange 0x05 calc *0x475 & 0xff && set NEWHD=(hd5) checkrange 0x06 calc *0x475 & 0xff && set NEWHD=(hd6) checkrange 0x07 calc *0x475 & 0xff && set NEWHD=(hd7) title test mapping map --unmap=0:0xff map --unhook echo Mapping /fd002880.ima as %NEWHD% map /fd002880.ima %NEWHD% map --hook ls %NEWHD%/ root () pause configfile /menu.lst
#4
Posted 24 January 2012 - 08:33 AM
Why not just pick a high number and map it to that
e.g.
map --mem (pd)/test.ima (hd9)
this way it is mapping the HD, but after the boot it will not bee seen (as it is not in a continuous list of HD's)
#5
Posted 24 January 2012 - 08:36 AM
You can get the number of hard disks from the BIOS parameter at 0x475
This seems to work#unhook all mappings in case we reload the menu using configfile map --unhook map --unmap=0:0xff # check location 475h for number of HDDs seen by BIOS checkrange 0x00 calc *0x475 & 0xff && set NEWHD=(hd0) checkrange 0x01 calc *0x475 & 0xff && set NEWHD=(hd1) checkrange 0x02 calc *0x475 & 0xff && set NEWHD=(hd2) checkrange 0x03 calc *0x475 & 0xff && set NEWHD=(hd3) checkrange 0x04 calc *0x475 & 0xff && set NEWHD=(hd4) checkrange 0x05 calc *0x475 & 0xff && set NEWHD=(hd5) checkrange 0x06 calc *0x475 & 0xff && set NEWHD=(hd6) checkrange 0x07 calc *0x475 & 0xff && set NEWHD=(hd7) title test mapping map --unmap=0:0xff map --unhook echo Mapping /fd002880.ima as %NEWHD% map /fd002880.ima %NEWHD% map --hook ls %NEWHD%/ root () pause configfile /menu.lst
U gave the best answer in the Grub4dos Guide/Tutorial (pg4)
Thank U for the help
this was the magic part, that I could not get around: set/a hdn=*0x475&0xff
so now it is ok (and it is workin' as it follows):
title Map as a new HD from test.ima
set /a hdn=*0x475 & 0xff
map --mem (pd)/test.ima (hd%hdn%)
map --hook
Thank U again
#6
Posted 24 January 2012 - 06:48 PM
Try this one:
map --mem (pd)/test.ima (hd) map --hook
Also tagged with one or more of these keywords: grub4dos image, pxe boot
Boot methods & tools →
Boot from LAN →
AOMEI PXE Boot Tool (FREE)Started by alacran , 11 Jun 2015 pxe boot |
|
|
||
Boot methods & tools →
Boot from LAN →
boot from lanStarted by Ankur.k1991 , 14 Oct 2013 pxe boot |
|
|
||
Boot methods & tools →
Boot from LAN →
please Help me with PXE BOOTStarted by wickerstick , 12 Mar 2013 pxelinux.cfg, pxe boot, win7aio |
|
|
||
Boot methods & tools →
Boot from LAN →
pxe boot not working over wirelessStarted by j0hnx777 , 19 Jan 2012 pxe boot, wireless, not working |
|
|
||
Boot methods & tools →
Boot from USB / Boot anywhere →
Tutorials →
PXE LAN BOOT GRUB4DOS over TFTPD32 WINPE and overStarted by rushyn , 14 Nov 2011 pxe, pxe boot, tftpd32, lan boot and 6 more... |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users