LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need to move grub to my linux partition (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-move-grub-to-my-linux-partition-653661/)

spacepigeon 07-04-2008 07:13 PM

Need to move grub to my linux partition
 
Currently I have GRUB installed on sda1 (windows), and this is also my bootable partition. I assume that after I install grub onto my linux partition, I need to make sda2 (root) my bootable partition.

Any pointers or tips??

Thanks in advance.

syg00 07-04-2008 07:28 PM

Quote:

Originally Posted by spacepigeon (Post 3204456)
Currently I have GRUB installed on sda1 (windows), and this is also my bootable partition.

Are you sure ??? - this is possible, but unlikely. Show us some evidence. When you boot the machine do you get a grub menu or a Windows loader screen ???.
Quote:

I assume that after I install grub onto my linux partition, I need to make sda2 (root) my bootable partition.
Nope - the Linux loaders ignore the boot/active flag.

Why don't you tell what problem you think you are trying to solve.

spacepigeon 07-04-2008 07:38 PM

GRUB loader. Looks like:

Arch Linux
Arch Linux Fallback
Windows

Last few lines of /boot/grub/menu.lst look like

Code:

title  Arch Linux
root  (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sda2 ro
initrd /boot/kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root  (hd0,1)
kernel /boot/vmlinuz26 root=/dev/sda2 ro
initrd /boot/kernel26-fallback.img

# (1) Windows
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1

Anyway, when I built this machine a few days ago, I didn't have a retail copy of XP handy and I know XP likes to have the first partition so I used a reinstall disk from an old Dell. Arch asked where I wanted to install grub and I said sda1 (windows). Now that I have a retail copy, I need to make sure that when I reinstall on sda1, I can still load Arch.

syg00 07-04-2008 07:52 PM

Looking at that, seems you mis-remembered.
Grub is in the MBR, with its stage files in /dev/sda2. So far so good.
When you re-install XP, it will indeed trash the MBR - easy enough to fix. Been a few months since I did an Arch fix-up, but I don't think it's the easiest for this. I use a Gentoo minimal CD, but any liveCD will do - Knoppix say. From a terminal, run the command "grub" as root, then
Code:

root (hd0,1)
setup (hd0)

All done - just re-boot.

spacepigeon 07-04-2008 07:58 PM

Thanks! I thought about using the Arch cd and skipping all the way to install the bootloader and proceed. I do have a Ubuntu 8.10 live cd kicking around, Ill probably just use that and your suggestion.


All times are GMT -5. The time now is 04:36 PM.