PDA

View Full Version : [ubuntu] 8.04 Grub boot fails with two windows active parts.



charlemagneb
May 20th, 2008, 05:38 AM
I guess my problem is that, amongst other things, I don't understand maps. I stupidly installed Hardy on a computer with two active disks, each having an active Windows MBR. Grub finds both windows, but fails to open the "clean" one.

The "clean" Win2K partition are located on sda, and the "dirty" Win2k is on sdb. Of course, Grub boots the dirty version, but the clean version returns 'inaccessible_boot_device'.

/grub/menu.lst shows: (abbreviated here to save space)
on /dev/sda1
title Microsoft Windows 2000 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

on /dev/sdb1
title Microsoft Windows 2000 Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

I had only left the dirty version on so that I could make sure I had all data transferred before reformatting it, but there we are. The question is how do I remap so grub boots the clean version (hd0,0) and not the dirty?

Thanks for any help.

Chuck

Gio-van-I
May 20th, 2008, 07:55 AM
Did you have a dual boot system for the 2 windows versions before you installed ubuntu?

Could be that you don't need to map cause the old setting are aware of windows not beeing installed on the first disk or something. But best not try yet before someone can tell for sure.

iaculallad
May 20th, 2008, 08:00 AM
I guess my problem is that, amongst other things, I don't understand maps. I stupidly installed Hardy on a computer with two active disks, each having an active Windows MBR. Grub finds both windows, but fails to open the "clean" one.

The "clean" Win2K partition are located on sda, and the "dirty" Win2k is on sdb. Of course, Grub boots the dirty version, but the clean version returns 'inaccessible_boot_device'.

/grub/menu.lst shows: (abbreviated here to save space)
on /dev/sda1
title Microsoft Windows 2000 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

on /dev/sdb1
title Microsoft Windows 2000 Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

I had only left the dirty version on so that I could make sure I had all data transferred before reformatting it, but there we are. The question is how do I remap so grub boots the clean version (hd0,0) and not the dirty?

Thanks for any help.

Chuck

Try removing the "makeactive" on your "dirty win2K" and restart. This will make your GRUB menu think that only one active partition is present. Usually makeactive is for ******* drive only.

on /dev/sdb1
title Microsoft Windows 2000 Professional
root (hd1,0)
savedefault
makeactive # <------ This one
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

charlemagneb
May 21st, 2008, 01:03 AM
I first changed the "makeactive" field on /dev/sdb to inactive. That didn't work, ie still no boot on /dev/sda.

Next I removed the entire boot record for /dev/sdb with the same results.

So, now what can I try? It would appear that grub does not have access to netldr.

Please advise.

iaculallad
May 21st, 2008, 01:10 AM
Try fixing sda1's MBR using your Ubuntu LiveCD. To do this, boot with your LiveCD and open up your terminal then issue this command.

sudo ms-sys -m /dev/sda

Then reboot and test it on your GRUB menu.

charlemagneb
May 21st, 2008, 02:12 AM
I entered: 'sudo ms-sys -m /dev/sda'
response from ubuntu was 'ms-sys: command not found'

iaculallad
May 21st, 2008, 02:16 AM
sudo apt-get install ms-sys

then issue the command again.

charlemagneb
May 21st, 2008, 03:49 AM
OK, we are dealing with Linux ubuntu 2.6.24-16-generic #1

The response to apt-get is 'E: Couldn't find package ms-sys' I tried to run 'sudo find / -print|grep ms-sys|more' and I get a permission denied response, so I don't know if ms-sys is anywhere on the disk or not.

I have to say, I do not understand a Linux distro without access to root.

Thanks for your continued help.

iaculallad
May 21st, 2008, 03:59 AM
Try enabling the repo for "Universe" and "Restricted" on your Software Sources:

System->Administration->Software Sources. On the "Ubuntu Software" tab, check the check boxes which has Universe and Restricted. Uncheck the checkbox which says, "Installable from CDROM/DVD". Close the window then re-issue the command

sudo apt-get install ms-sys

That should correct the error on not being to download.

charlemagneb
May 21st, 2008, 04:43 AM
Lose not hope. on System>Administration>Software Sources>Ubuntu Software, I checked all boxes in upper half of window, and un-checked 'Officially supported Restricted copyright' within the 'Installable from CD-ROM/DVD' box. Same results as before, ie, install could not find ms-sys.

iaculallad
May 21st, 2008, 04:58 AM
Can you issue the command sudo apt-get update without any error?

charlemagneb
May 21st, 2008, 05:02 AM
No. It comes back with the same exact failure message. I should note also that the install package process did result in Internet activity to update, etc, so I am reasonably confident that it worked.

iaculallad
May 21st, 2008, 05:40 AM
Ok then, is your computer behind a proxy server?
Are you having a successful update with your Ubuntu whenever new updates are available?

