LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-02-2012, 10:16 PM   #1
Cramps
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
Installed Debian on secondary hard drive, but can't boot


Hello. I'm new to this forum and Linux in general. I wasn't sure whether I should post this here since it's Debian-related or in Linux - Newbie. I apologize for any inconveniences this may bring!

Alright, so I installed Debian to my laptop and it worked perfectly fine. Now I'm trying to run Debian on my desktop computer, but something seems to have gone wrong and I have run out of ideas!
My desktop runs Windows 7 on sda, and I've got two extra hard drives, sdb and sdc. I formatted sdc and then installed Debian on it. At the end of the installation, it asked me if I wanted to install GRUB on master boot, and I agreed to, however, when I turn the computer on it just runs into Windows 7 as if GRUB had never been installed. I tried reinstalling Debian and making sure I accepted the GRUB installation and it didn't work.

So then I said, "oh, well, no GRUB... that's alright for now, I'll just use BIOS to boot using the hard disk I installed Debian in", but it didn't work. All I saw was a black screen. Is that normal? I want GRUB, but do I need GRUB to run the kernel or should I be able to boot Debian through BIOS? Since I have Windows 7 on sda, do I need to configure GRUB somehow for it to work?

I also ran the Debian CD in Rescue mode which allowed me to open shell as root when mounting on sdc1, so I guess the Debian installation succeeded, but as I said, there's no GRUB for me to choose Debian from and booting from BIOS isn't working. What am I doing wrong here? Did I miss something?

I'm sorry for the question bombardment, and I'm looking forward to reading your replies. Any help is not only welcome but also well appreciated.

Thanks for your time,
Cramps

Last edited by Cramps; 07-03-2012 at 05:13 AM. Reason: Solved. Windows 7 was actually on sdb, not on sda.
 
Old 07-02-2012, 10:50 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
Try this:

Boot up from any Linux LiveCD (I think your Debian CD qualifies)

Open a terminal and do "fdisk -l" to determine which drive is which. Mount the drive (partition) with Debian and check to be sure that /boot/grub/menu.lst is there--and that it is correct for that installation.

Then run the grub shell and install grub to that drive

Now it should be selectable and bootable from the BIOS setup.



Let me know if I've lost you somewhere and I'll back up. Also, I'm hoping that Debian uses grub 0.97---I'm not smart about grub-2
 
1 members found this post helpful.
Old 07-02-2012, 10:53 PM   #3
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Hi, and welcome to LQ.

As for your issue, boot some Linux live CD, download the bootinfo script, become root and execute it like this:

Code:
./bootinfoscript
Then post the RESULTS.txt file here, so we can know where the problem is.

edit: Didn't see pixellany's reply before posting.

Last edited by Hungry ghost; 07-02-2012 at 11:02 PM.
 
Old 07-03-2012, 04:20 AM   #4
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by pixellany View Post
Let me know if I've lost you somewhere and I'll back up. Also, I'm hoping that Debian uses grub 0.97---I'm not smart about grub-2
Debian uses grub2.

I would suspect that your grub was installed to the MBR of one drive, but the grub files probably reside on another. Try booting from the install CD with just the drive you installed Debian on connected up. chroot into the system and
Code:
# grub-install /dev/sda
(or sdb, sdc, etc)
Code:
# update-grub
Then shutdown, connect up the other HDD(s) and see if you can boot into the system, if it boots, once you're logged in
Code:
# os-prober && update-grub
That should add the grub entries to chain load other OS.

(I advise to remove the drives you're not installing on, as udev detects and sets up storage devices in an order you may not find intuitive, it's easy for a noob to hose existing operating systems if they're not careful...)
 
Old 07-03-2012, 05:10 AM   #5
Cramps
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pixellany View Post
Open a terminal and do "fdisk -l" to determine which drive is which. Mount the drive (partition) with Debian and check to be sure that /boot/grub/menu.lst is there--and that it is correct for that installation.

Then run the grub shell and install grub to that drive
Thanks a lot, everybody. pixellany had me a little lost at first but I somehow managed to figure it out and get it to work. It was indeed what caravel suspected: the grub was installed on a disk, sda, however my master boot drive is actually sdb, which is my Windows 7 drive. "fdisk -l" helped me determine that. I got it to work by simply using:
Code:
# grub-install /dev/sdb
Problem solved!
 
  


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
display after boot up is messed up and have a Grub error 22 on secondary hard drive GnOOb Linux - Newbie 9 10-26-2009 10:04 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
cannot mount already formatted secondary hard drive on newly installed debian angmar Debian 8 08-05-2005 01:12 PM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
How can I mount my secondary hard drive on boot? Scorlibrian Linux - Hardware 1 02-26-2005 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06: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