LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   any way to change grub to boot to another HD? (https://www.linuxquestions.org/questions/linux-newbie-8/any-way-to-change-grub-to-boot-to-another-hd-477845/)

jim98cl 08-27-2006 02:05 PM

any way to change grub to boot to another HD?
 
hi, im kinda a noob to linux, just getting used to it
so im wondering if theres any way to configure grub so when it selects windows it'll boot from another hard drive?

bernied 08-27-2006 03:26 PM

Yes there is, but you haven't given enough information.
If you post the output from
fdisk -l
(and indicate here where your windows install is, if it's not obvious)
and
cat /boot/grub/menu.lst
and
mount

The solution will involve adding an entry to your /boot/grub/menu.lst file. You might be able to work this out for yourself if you read the grub manual (http://www.gnu.org/software/grub/manual/grub.html), but this is not the easiest document to get through.

jim98cl 08-27-2006 03:58 PM

um, i dunno what you mean by the fdisk -l and the mount (sorry, nub here)
but i do have the menu

# Modified by YaST2. Last modification on Wed Feb 1 11:12:40 UTC 2006

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,3)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 10.0
root (hd0,3)
kernel /boot/vmlinuz root=/dev/sda4 vga=0x31a selinux=0 resume=/dev/sda3 splash=silent showopts
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
chainloader (hd0,0)+1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 10.0
root (hd0,3)
kernel /boot/vmlinuz root=/dev/sda4 vga=normal showopts ide=nodma apm=off acpi=off noresume selinux=0 edd=off 3
initrd /boot/initrd

jim98cl 08-27-2006 04:05 PM

okay well it seems that YaST2 has a thing to change the boot stuff for me, except i dont know what my other hard drive would be considered as

(/dev/something?)

bernied 08-27-2006 04:42 PM

So, does the Windows boot option work?
And are you talking about another Windows install, or is that one on the menu.lst completely wrong?

In linux, you're other hard drive would probably be /dev/sdb but grub is not linux, it's almost it's own operating system, specialising in booting others. So grub uses different notation. (hd0,0) is the first partition on the first disk, (hd1,0) is the first partition on the second disk.

Windows only likes to run on the 'active' partition of the first disk (selfish), so you have to fool it into thinking that's where it is. grub can do this.

So, if you have a Windows install on the second hard drive, this entry may work:
Code:

title Windows-2
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

Those commands that I asked for output from need to be run from a terminal. Most (all?) distributions will have one somewhere in the menu, it might be called a console - it's the equivalent of the DOS command line. If you can't find it, you can always get one with Ctrl-Alt-F1 or any Function key 1 through 6. Ctrl-Alt-F7 should get you back to your X session.

jim98cl 08-27-2006 08:27 PM

wow it worked, thanks!

bernied 08-28-2006 09:04 AM

No problem.


All times are GMT -5. The time now is 06:27 AM.