charlemagneb
May 21st, 2008, 05:46 AM
No proxy server. Our "firewall" is a Netgear RO318 router, and I have not perceived any failures to download. As a matter of fact, it appeared that update found the Internet and downloaded several packages as a result of the changes you suggested. Also, previous updates to Ubuntu were successful, and Fedora 8, on this Thinkpad, works just fine on updates.

iaculallad
May 21st, 2008, 05:55 AM
Here we go, blind leading the blind :-) Issue this commands on your terminal. Wait for the commands to finish before issuing the next command.

sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

meierfra.
May 21st, 2008, 05:58 AM
ms-sys is NOT in the Hardy Repositories.

you need to get the debian package:

http://packages.debian.org/etch/ms-sys

charlemagneb
May 21st, 2008, 07:42 PM
Um, in light of meierfra's input (and I was beginning to believe that this was true myself) what is this sequence of commands supposed to get me? And if we do perform these commands, do I assume correctly that we are again using the live dvd?

Thanks for your help.

meierfra.
May 22nd, 2008, 02:46 AM
Let me start from the beginning.

Did you delete any partitions when you installed Ubuntu?
Did you resize partitions?

Please post the output of


sudo fdisk -l

and


cat /boot/grub/menu.lst
(both l are lowercase L, not the number 1)

meierfra.
May 22nd, 2008, 03:22 AM
You might also want to read through this thread:

http://ubuntuforums.org/showthread.php?t=263712

charlemagneb
May 22nd, 2008, 05:09 AM
Thanks for staying with me. I followed some of the links in your post of yesterday, and have burned a copy of super_grub_disk and made some other discoveries of probably no importance, but here they are:

Knoppix does have 'ms-sys' and I ran it "successfully" on /dev/sda. I put quotation marks since success is relative. I appear to have written to the MBR, but Win 2K (yes, I have attempted to understand your recent link, and yes the Win system is Win 2K Pro, SP4) still has the same boot failure, and I grub no longer works at all.

I wondered if possibly grub had installed part of itself in the mbr of sdb, so I disconnected sda and connected sdb as the prime boot (sda). Win 2K does boot, confirming, I think that grub is *not* located on sdb.

sgd.9701, Knoppix, and Ubuntu Live all boot, and sgd booted this session of installed Ubuntu.

Although I installed, programmed for, and worked with various flavors of SCO Xenex, Open Server, and Unix V, that was years ago and I have forgotten how to talk except in baby talk, so I consider myself a noob. Better than just having fallen off the turnip truck, but a noob anyhow. Just so you know what you are dealing with here.

I am not sure how to proceed with rebuilding grub using sgd or whatever, so some guidance please.

Answers to questions:

No partitions were deleted from either sda or sdb. Sda is a new 500GB disk with 134GB windows, and since I could not figure out how to tell the installer how to partition Linux, the remainder is ext3.

Sdb, which was the original boot disk is 74GB and all one partition.

Here are the requested files:

fdisk

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a4503

Device Boot Start End Blocks Id System
/dev/sda1 * 1 16708 134206978+ 7 HPFS/NTFS
/dev/sda2 16709 60801 354177022+ 5 Extended
/dev/sda5 16709 60044 348096388+ 83 Linux
/dev/sda6 60045 60801 6080571 82 Linux swap / Solaris

Disk /dev/sdb: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3e3a7485

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9038 72597703+ 7 HPFS/NTFS

/grub/menu.lst (see my original post for the appearance before modifications)

default 0
timeout 10

title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=b6b3da20-a4b0-4bce-9770-526ebbf2e29a ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=b6b3da20-a4b0-4bce-9770-526ebbf2e29a ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin
quiet

title Other operating systems:
root

title Microsoft Windows 2000 Professional
root (hd0,0)
chainloader +1
savedefault
makeactive

Thanks for your help.

charlemagneb
May 22nd, 2008, 05:26 AM
Maybe I should repeat, since this has been a long thread, that the original problem was (I thought) that I had two active MS boot partitions, one on sda and one on sdb. Grub would boot to the sdb partition, but sda got the blue screen of death. Interesting. I am not sure how this relates to the problems and resolution of thread 263712, but there you are.

Chuck

meierfra.
May 22nd, 2008, 06:16 AM
Reinstalling Grub is fairly easy. Boot from the ubuntu live CD, open a terminal and type


sudo grub

and at the "grub>" prompt:


root (hd0,4)
setup (hd0)
quit

That's all you need to do to reinstall grub.

It seems to me that your booting problem has nothing to do with grub: Your menu.lst looks fine and Win2K still didn't boot after ms-sys.

You might try "rootnoverify (hd0,0)" in place of "root (hd0,0)", but I doubt that it will make a difference a difference.


Are you able to access your Win2K/sda1 partition from Ubuntu:



sudo mkdir /media/sda1
sudo mount -t ntfs /dev/sda1 /media/Win2k
cd /media/sda1


Do you have a Windows CD? Try "fixboot and fixmbr" from the recovery console. (You will have to reinstall Grub again)
You might also run chkdsk.


But I have to admit, this looks like a Win2K problem to me, and I don't really know anything about Win2K.