site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM ·FreeBSD Handbook
AuthorAll Replies


linuxnoleech

@sbcglobal.net

reply to FastEddie

Re: Dual Boot Question

 # grub                                                                                       
Probing devices to guess BIOS drives. This may take a long time.
 
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
 
 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,4)
 (hd6,0)
 (hd6,4)
grub> root (hd0,4)
root (hd0,4)
 Filesystem type is reiserfs, partition type 0x83
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
 Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"...  23 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,4)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
quit
# 
 

Most linux live cds will have grub installed and the grub shell can be invoked as root.

The 'find' command in grub will identify the partition(s) in grub nomenclature where grub finds the specified file, given as the absolute path from the root of the partition. /boot/grub/stage1 is the classic file to ask grub to find when determining how grub sees the partition where your grub files are installed.

On this machine, there are 7 hard drives and multiple instances of remnants of grub installations. I happen to know my operating grub files (menu.lst, e.g.) are on sda5 or (hd0,4). It seems there should be little doubt which is your operating grub partition.

The 'root' command tells grub where the bootloader files are.
The 'setup' command tells grub where to install the bootloader, (hd0) being the MBR of the first disk. Alternately, a partition can be specified to grub to have the bootloader installed to the boot sector of that partition, useful for chainloading multiple installations of the linux os.

Be sure to use 'quit' to exit the grub shell. That can be done before writing anything to disk with 'setup'.

Saturday, 02-Jun 04:44:08 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics