Installing a distro 2nd drive (1st drive is XP) fails, just get flashing cursor
Linux - NewbieThis 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
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.
Booted to SATA XP drive, which brings up the GRUB menu and selected it to BOOT in debian Linux.
Then tried the grub commands:
Code:
Flo64:/boot/grub# grub-install '(hd2)'
Searching for GRUB installation directory ... found: /boot/grub
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup --stage2=/boot/grub/stage2 --prefix=/grub (hd2)
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd2)"... failed (this is not fatal)
Running "embed /grub/e2fs_stage1_5 (hd1,0)"... failed (this is not fatal)
Running "install --stage2=/boot/grub/stage2 /grub/stage1 d (hd2) /grub/stage2 p /grub/menu.lst "... failed
Error 21: Selected disk does not exist
grub> quit
hmm strange no hd2, so did:
Code:
Flo64:/boot/grub# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Flo64-root
6.5G 3.5G 2.7G 57% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
udev 10M 140K 9.9M 2% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 228M 18M 199M 9% /boot
/dev/mapper/Flo64-home
900G 224M 854G 1% /home
/dev/scd0 136M 136M 0 100% /media/cdrom0
Flo64:/boot/grub# grub-install /dev/sdb1
Searching for GRUB installation directory ... found: /boot/grub
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
(hd1) /dev/sdb
Clarity is good. I used to have two drives, the first with NTFS stuff and the bootloader, with the actual /boot partition on the second drive. I later chose as you are to put a dedicated /boot partition (managed by Debian) on the same drive as the bootloader. There is one catch——————Windows insists on being installed on the first disk, and sometimes on the first partition. On a separate note, it maybe even needs to be a primary partition for Grub to be able to bootload it, see the grub manual.
Speaking of clarity, I'm a bit confused by now which drive is which. You have three drives:
Drive onesy: SATA drive with XP and NTFS joy
Drive twosy: SATA drive with Debian bliss
Drive threesy: IDE drive for some temporary porpoise
By Linux terminology, I believe these will be described, e.g., by fdisk, as:
onesy = /dev/sda
twosy = /dev/sdb
threesy = /dev/hda
... assuming the BIOS sees them that way.
You selected to install grub to (hd2)... isn't this threesy (IDE)? Are you sure Grub numbers the drives the way you think it is? The Grub manual should help you figure this out.
In any case, as I implied above, you probably need to have both Grub and Windows on (hd0), which is onesy. The actual /boot could reside anywhere Grub can find it, it's up to you.
Quote:
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.
Almost, but not really. Sure, you can write the same MBR on all drives, and only one will be read and used, as selected by the BIOS. Why not? The point about flexibility is good: It could be at some point that you want or need to remove either drive onesy (Windows) or twosy (Debian). How would you boot Windows without Debian then (assuming you could put Windows as the second drive). Possibly the most flexible way is to have a dedicated /boot partition on (hd0) (it will have to be the one with Windows), and to clone it on (hd0) (the one with Debian). That way, even if you remove one or the other disc, you can still rearrange things in the BIOS and Grub's menu to boot until you reinstall the removed hard drive. By the way, you can edit the Grub entries by hand from the Grub menu, which is often useful when experimenting with your setup.
1) SATA 3 1TB - WDC green thingy
2) SATA 1 500Gb - Hitachi
3) IDE 300.0 GB - ST3300622A
4) SATA 2 - DVD/CD Rom drive
a) Now when I allow auto booting (Not pressing F11 for BIOS Boot menu) it boots too the 1Tb SATA drive and the GRUB menu appears, after the delay it then is suppose to boot into XP, this fails and it keeps bringing the GRUB menu back, forever. If I scroll up to the AMD64 Linux option, it boots fine into Linux.
b) If I reboot and call up the BIOS boot menu (F11) and tell it to boot too the 500Gb SATA drive, the GRUB menu appears, after the delay it then boots into XP as it is suppose too. I can also scroll up too the AMD64 Linux kernel and it boots fine.
Course I want option a to work properly.
fdisk -l rescue CD results:
Code:
fdisk -l
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf4b1995e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60800 488375968+ 7 HPFS/NTFS
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d495f
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 31 248976 83 Linux
/dev/sdb2 32 121601 976511025 8e Linux LVM
Disk /dev/dm-0: 6996 MB, 6996099072 bytes
255 heads, 63 sectors/track, 850 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1: 12.1 GB, 12192841728 bytes
255 heads, 63 sectors/track, 1482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2: 980.7 GB, 980754104320 bytes
255 heads, 63 sectors/track, 119236 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/hda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x13871386
Device Boot Start End Blocks Id System
/dev/hda1 * 1 35970 288928993+ 7 HPFS/NTFS
/dev/hda2 35971 36480 4096575 f W95 Ext'd (LBA)
from the booted hard drive kernel
Code:
fdisk -l
Disk /dev/hda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x13871386
Device Boot Start End Blocks Id System
/dev/hda1 * 1 35970 288928993+ 7 HPFS/NTFS
/dev/hda2 35971 36480 4096575 f W95 Ext'd (LBA)
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf4b1995e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60800 488375968+ 7 HPFS/NTFS
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d495f
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 31 248976 83 Linux
/dev/sdb2 32 121601 976511025 8e Linux LVM
Disk /dev/dm-0: 6996 MB, 6996099072 bytes
255 heads, 63 sectors/track, 850 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 12.1 GB, 12192841728 bytes
255 heads, 63 sectors/track, 1482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 980.7 GB, 980754104320 bytes
255 heads, 63 sectors/track, 119236 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Now as far as i can tell debian is booting but windows is not am I right?
title Windows XP
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Do you need the remapping for windows since xp Pro is on your second drive (i'm guessing from boot-up sequence) and debian on main (still guessing lol)?
The menu systems works, its when it boots to the 1Tb SATA drive that it fails to Boot the 500Gb SATA windows drive. Also GRUB don't mention the 1st IDE drive.
I am just lost and is despair., Just re-installed it all from Debiuan CD and same problems, YET when I installed the windows7 to it t worked fine, yes I tried the anti - christ, which I did not want to and will not use.
Even the VMware ESXI 4 won't install to that drive cos it won't find the NIC that came with the machien, thier forum says out a new NIC in la la la rather than sort thier bug.
And when I boot to the deb AMD84 drive it has nosound can't enumareate the USB stuff etc,!!!
It just feel I am beeing forced down the anti-christ route for ever.
It just feel I am beeing forced down the anti-christ route for ever.
Do you thinbk GRUB2 would solve this?
It may rather be a question of reading the Grub manual more carefully, see below.
What is causing your problem? I think I addressed it above:
Quote:
Originally Posted by michapma
There is one catch——————Windows insists on being installed on the first disk
When you booted from the rescue CD and from the hard drive, both times fdisk reported your 500 GB NTFS drive as being /dev/sda, so we can say that Windows is installed on the first disk. However... I am guessing that when you tell the BIOS to select to boot from the 1000 GB drive and try to chainload Windows, the Windows bootloader no longer sees itself as residing on the first disk, and can't figure out how to load, hence it fails and Grub helpfully brings back up its menu (though this could give you the impression of mocking your intentions). For a possible workaround, see below.
Quote:
Originally Posted by michapma
In any case, as I implied above, you probably need to have both Grub and Windows on (hd0), which is onesy. The actual /boot could reside anywhere Grub can find it, it's up to you.
I would like to suggest this again. Let Grub live on the 500 GB NTFS disc. If and when you remove this 500 GB NTFS disc, for whatever reason, you can at that point simply use a rescue CD to install GRUB on the 1000 GB MBR (it is already) and edit your menu.lst. That's not hard, it isn't hell—certainly less frustrating than what you're going through now.
If, however, you'd like to pursue your plan of booting from the 1000 GB drive—even though it's the second drive—as you describe in post #27, you then need to read the Grub manual more carefully:
Quote:
Originally Posted by The GRUB folk
GRUB cannot boot DOS or Windows directly, so you must chain-load them (see Chain-loading). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.