LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing a distro 2nd drive (1st drive is XP) fails, just get flashing cursor (https://www.linuxquestions.org/questions/linux-newbie-8/installing-a-distro-2nd-drive-1st-drive-is-xp-fails-just-get-flashing-cursor-736663/)

wikapuki 06-30-2009 06:48 AM

Installing a distro 2nd drive (1st drive is XP) fails, just get flashing cursor
 
Hi Everyone, I have read the other similar posts but could not suck out the relevent info that might have been useful to me.

I have a system 3 internal hard drives.

SATA1: 500Gb - This is my main booting XP Pro drive
SATA2: 1TB - This is for my next OS Debian
IDE1: 300Gb - Just an NTFS data drive (Once had working XP on it)

I have successfully installed deb to the 1T from a cd, but on reboot (I pressed f11, to get the boot order menu and choose the 1Tb drive), all I got was a black screen and after a couple of seconds a newline (NO TEXT) and a flashing _ cursor.

Imeediate thought was, BOOT sequence needs to be hard set in the BIOS, many words of of rudeness cursing BIOS coders, 2nd only to MS OS coders, who have given me many hours of sadness in my life.. never mind.. So I set the boot sequence order and rebooted, but same flashing curser, no text happened.

Well the GRUB loader during the installion did detect the MSxpOS and asked me if it should write the MBR, this in itself worried me and would have been nicer if it stated, XP will still boot fine. Anyway I did let it do that.

Trouble is I cant do any unplugging etc, as I am disabled and have to wait till techies come round, so cant remove any hardware.

Any suggestions?? Could the old XP 300Mb drive be causig probems? should I ry fdisk stuff? if yes what stuff?

M/.

michapma 06-30-2009 07:03 AM

I doubt you need to do any unplugging, as is for example sometimes the case with master/slave on IDE drives. The drives are recognized, or you wouldn't have been able to install. It sounds like either of two cases. (1) The BIOS is trying to boot from the wrong drive, i.e., SATA2 or IDE1; however, this should be obvious in the BIOS because of the different drive sizes. (2) Grub is not finding the right drive/partition on which your /boot is mounted. But in the latter case, I'm thinking you would see a Grub screen or at least an error message. Have you tried rebooting from the CD? Depending on which CD you downloaded, the Debian installer may have a repair mode you could use to check this things. I would almost bet on the first case.


If you want a bright side to look at, you can be sure of at least one thing: you didn't install Debian over top of XP Pro, or else Debian wouldn't have found it. :)

wikapuki 06-30-2009 07:18 AM

Hi,

Yes, msXPos is fine and dandily working ok.

I am definately choosing the right drive to boot too and had already checked installing with the Boot CD rescue section.

I have a sneaky suspision the ide 300Gb (Former Booting XP drive) is in fact the problem, I removed the windows folder from it (and other stuff) but never reformatted it.

Damned anooying that my BIOS don't have a disable drive function. One day I shall meet a BIOS coder.. oh yes.. one day...

Turns out in the BIOS I can turn off the IDE interface. I did this booted to the CD selected rescue mode, choose sdb1 (knowing that sda MUST be the 1st XP drive as it was 1st in the BISO list and it only had 1 partition, whereas sdb had 4 partitions). on choosing sdb1, I thought I had better double check by getting a shell, I could see / and /home. SO went back and re-installed GRUB, choosing /dev/sdb1, Y cos I figured it was the 1st partition, I have to assume cos there is just too much knowledge to store in my head.

Anyway on reboot, (BIOS Boot Menu F11), no IDE drive as before, I selected the 1Tb drive and the GRUB loader appeared!! way hay. But it would not boot cos of no something on hd 2 something (pens don't work for me as doesn't my memory).

So I am going to reboot and re-install debian and haopefully that will work.

However, do I assume correctly that once I re-enbale the IDE interface, things will go tits up again?

onebuck 06-30-2009 08:34 AM

Hi,

After reading the above post it looks like you wrote the boot loader to the superblock instead of the 'MBR' of '/dev/sdb'.

michapma 06-30-2009 05:16 PM

onebuck's guess is reasonable, especially since in reinstalling Grub you "choose /dev/sdb1". Debian is obviously installed as desired, it's just that GRUB is not loading. Reinstalling Debian is not necessary, but it might seem to help since at the end it gives you the option of installing Grub (again), which might solve your problem if indeed Grub hasn't yet been written to the MBR (of the correct disk?).

If Grub just isn't installed correctly, possibly the easiest way to fix it is to use the CD to get into a shell on Debian, as you've already done. Sorry I don't have much time to confirm this right now, but once you're in the Debian shell I believe this is as easy as:
Code:

# grub-install /dev/sda
...since the BIOS will want to find the bootloader in /dev/sda. Otherwise, you have to use the "root" and "setup" commands from the grub interface, just Google "reinstall grub debian" or something similar.

