Kinda fixed - was Grub refuses to work -XP+Gloria

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Kinda fixed - was Grub refuses to work -XP+Gloria

Postby ok-milk on Tue Aug 25, 2009 10:25 pm

Grub is now working, but neither of my OSes are loading - I get a NETDLR missing when I try to load XP, and invalid parition (error 22) when I try to boot Gloria

Here's what I did:
I followed the steps in this thread

I am still unsure how the drive/parition maps to GRUB's numbering system - I think that is my issue at this point.

I will post the results of the script in a reply - this post is getting long

---------------------------------------------------------------
Previous Post
---------------------------------------------------------------

I just installed Gloria on one of my two HDs, an IDE drive that also has XP installed in the first partition. I have installed successfully twice (I deleted the parition and recreated it at one point to make sure it was an extended partition), but I never see the Grub screen when I boot - it always goes directly to XP. I made sure I had the right boot order in my BIOS, I even played with device.map to no avail

I have another SATA drive where I attempted to get Suse installed a few months back (whole 'nother story), that I mention only because it appears that it ends up as 1) sda1 2) bootable. (The disk was formatted, no residual Suse)
I am not sure if this matters or not since device.map says this:
(hd0) /dev/sda
(hd1) /dev/sdb

... and menu.lst says this:
title Linux Mint 7 Gloria KDE, kernel 2.6.28-11-generic
root (hd1,4)

I was going to remove the b flag from sda1 but chickened out :) Wasn't sure if it was relevant or not.

Here is my HD info, along with grub info - let me know if anyone needs more info. I suspect I am missing something obvious here - thanks in advance for the help.

Code: Select all
mint@mint / $ sudo fdisk -l

[b]Disk /dev/sda:[/b] 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x25e85c8c                   

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       18489   148504860    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.                 
/dev/sda2           18489       38913   164063781    6  FAT16   

[b]Disk /dev/sdb:[/b] 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00450045                   

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        4177    33551721    7  HPFS/NTFS
/dev/sdb2            4178       14593    83666520    5  Extended
/dev/sdb5            4178       13985    78782728+  83  Linux
/dev/sdb6           13986       14593     4883728+  82  Linux swap / Solaris



                        cfdisk (util-linux-ng 2.14.2)

                             Disk Drive: /dev/sdb5
                        Size: 80673513984 bytes, 80.6 GB
              Heads: 255   Sectors per Track: 63   Cylinders: 9807

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
                            Pri/Log   Free Space                       80665.33


## ## End Default Options ##

title           Linux Mint 7 Gloria KDE, kernel 2.6.28-11-generic
root            (hd1,4)                                         
kernel          /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb5 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,4)                                                       
kernel          /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb5 ro single
initrd          /boot/initrd.img-2.6.28-11-generic

title           Linux Mint 7 Gloria KDE, memtest86+
root            (hd1,4)
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/sdb1
title           Microsoft Windows XP Professional
rootnoverify    (hd1,0)
savedefault
makeactive
map             (hd0) (hd1)
map             (hd1) (hd0)
chainloader     +1


mint@mint /media/disk/boot/grub $ more device.map
(hd0)   /dev/sda
(hd1)   /dev/sdb
(hd2)   /dev/sdf
mint@mint /media/disk/boot/grub $
Last edited by ok-milk on Mon Aug 31, 2009 1:11 am, edited 2 times in total.
ok-milk
Level 1
Level 1
 
Posts: 4
Joined: Tue Aug 25, 2009 6:06 pm

Linux Mint is funded by ads and donations.
 

Re: UPDATED:OSes not booting-was Grub refuses to work -XP+Gloria

Postby ok-milk on Wed Aug 26, 2009 4:19 pm

Results from the boot info script:

Code: Select all

============================= Boot Info Summary: ==============================

 => Grub0.97 is installed in the MBR of /dev/sda and looks on boot drive #2 in
    partition #5 for /boot/grub/stage2 and /boot/grub/menu.lst.
 => Grub0.97 is installed in the MBR of /dev/sdb and looks on the same drive
    in partition #5 for /boot/grub/stage2 and /boot/grub/menu.lst.
 => No boot loader is installed in the MBR of /dev/sdf

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sda1 has
                       290048544 sectors, but according to the info from
                       fdisk, it has 297009720 sectors.
    Operating System: 
    Boot files/dirs:   

