Jump to content











Photo
- - - - -

Need help understanding some commands


  • Please log in to reply
5 replies to this topic

#1 iceangel89

iceangel89

    Newbie

  • Members
  • 21 posts
  •  
    Singapore

Posted 09 February 2008 - 01:59 AM

i am new to GRUB4DOS and think i need some clarifications on what i am doing.

map command

13.3.23 map
— Command: map to_drive from_drive

Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. Here is an example:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)


The example exchanges the order between the first hard disk and the second hard disk. See also DOS/Windows.


the 1st command is to? map the 2nd HDD to the 1st? then 1st HDD will "disappear"?
then the 2nd line is to map the "disappear"-ed HDD (1st) to the 2nd?

this is used if something like DOS can be used from the 1st HDD only?
and how long does this apply? in this GRUB4DOS session only?

alot of times i see [Chainloader]

chainloader (hd0)+1

13.3.4 chainloader
— Command: chainloader [--force] file

Load file as a chain-loader. Like any other file loaded by the filesystem code, it can use the blocklist notation to grab the first sector of the current partition with `+1'. If you specify the option --force, then load file forcibly, whether it has a correct signature or not. This is required when you want to load a defective boot loader, such as SCO UnixWare 7.1 (see SCO UnixWare).


whats the +1 for? and if i don't put +1 in it won't work?

the find --set-root

find --set-root /bootmgr

this command finds the partition with the file /bootmgr and sets the partition to root? then what if there are more than 1 partition with the file /bootmgr?

err when i try

find --set-root /deploy.tag

chainloader /ntldr

does the find --set-root sets the partition with the tag file as root such that when i do a chainloader, it looks for the correct file? in this case ntldr? or do i need a map/root command?

rootnoverify whats it for?

13.3.32 rootnoverify
— Command: rootnoverify device [hdbias]

Similar to root (see root), but don't attempt to mount the partition. This is useful for when an OS is outside of the area of the disk that GRUB can read, but setting the correct root device is still desired. Note that the items mentioned in root above which derived from attempting the mount will not work correctly.


what does don't mount the partition imply?

how do i know when to use map --hook and map --unhook?

savedefault --wait=10 0

savedefault is to make the selection default if nothing is selected once timeout? the whats --wait=10 0 for? when do i need that?

------------

then i also noticed that my USB HDD is detected hd1 and when i use eSATA its detected as hd0? isit becos my eSATA port for my main hdd is "after" my external 1?

then also, as long as my external HDD whether USB/eSATA is plugged in, my computer always boot from it. even when i do a chainloader (hd0,0) or (hd1,0) it still goes to the same USB boot.ini menu...

help please

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 09 February 2008 - 01:48 PM

iceangel89
take it easy, man :thumbsup:.

This is not question time.

And you cannot even start a new thread for any doubt you have....

There are just two pages of threads in the grub4dos section of bootland, say 40 of them, the answer to EACH of your question is ALREADY in one of them, so take your time and READ them, then post here the (I am sure they will be very few) doubts you have remaining.

As a start:
map (hd0) (hd1) see this:
http://www.boot-land...-HDD-t2568.html

chainloader just READ what you quoted, one sentence at the time:

Load file as a chain-loader.

EXAMPLES:
chainloader (hd0,0)/filename
chainloader /filename

( no "+1" NEEDED)

Like any other file loaded by the filesystem code, it can use the blocklist notation to grab the first sector of the current partition with `+1'.

chainloader (hd0,0) +1
chainloader +1
(no "filename" needed)

does the find --set-root sets the partition with the tag file as root such that when i do a chainloader, it looks for the correct file?

Yes, of course.

or do i need a map/root command?

NO, you already set-root !

Now, honestly, would you have made the above two questions if you had READ this thread? :D:
http://www.boot-land...p?showtopic=715

jaclaz

#3 iceangel89

iceangel89

    Newbie

  • Members
  • 21 posts
  •  
    Singapore

Posted 10 February 2008 - 03:21 AM

mmm i think i know more or less everything except the map command.

for the map, is it used because somethings need to be seen as the 1st HDD? like DOS as mentioned?
so when i do a

map (hd1) (hd0)

map (hd0) (hd1)
i am swapping the HDD "positions" to make the (hd1) look like its (hd0) the 1st HDD?

if so, the 1st line, makes hd0 > hd1. then what happens to hd1 (isit since the mapping hasn't taken effect, no --hook, its still hd1)?
then the 2nd line, makes the originally hd1 (the mapping in the 1st line has not taken effect right? until the --hook) to hd0?

and thanks for ur help

#4 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 February 2008 - 01:02 PM

mmm i think i know more or less everything except the map command.

for the map, is it used because somethings need to be seen as the 1st HDD? like DOS as mentioned?
so when i do a

map (hd1) (hd0)

map (hd0) (hd1)
i am swapping the HDD "positions" to make the (hd1) look like its (hd0) the 1st HDD?

if so, the 1st line, makes hd0 > hd1. then what happens to hd1 (isit since the mapping hasn't taken effect, no --hook, its still hd1)?
then the 2nd line, makes the originally hd1 (the mapping in the 1st line has not taken effect right? until the --hook) to hd0?

and thanks for ur help


Please, do read TWO times, one from top to bottom and one from bottom to top, posts #8 and #9 in the thread I already referenced you:
http://www.boot-land...-HDD-t2568.html

I have NO better way to explain it. :thumbsup:

Yes, the exchange, until mapping is hooked does not affect the way internally grub4dos identifies the drives, as seen by grub4dos (hd0) remains (hd0) and (hd1) remains (hd1), externally they are exchanged.
Once the mapping is hooked, grub4dos will see the actual (hd0) as (hd1) and viceversa.

jaclaz

#5 iceangel89

iceangel89

    Newbie

  • Members
  • 21 posts
  •  
    Singapore

Posted 12 February 2008 - 03:27 AM

thanks, i understood u by the quote :thumbsup: but the link nvm, i thought that wasn't too related :D no offense meant by the way. u helped me alot

Yes, the exchange, until mapping is hooked does not affect the way internally grub4dos identifies the drives, as seen by grub4dos (hd0) remains (hd0) and (hd1) remains (hd1), externally they are exchanged.
Once the mapping is hooked, grub4dos will see the actual (hd0) as (hd1) and viceversa.


:D

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 12 February 2008 - 09:12 AM

Only too happy you are now all set to start some experiments with grub4dos! :thumbsup:

:D


jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users