Jump to content











Photo
* * - - - 1 votes

Can someone explain find --set-root


  • Please log in to reply
2 replies to this topic

#1 SenseiC

SenseiC
  • Members
  • 1 posts
  •  
    United States

Posted 19 March 2008 - 02:56 PM

After much struggle (and now rumored as having mange after pulling large portions of my middle-aged hair out :thumbsup: ) I stumbled across a nifty solution to a multi-boot issue that utilizes the "find --set-root" command. Ultimately reading that led me here. My problem is that I just don't understand what this is doing and thanks to the design of most search engines, it's darn near impossible to accurately search the web for "find --set-root".

I have no problem finding the "find" syntax in the Grub manual, but this --set-root parameter seems to have fallen out of a worm hole. Would someone please provide a reasonably detailed description of how to use (and not use) --set-root, what the limitations are, recommendations/guidelines, etc.?

Sincerely,

SenseiC

#2 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 646 posts
  • Location:PILGRIM

Posted 19 March 2008 - 09:23 PM

Hi SenseiC Greetings, :thumbsup:

This might help:

Valid commands are (examples):
root (hd0) ->sets the whole first HD as root
root (hd0,1) -> sets second partition on first HD as root
root (cd) -> sets a CD drive (autodetected by bios) as root
root (cd0) -> sets first CD drive (as mapped by grub4dos with cdrom --init) as root
and so on.

A nice added feature of grub4dos is the "find" command (examples):
find --set-root /io.sys -> sets as root the first drive or drive partition found to contain file io.sys
find --ignore-floppies --set-root /io.sys ->sets root as above, but without checking floppies

jaclaz

I hope Jaclaz does NOT carve me up for this?

Regards,

ispy :tabletalk:

#3 was_jaclaz

was_jaclaz

    Finder

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

Posted 20 March 2008 - 08:12 AM

I hope Jaclaz does NOT carve me up for this?


Why should I? :D

Because you didn't give a link to the original post/thread? :thumbsup:

Here it is :tabletalk::
http://www.boot-land...blem-t3445.html



@senseic

Think at "--set-root" as it was a "normal" CD (Change Directory) command.
To boot you need generally to have the boot device, real or virtual as "root", just like you often have to be in the given directory to run a certain program.

There are TWO main lines of thought about using grub4dos, as an example this is the first "way":
title Dos floppy image

map --mem (hd0,0)/dos.img (fd0)

map --hook

chainloader (fd0) +1

rootnoverify(fd0)

and this is the second:
title Dos floppy image

find --set-root /dos.img

map --mem /dos.img (fd0)

map --hook

root (fd0)

chainloader +1

In the first example:
1) you don't know which is current "root"
2) you have to be sure that the image is on (hd0,0)
3) you need to specify the destination of the "chainlader" command

In the second one:
1) you don't know which is current "root"
2) dos.img can be on root of ANY drive, including (cd) or (rd)
3) the "root" is established before using the "chainloader" command

I find the second more "portable" and easier to edit "on the fly" to change something. :D

jaclaz
  • ZEE likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users