sda2: _________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:
mount: unknown filesystem type ''

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdb5: _________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Linux Mint 7 Gloria - KDE
                       Community Edition
    Boot files/dirs:   /boot/grub/menu.lst /etc/fstab

sdb6: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdf1: _________________________________________________________________________

    File system:       vfat
    Boot sector type:  -
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x25e85c8c

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   297,009,782   297,009,720   7 HPFS/NTFS
/dev/sda2         297,009,783   625,137,344   328,127,562   6 FAT16


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00450045

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63    67,103,504    67,103,442   7 HPFS/NTFS
/dev/sdb2          67,103,505   234,436,544   167,333,040   5 Extended
/dev/sdb5          67,103,568   224,669,024   157,565,457  83 Linux
/dev/sdb6         224,669,088   234,436,544     9,767,457  82 Linux swap / Solaris


Drive: sdf ___________________ _____________________________________________________

Disk /dev/sdf: 2040 MB, 2040528896 bytes
29 heads, 28 sectors/track, 4908 cylinders, total 3985408 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Partition  Boot         Start           End          Size  Id System

/dev/sdf1                 247     3,985,407     3,985,161   6 FAT16


blkid -c /dev/null: ____________________________________________________________

/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="E02CFF992CFF68C4" LABEL="Files" TYPE="ntfs"
/dev/sdb1: UUID="7A5485ED5485AC87" LABEL="Windows" TYPE="ntfs"
/dev/sdb5: UUID="210bedcc-bd53-4548-bf88-8ffc909e525f" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb6: UUID="10538383-8c98-481f-9a13-62c2f2c4b733" TYPE="swap"
/dev/sdf1: SEC_TYPE="msdos" UUID="0471-5097" TYPE="vfat"

=============================== "mount" output: ===============================

proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/modules/2.6.28-11-generic/volatile type tmpfs (rw,mode=0755)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)


================================ sdb1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn

=========================== sdb5/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default      0

## Graphical boot menu location
gfxmenu=/boot/gfxmenu/linuxmint.message

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout      10

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title      Windows 95/98/NT/2000
# root      (hd0,0)
# makeactive
# chainloader   +1
#
# title      Linux
# root      (hd0,1)
# kernel   /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sdb5 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,4)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title      Linux Mint 7 Gloria KDE, kernel 2.6.28-11-generic
root      (hd1,4)
kernel      /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb5 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,4)
kernel      /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb5 ro single
initrd      /boot/initrd.img-2.6.28-11-generic

title      Linux Mint 7 Gloria KDE, memtest86+
root      (hd1,4)
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/sdb1
title      Microsoft Windows XP Professional
rootnoverify   (hd0,0)
savedefault
makeactive
map      (hd0) (hd1)
map      (hd1) (hd0)
chainloader   +1


=============================== sdb5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdb5 during installation
UUID=210bedcc-bd53-4548-bf88-8ffc909e525f /               ext3    relatime,errors=remount-ro 0       1
# swap was on /dev/sdb6 during installation
UUID=10538383-8c98-481f-9a13-62c2f2c4b733 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

=================== sdb5: Location of files loaded by Grub: ===================


 100.5GB: boot/grub/menu.lst
 100.5GB: boot/grub/stage2
 100.6GB: boot/initrd.img-2.6.28-11-generic
 100.6GB: boot/vmlinuz-2.6.28-11-generic
 100.6GB: initrd.img
 100.6GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============

sdc sdd sde
ok-milk
Level 1
Level 1
 
Posts: 4
Joined: Tue Aug 25, 2009 6:06 pm

Re: UPDATED:OSes not booting-was Grub refuses to work -XP+Gloria

Postby Husse on Thu Aug 27, 2009 6:14 am

It is not all that easy to get to grips here
You have both Mint and XP on the same drive, correct?
This is sdb and sda is empty? Correct?
sdb is IDE and sda SATA?
If so it is hard to switch between sdb and sda
Check and if sdb is secondary master, change it to primary - it might make it sda, but I can't tell for sure as that depends on the motherboard
But you have grub in the mbr of both disks, that may not be so good
Apart from that I don't see anything obviously wrong
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: UPDATED:OSes not booting-was Grub refuses to work -XP+Gloria

