LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-02-2009, 07:43 AM   #1
Windows to Linux
Member
 
Registered: Sep 2008
Distribution: Ubuntu LTS
Posts: 57

Rep: Reputation: 16
Where is GRUB?


I ned to give a Hard disk to my brother, but I can't tell which disk GRUB is on
Is thiere any way to move it or something?
 
Old 03-02-2009, 08:09 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If you mean the GRUB code in the boot record, then you cannot just move it. GRUB gets "hard-coded" to point to the directory with its files.

I'm guessing you have 2 drives in the system, and you want to remove one. Suppose you have Linux running on HD#1. You can simply install GRUB to that disk---like so:
Code:
grub  ##starts the GRUB shell
root (hd0,0)   ##tells GRUB where its files are---I assumed you have Linux on the partition #1 of drive #1
setup (hd0)   ##puts GRUB on the MBR of disk 1.
For more and better help, give us the details of the system---including the output of "fdisk -l" (run as root or with sudo)
 
Old 03-02-2009, 05:09 PM   #3
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
To find which drive contains Grub in the MBR (Master Boot Record), you could do:
Code:
sudo dd if=/dev/sda count=1 2>/dev/null | strings | grep -i grub
And replace sda with each of your drives; if the above command returns "GRUB", that means that particular drive has Grub in the MBR.
 
Old 03-02-2009, 07:33 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Check your BIOS. GRUB should be on the first drive. Of course, if your system is on another drive, keeping only the first drive won't be any good and you'll need to move either GRUB or the system.

Last edited by jay73; 03-02-2009 at 07:35 PM.
 
Old 03-31-2009, 04:23 AM   #5
ukstar
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Here's a poser guys, which will you probably find simple to set up but I'm totally confused.
When I initially installed Mint onto the same drive as XP, no problem. I then did fixmbr so I could boot from F10. But now of course I can't boot into Mint. How do I install grub onto the root partition of Mint. If I detach the other three drives can I then move the Mint to the root from the live CD?
Any help would be appreciated.


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=20
splashimage=(hd0,0)/grub/splash.xpm.gz
# hiddenmenu
title Fedora (2.6.27.19-170.2.35.fc10.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.27.19-170.2.35.fc10.x86_64 ro root=UUID=dd93e8af-8915-444c-915e-70dffec42851 rhgb quiet
initrd /initrd-2.6.27.19-170.2.35.fc10.x86_64.img
title Windows 7 (x86_64)
rootnoverify (hd1,0)
chainloader +1

title Windows 7 build 7057(x86_64)
root (hd2,0)
savedefault
makeactive
map (hd0) (hd2)
map (hd2) (hd0)

chainloader +1

title Windows XP
root (hd3,0)
savedefault
makeactive
map (hd0) (hd3)
map (hd3) (hd0)

chainloader +1

title Linux Mint 6, kernel 2.6.27-7-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda6 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
 
Old 03-31-2009, 09:58 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,487

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Assuming this is your Fedora grub.conf/menu.lst file?
You state that you had Mint and xp on the same drive yet your entries show xp on (hd3,0) and Mint (hd0,5). If you have them both on the same drive all you need to do is change the Mint entry to (hd3,5). If that doesn't work, post the output of 'fdisk -l' command.
 
Old 03-31-2009, 06:16 PM   #7
ukstar
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
[QUOTE=yancek;3493757]Assuming this is your Fedora grub.conf/menu.lst file?
You state that you had Mint and xp on the same drive yet your entries show xp on (hd3,0) and Mint (hd0,5). If you have them both on the same drive all you need to do is change the Mint entry to (hd3,5). If that doesn't work, post the output of 'fdisk -l' command.[/QUOTE



whoops didn't notice that, rectified. Now boots into Mint but get this
/dev/sda6 does not exist
then drops to shell (initramfs)
When I originally installed Mint with XP it of course replaced the XP mbr, so now Mint can't find it. Do you think I can change it using shell?

[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb0df4ad9

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 30401 243995220 8e Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2773b447

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30401 244196001 7 HPFS/NTFS

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000eeac8

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary. (not worried about this, it's OK)
/dev/sdc2 13 9730 78046208 7 HPFS/NTFS

Disk /dev/sdd: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbe3070f2

Device Boot Start End Blocks Id System
/dev/sdd1 * 2 24028 192996877+ 7 HPFS/NTFS
/dev/sdd2 24029 30401 51191122+ 5 Extended
/dev/sdd5 24029 25001 7815591 82 Linux swap
/dev/sdd6 25002 30401 43375468+ 83 Linux
 
Old 03-31-2009, 10:59 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,487

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
You've got some version of windows on each of your drives, the first partition of each. I don't know which has the the OS files you need to boot? Assuming it is on partition sdb1, you would enter the following in your menu.lst file for Fedora (assumes you still use Fedora to boot?):

title windows xp
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

The map commands are to get windows to 'think' it is on the first drive. If your OS system files are on a different drive, you need to make appropriate changes.
 
Old 03-31-2009, 11:08 PM   #9
meierfra
LQ Newbie
 
Registered: Jun 2008
Posts: 20

Rep: Reputation: 1
Quote:
dev/sda6 does not exist
Change

kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda6 ro quiet splash

in the fedora grub.conf to

kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sdd6 ro quiet splash
 
Old 04-01-2009, 04:02 AM   #10
ukstar
LQ Newbie
 
Registered: Nov 2008
Posts: 7

Rep: Reputation: 0
Hi Guys,
Thanks for all your help. The problem was I had overwritten the Mint MBR by doing a fxmbr in XP, so it didn't exist. Have now re-installed Mint and all OK.
title Linux Mint 6, kernel 2.6.27-7-generic
root (hd3,5)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sdd6 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why /boot/grub/grub.conf is symlinked to /boot/grub/menu.lst raj_hcl1986@rediffma Linux - Newbie 2 10-19-2008 02:19 AM
Problems with /boot/grub/grub.conf not being read properly on reboots cmeyer Linux - Software 1 10-11-2008 06:34 PM
Changing GRUB-GRUB, GRUB-LILO and vice versa andreas_skw Linux - Newbie 1 06-05-2008 06:40 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration