[SOLVED] Installed Debian on secondary hard drive, but can't boot
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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...)
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.