Postby ok-milk on Thu Aug 27, 2009 11:37 am

Husse, thanks for the input :D - even though I can't boot, it is actually a relief to hear that I am not missing anything obvious. I read over the Grub manual and a bunch of related threads until it all started blending together. I was beginning to wonder how I got out of bed in the morning without grub installed in a partition of my brain stem :)

Yes to all the questions - XP and Mint are loaded on an IDE drive (sdb) which is the secondary master in my BIOS - primary master is my DVD drive, I am not exactly sure why this is. My sda is an SATA drive that has some files but no OS loaded.

Would it help to remove grub from sda in this case? I will probably give it a shot either way, but I want to be sure I understand how or why that would have an impact since I went from grub not showing up (installed on sda) to grub showing up but OS not booting (grub installed on sda and sdb). It seems like the instance of grub on sda is not being invoked in either situation. Forgive what might be a noob question, but why would sda have an MBR?


Also for my own, and possibly the benefit of anyone else having boot/grub issues, I wanted to get confirmation on this:
The designations for the hard drives and partitions in grub are absolute and not relative to where Grub is installed - that is to say, even though Grub has a different numbering system, sda will always be hd0, sdb will be hd1 in the grub configuration *no matter where grub is installed*. Another way to put this is if the kernel and grub are installed on sdc3, grub will need to look at (hd2,4) and not (hd0,4). I ask this because a few documents are either not clear or suggest otherwise (but I think I have confirmed this by trying going to grub CLI and doing a root (hdX,Y,) where X and Y are invalid locations for my linux install, and getting an error)

I will play around with my primary/secondary IDE master setup (although I may break the last/only means to boot my PC now - via live CD) and post results. Fingers crossed. Thanks for the help, and let me know if you can think of anything else.
ok-milk
Level 1
Level 1
 
Posts: 4
Joined: Tue Aug 25, 2009 6:06 pm

Re: UPDATED:OSes not booting-was Grub refuses to work -XP+Gloria

Postby Husse on Fri Aug 28, 2009 6:20 am

but why would sda have an MBR?

Well, you want to use the disk I suppose and for that the MBR is essential
It has a table of the primary partitions and any request to read/write begins with a look at that table, followed by a look in the table in the PBR which in turn sends you to the table that contains the records of where things are located in that partition - in FAT that's FAT :)
After the first look up this is cached....
Your thoughts about "grub numbering" are correct - BUT - and this is the problem - what is considered sda or sdb can vary depending on how the motherboard copes with adding and removing disks
If you have a primary master, it is supposed to be sda (and mostly is) If you remove it, the secondary master (sdb) now becomes primary and thus sda - more about that here
Grub should not be installed in more than one MBR (but can be installed to several partitions in their PBR) because of the risk for confusion
I guess the one grub is a remnant from the distribution you deleted....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Kinda fixed - was Grub refuses to work -XP+Gloria

Postby ok-milk on Mon Aug 31, 2009 1:32 am

Just a quick update in hopes this helps someone:

I changed my IDE HD to primary master - this did not help, same results trying to boot either OS. My next step was to uninstall grub from the SATA (drive), but instead, I reinstalled Gloria on my IDE drive without the SATA connected. This worked. As long as I keep the SATA drive disconnected, that is. If I reconnect it, I am able to boot to XP, but not Mint. I get the same error if I try to boot Mint (22), which leads me down the same path that the numbering of the drive and partitions can't be reconciled between grub and the kernel, somewhere in the process. I was happy enough to be able to boot to anything, and to keep my SATA file storage drive disconnected for now.

The afterglow lasted until the fifth or sixth black screen of death - long story short, thanks to ATI dropping support of my 9600, it looks like I am going to have to revert to the LTS version or find another distro that supports 9.3 ATI drivers and (hopefully) a newer version of KDE (ie, and older version of xwindows) - If anyone has any suggestions, including getting to a stable version of 8.0.4/KDE4.X, I would appreciate them

Husse, thanks again for the help on this
ok-milk
Level 1
Level 1
 
Posts: 4
Joined: Tue Aug 25, 2009 6:06 pm


Return to Installation & Boot

Who is online

Users browsing this forum: Bing [Bot] and 18 guests