The IDE drive should have had nothing to do with any of this, it can be activated or not.

wikapuki 07-01-2009 05:03 PM

things working if in the BIOS I disable the PCI IDE interface, so that it doesn't appear.

I then set the BIOS to boot to the 1Tb SATA drive, Debian Linux know this as /dev/sdb, the functional XP 500Bg SATA drive is /dev/sda

I Even altered the grub boot sequence in file /boot/grub/menu.lst to boot by default to XP.


My problem is if I enable the PCI IDE interace and the IDE drive, whilst ensuring the boot drive is still the 1TB SATA, I no longer get the colour full GRUB menu, I get a a GRUB command line with the TAB text stuff.

This is the contents of /boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb


This is the [SNIPed} contents of /boot/grub/menu.lst

title Debian GNU/Linux, kernel 2.6.26-2-amd64
root (hd1,0)

# This entry automatically added by Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)

So since my BIOS insists on making the IDE drive come first in the population of drives, can I just edit the 2 files and reboot without running any other commands OR would that be just tooo easy?

NEW /boot/grub/device.map
(hd0) /dev/hda
(hd1) /dev/sda
(hd2) /dev/sdb


NEW /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.26-2-amd64
root (hd2,0)

# This entry automatically added by Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd1,0)


So just edit those 2 files and all ok?

Does any other dev mapping have to be re-done? Hope we will have this licked :-)

wikapuki 07-01-2009 07:42 PM

Well that edit did not work :(

Got the GRUB bash

So any ideas anyone?

Hern_28 07-01-2009 08:01 PM

Lets see if i remember.
 
You need to set up grub with the IDE drive plugged in and enabled. This may encounter a problem due to the system map created when the os was first installed has changed.

The reason that the ide drive is messing things up is because its remapping your drives causing grub to lose the location of the 'menu.lst' file, that is why you are getting the blank grub screen on boot.

michapma 07-02-2009 03:18 AM

Well noted, Hern_28.

Is there any reason not to just write GRUB to the MBR of the drive that BIOS wants to load first, i.e., the IDE drive?

Hern_28 07-02-2009 05:17 AM

That could work.
 
He could try it and see if grub can find its menu.list.

wikapuki 07-02-2009 05:25 AM

I am about to try suggestions, but...

The IDE drive is NTFS formatted and full of data, so will doing;

grub-install /dev/hda

wipe any data?


the other earlier suggestion:

grub-install /dev/sda

That is the NTFS XP drive, will that leave the XP drive fully intact?

My instincts of the "UN-knowledged" tell me that I should try with the IDE drive enabled, booting to DEBosCD rescue stylee and get a shell and do;

grub-install /dev/sdb


However I am willing to try other suggestions if no NTFS data is wiped.

and, thanks for continuing help.

Now reading;
http://www.gnu.org/software/grub/manual/grub.html
Which I never really wanted to learn :-(

Hern_28 07-02-2009 05:27 AM

Yup.
 
You are writing to the boot sector and not to the usable portion of the drive.

wikapuki 07-02-2009 05:50 AM

Its nice to heave that confirmed, though I am now enjoying learning GRUB :)

After $300 freeroll will reboot and play, would be nice to get GRUB to work without needing the IDE drive, since its a transitory drive.

wikapuki 07-02-2009 07:24 AM

A moment of Clarity:

Was about to do the resue CD grub install thingy, but decided to boot to Super f-disk CD, which stated my IDE drive had no MBR. SO I decided to reboot and without changing any BIOS settings, I used the F11 boot menu and choose to boot directly to the SATA XP drive.

Up came the GRUB menu :-) and so it booted XP.

So, all your points came clear. GRUB wrote to the MBR on the SATA XP drive, which then brings up the GRUB menu from the SATA Linux drive, allowing m,e to choose which OS to boot.

This means that I need to write an MBR to the SATA Linux drive, and set the BIOS to boot to the SATA linus drive, incase the SATA XP drive dies or gets removed etc, to ensure Linux keeps booting. Clarity.

So I do indeed need to use the Debian CD, choose rescue mode, get a shell and do a grub install:

grub-install '(hd2)'

and then reboot to the SATA Linux drive.

This has all been very useful, learning GRUB, though if they can do the TAB dooberry, then why not do a fully menu driven version of GRUB bash.

I feel goood :-)

PS: You will see another posting soon for my debian box, completely new problem but I see from other posts quite common.

Thanks for helping me lick this one ;-)

wikapuki 07-02-2009 07:50 AM

Well that did not work :-(

1) Booted with IDE drive enabled (always will be now) to Debian CD
2) Choose Rescue mode
3) Choose the root device (could only choose one), got a shell
4) did /usr/sbin/grub-install '(hd2')

Sadly :-( got:

/boot/grub/stage1 not read correctly


All times are GMT -5. The time now is 01:03 AM.