LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2006, 07:26 PM   #1
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Rep: Reputation: 29
grub, two hard drives and two distros


Hi there.

I bought a brand new hard drive and set it up as slave, put an 80 gig partition on hdb1 and Kubuntu on hdb2. An older version of Kubuntu (breezy) lives on hda1:

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4677 37567971 83 Linux
/dev/hda2 4678 4865 1510110 5 Extended
/dev/hda5 4678 4865 1510078+ 82 Linux swap / Solaris

Disk /dev/hdb: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 10199 81923436 83 Linux
/dev/hdb2 * 10200 19835 77401170 83 Linux
/dev/hdb3 19836 20023 1510110 5 Extended
/dev/hdb5 19836 20023 1510078+ 82 Linux swap / Solaris

When I installed Kubuntu Edgy, it looked for "other operating systems" and edited grub accordingly (hd0). I recently removed Edgy and put the partition into freespace, but when I tried to reboot the machine wouldn't recognize the grub file on hda1 (/boot/grub/menu.lst looked the same) and refused to boot. The bios only list "Hard Drive".

How can I boot directly into hda1?
 
Old 11-01-2006, 10:36 PM   #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 I read this correctly, you deleted the partition which grub treats as "home base". GRUB has the path to its files "hard-coded" into stage 1, which is on the mbr.
You will need to boot up from an install disk, or live CD*, and setup grub. If you have good files on /dev/sda1/boot, then do this:
Code:
grub   (puts you in the grub shell)
root (hd0,0)
setup (hd0)
If the numbering looks funny, remember that grub counts from 0.

*Having a Knoppix CD on hand will help you in this and many other situations.
 
Old 11-03-2006, 08:53 PM   #3
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Original Poster
Rep: Reputation: 29
I booted from the Kubuntu install disk, did as you suggested but it didn't work for me, had to change back to hd1,1 to get it to boot. Would this work?

root (hd0,0)
kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/hda1

Should I then:

setup (hd0) ?

Or will it scare the crap out of me again?
 
Old 11-04-2006, 08:37 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I'm confused. You said that you deleted the newer Kubuntu (edgy) which you had installed on hdb2 (aka hd1,1) How then were you able to get it to boot to that partition??

Back to basics: What is currently on each disk?
 
Old 11-04-2006, 11:21 AM   #5
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Original Poster
Rep: Reputation: 29
I re-installed kubuntu on hda2 to get it to boot either system.
 
Old 11-04-2006, 11:22 AM   #6
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Original Poster
Rep: Reputation: 29
kubuntu breezy is on hda1 - edgy is on hdb2.

Thanks for your help!
 
Old 11-04-2006, 11:31 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
OK--I assume you can boot into one of the two distros...

first, decide where you want to have grub use as "home base"--ie where it will find its config file. If you are going to use hdb1 as home base, the do this:
Code:
grub   starts the grub shell
root (hd1,0)   (grub-speak for hdb1)
setup (hd0)    (boot code always goes on the first HD)
OR
setup (fd0)    (to boot from a floppy)
Then, edit the grub.conf (aka menu.lst) to boot all of your distros.

Here is the grub manual.
 
Old 11-05-2006, 09:13 AM   #8
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Original Poster
Rep: Reputation: 29
Thanks for pointing me in the right direction. The root, setup commands in grub worked with a grub cd, but not with Knoppix, (couldn't see the disk) or in the Kubuntu Live CD (created a bad file).

Thanks, I learned alot.
 
Old 11-05-2006, 09:47 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by pressman57
Thanks for pointing me in the right direction. The root, setup commands in grub worked with a grub cd, but not with Knoppix, (couldn't see the disk) or in the Kubuntu Live CD (created a bad file).

Thanks, I learned alot.
grub setup should have worked from within either one of the installed Linux distros....
Interesting about Knoppix--I need to go try it so I'll know what I'm talking about.....

Anyway, glad You got it fixed...
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot from separate distros of Linux on sep hard drives lluciano Linux - General 4 05-10-2006 04:42 AM
multiple booting two hard drives with linux distros slim case Linux - Newbie 3 07-04-2005 09:02 PM
Grub stalls when adding hard drives Xylite Linux - Hardware 3 11-05-2004 04:16 PM
Grub problem with two physical hard drives Fredstar Linux - Newbie 2 10-17-2004 02:01 PM
booting win2k and two Linux distros on two hard drives mjp Linux - General 3 01-01-2004 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:57 AM.

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