LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux will not boot from HD with Win HD connected to system (https://www.linuxquestions.org/questions/linux-newbie-8/linux-will-not-boot-from-hd-with-win-hd-connected-to-system-749619/)

Kroutt 08-22-2009 09:24 PM

Linux will not boot from HD with Win HD connected to system
 
Hi all,
I just install Mint 7 KDE on a new hd (I have all my other hds with Win Vista and Win 7 disconnected from the system. I was able to boot from Mint 7 drive a few times, but when I connected back the two other drives for triple boot purpose, the Linux would not boot. Does this make any sense to you? I do not know what I'm dealing here with. This is my firs try of Linux.
Thank you
KH

GlennsPref 08-22-2009 10:07 PM

Hi, Welcome to LQ!

LQ has a fantastic search function that may save you time waiting for an answer to a popular question.

With over 3 million posts to search it's possible the answer has been given. :)

Your first mistake was to detach your other harddrives.

But it's the same mistake many of us have made,
because we want to protect the working os's we have installed.

When grub setup it installed it's self to the mbr of the first hd.

Which was not the c: drive.

When you plugged in the other drives, grub can't be found.

There is a way to add the linux install to the windows (xp) boot loader. (Google?)

You'll need to know the drive name, eg sdc* before you can change it successfully.

An easier option, imo, is to use the "Mint 7 KDE" cd to reinstall.

and use the "upgrade option" (to the same version) if available. This will be quicker and you won't erase anything you have setup.

At the end, setup grub to boot from the mbr of the first hd (probably windows)

This will insert the grub menu before the windows menu.

So if you select windows, the same old windows boot menu will pop up, with the usual keys, F8 etc.

Cheers, Glenn

Kroutt 08-22-2009 10:19 PM

Thank you for the answer. Sorry I did not use the search feature - I did not know how to describe my problem. Anyway, I choose boot drive in the BIOS, does this make any difference?
Thanks KH

GlennsPref 08-22-2009 10:23 PM

There's more than one way to skin a cat!

You could plug the linux hd into the first hd-port. Sata?

and reorder your windows drives to be after it.

Then you will need to add the windows drives to the bootloader (grub) through your

hardware system settings. find (bootloader, lilo or grub) editors.

There may be a button to add other systems, particularly windows or linux.

Then again you could just edit the /boot/grub/menu.lst to include the disks, but you'll need a grub tutorial for that.

Anyway, I choose boot "device" in the BIOS, does this make any difference? no. Same as changing the harddrive plugs.

Glenn

Kroutt 08-23-2009 12:09 AM

Well, I reinstalled the Linux leaving both drives (Vista and Win 7) connected to the system. It helped a little. Now at the start up I get Linux boot menu with default choice of Linux. Can I edit boot file in Linux to have Vista as the first choice (kind of like in Windows)? Or maybe it is in Windows?
Thank you

colorpurple21859 08-23-2009 12:25 AM

edit your /boot/grub/menu.lst file in linux set default number to entry the you want to boot first. the counting starts from "0" instead of "1"

colorpurple21859 08-23-2009 12:32 AM

edit your /boot/grub/menu.lst and set the default to the windows entry counting each entry starting from zero

GlennsPref 08-23-2009 12:57 AM

somewhere in hardware system settings or system-tools, find (bootloader, lilo or grub) editors.

There may be a button to add other systems, particularly windows or linux.

And choose the default OS.

cheers, Glenn

Kroutt 08-23-2009 11:18 AM

I think I spoke too soon when I said the reinstall helped a little - I was able to start Vista from Linux boot menu and sent the message from there before I tried the other choices. None of the other choices on the Linux boot screen works. Now I am getting error 17: cannot mount selected partition, when I choose to start Linux.
Just tried to disconnect hd with Linux - the rest of the OSs will not start automatically, I get error 21 now. Total mess.
Any idea how did I get myself in this and how can I get out?
Thanks

Kroutt 08-23-2009 02:48 PM

How can i edit menu.lst? Can I do it in text editor? or do I need a special editor? Where can I get one?
Thank you

colorpurple21859 08-23-2009 03:08 PM

let's see if i got this right with both drives plugged in you get a grub boot menu, can boot into both vista and win7, but not linux. when you remove the linux hardrive, no grub boot menu? if this is the case your /boot/grub/menu.lst linux entry is wrong
install both hardrives at the grub menu prompt highlight the linux menu and hit the "e" for edit. tryin changing the line that reads
Code:

root (hd0,0)
to
Code:

root (hd1,0)
this is assuming you have only one partition on th linux hardrive and the first one is your current entry, after changing the line hit "b" to boot. reverse the entry if it's the other way around. if this works edit your /boot/grub/menu.lst linux entry once linux is booted

Kroutt 08-23-2009 03:43 PM

I have Vista on one drive and Linux on another (I unplugged Win 7 from the system when I installed Linux). If I have them both plugged in, the grub menu comes on with Linux as a default boot. I'd like Vista to be a default boot for my other users sake. I also like to add Win 7 to the grub boot menu anywhere. I am the only one who is using Linux and Win 7.
Now, if I unplug Linux drive - nothing boots. I get error 17 - cannot mount selected partition.


This is my grub/menu.lst file:


## ## End Default Options ##

title Linux Mint 7 Gloria KDE, kernel 2.6.28-11-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb1 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Linux Mint 7 Gloria KDE, kernel 2.6.28-11-generic (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb1 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Linux Mint 7 Gloria KDE, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista (loader)
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


I tried to edit this with text editor but could not save it.

colorpurple21859 08-23-2009 05:27 PM

in a terminal
Code:

sudo gedit /boot/grub/menu.lst
change gedit to whatever text editor your distro has, for win7 it will be something similar to the vista entry the rootnoverify line will be different.

GlennsPref 08-23-2009 05:44 PM

Hi, open the editor with root privileges. You need root to be able to save any changes.

sudo vi /boot/grub/menu.lst


edit the file and :wq to write (save) and quit the vi editor.

Quick vi tute
Code:

vi is operated in a shell, like Konsole or term

        Quick keys...

        I = insert “edit mode”
        Esc = exit mode/s
        :w = write
        :q = quit
        :wq! = force write quit (does not always over-ride the admin permissions)

regards Glenn

Kroutt 08-23-2009 07:21 PM

For you guys, with more than two days of Linux experience, this will be a stupid question. How do I open the editor with root privileges?
Unfortunately I know nothing about Linux and already got myself in trouble.


All times are GMT -5. The time now is 08:10 AM.