Announcement

Collapse
No announcement yet.

Grub / windows problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub / windows problem

    I installed windows 98(SE) but now i'm having some problems *rather big actually*,
    Win98 crashes after the splash screen,
    Grub is gone.

    I used SuperGrubDisk, and am now able to boot into linux via it,
    It seems all my data is just fine.
    But restoring GRUB from it doesnt work.
    Booting into XP doesnt wok either, because It then boots into win98
    Maybe Installing another bootloader will work?

    Please help,

    Dean.

    #2
    Re: Grub / windows problem

    What partitions have you got on your disk? 1 linux 1swap 1 windows?

    Anyway, if you installed windows last it will have wiped grub off your disk. As you can boot into your linux using the super grub CD, sudo or su to root depending on what your linux is and type grub-install hd0 (assuming you only have one disk) to reinstall grub on your mbr

    Comment


      #3
      Re: Grub / windows problem

      Hey,
      Thanks for your reply
      I'm a n00b when it comes to linux tho,
      Windows background *shrugs*

      Could you please make me a step by step way to fix it?
      Sorry for the trouble.

      Dean.

      Comment


        #4
        Re: Grub / windows problem

        You seem to have linux on your system - is it kubuntu? Can you get into your linux using the super grub disk as you indicate?

        If yes, open a terminal - and if kubuntu or ubuntu type

        sudo grub-install hd0

        If its another type of linux type su then your root password

        then grub-install hdo

        If this doesn't mean anything to you can you tell us exactly what is on your system and how you got it there?

        Comment


          #5
          Re: Grub / windows problem

          I currently have:

          Windows 98SE
          Windows XP
          Linux - Kubuntu

          I mangaged to get into Kubuntu via that super grub disk.

          so now:
          sudo grub-install hd0 via the konsole?


          Comment


            #6
            Re: Grub / windows problem

            Yes - that should reinstall Grub onto the mbr of hd0 which is the first (or only) disk in your bios booting order.

            Comment


              #7
              Re: Grub / windows problem

              About grub/partitions:

              Checking disks/partitions

              Example1 (first disk=hda, win/fat only)

              Code:
              :~$ sudo fdisk -l /dev/hda
              Disk /dev/hda: 60.0 GB, 60000000000 bytes
              255 heads, 63 sectors/track, 7294 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes

              Device Boot Start End Blocks Id System
              /dev/hda1 * 1 1459 11719386 c W95 FAT32 (LBA)
              /dev/hda2 1460 7294 46869637+ f W95 Ext'd (LBA)
              /dev/hda5 1460 1693 1879573+ b W95 FAT32
              /dev/hda6 1694 4494 22499001 b W95 FAT32
              /dev/hda7 4495 7294 22490968+ b W95 FAT32

              Example2 (second disk=hdb, win/linux mixed)

              Code:
              :~$ sudo fdisk -l /dev/hdb
              Disk /dev/hdb: 81.9 GB, 81964302336 bytes
              255 heads, 63 sectors/track, 9964 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes

              Device Boot Start End Blocks Id System
              /dev/hdb1 * 1 7228 58058878+ 83 Linux
              /dev/hdb2 7229 9963 21968887+ f W95 Ext'd (LBA)
              /dev/hdb5 7417 9963 20458746 b W95 FAT32
              /dev/hdb6 7229 7416 1510047 82 Linux swap / Solaris

              Third would be hdc...


              If you have sata disk.
              Example3 (first sata disk=sda, linux only)

              Code:
              :~$ sudo fdisk -l /dev/sda
              Disk /dev/sda: 250.0 GB, 250059350016 bytes
              255 heads, 63 sectors/track, 30401 cylinders
              Units = cylinders of 16065 * 512 = 8225280 bytes

              Device Boot Start End Blocks Id System
              /dev/sda1 * 1 15076 121097938+ 83 Linux
              /dev/sda2 15077 30152 121097970 83 Linux
              /dev/sda3 30153 30401 2000092+ 82 Linux swap / Solaris

              Second sata disk is sdb, third sata is sdc ...


              From /1/
              2 Naming convention

              The partition numbers are counted from zero, not from one.
              and
              GRUB does not distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type.
              So if you have 2 x pata (ide) and 1 x sata drives. To grub they could be:
              First: hda -> to grub hd0
              Second: hdb -> to grub hd1
              Third: sda -> to grub hd2


              Example4:
              Making grub to start kubuntu from sda1

              In the konsole:
              Code:
              :~$sudo grub
              Checking where is /boot/grub/stage1
              Code:
              grub> find /boot/grub/stage1
              (hd2,0)
              So kubuntu/linux grub is partition (hd2,0) (that is sda1). Tell grub it

              Code:
              grub>root (hd2,0)
              Filesystem type is ext2fs, partition type 0x83
              Putting grub into first disk mbr.

              Code:
              grub>setup (hd0)
              Checking if "/boot/grub/stage1" exists... yes
              Checking if "/boot/grub/stage2" exists... yes
              Checking if "/boot/grub/e2fs_stage1_5" exists... yes
              Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
              succeeded
              Running "install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd2,0)/boot/grub/stage
              2 /boot/grub/menu.lst"... succeeded
              Done.
              From/1/
              This command will install the GRUB boot loader on the Master Boot Record (MBR) of the first drive. If you want to put GRUB into the boot sector of a partition instead of putting it in the MBR, specify the partition into which you want to install GRUB:

              grub> setup (hd0,0)
              Quitting:

              Code:
              grub>quit

              /1/ GNU GRUB Manual 0.97
              http://www.gnu.org/software/grub/manual/grub.html
              Before you edit, BACKUP !

              Why there are dead links ?
              1. Thread: Please explain how to access old kubuntu forum posts
              2. Thread: Lost Information

              Comment


                #8
                Re: Grub / windows problem

                **EDIT**:

                Grub is back!,
                Problem is:

                When I try to boot Win XP it boots 98, which doesnt even boot but crashes over and over.
                Should I post my menu.lst now?

                Comment


                  #9
                  Re: Grub / windows problem

                  Good - so - we make progress - remember, reinstalling any Windows will always overwrite your Grub with the Windows bootloader.

                  Yes - post your /boot/grub/menu.lst but also the results of this command
                  sudo fdisk -l
                  see if you can interpret which partition it reports is for which Windows, so we know which partition has 98 and which has XP. If you can do that, then the answer on how to modify your menu.lst is contained in the reference to the manual that Rog131 kindly provided (below). But if not, it should be fairly simple to sort out

                  Comment


                    #10
                    Re: Grub / windows problem

                    Usage: fdisk [-l] [-b SSZ] [-u] device
                    E.g.: fdisk /dev/hda (for the first IDE disk)
                    or: fdisk /dev/sdc (for the third SCSI disk)
                    or: fdisk /dev/eda (for the first PS/2 ESDI drive)
                    or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices)
                    ...

                    And:

                    # 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-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

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

                    ## hiddenmenu
                    # Hides the menu by default (press ESC to see the menu)
                    hiddenmenu

                    # 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/hdb5 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

                    ## altoption boot targets option
                    ## multiple altoptions lines are allowed
                    ## e.g. altoptions=(extra menu suffix) extra boot options
                    ## altoptions=(recovery mode) 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

                    ## 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

                    ## ## End Default Options ##

                    title Ubuntu, kernel 2.6.15-23-386
                    root (hd1,4)
                    kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdb5 ro quiet splash
                    initrd /boot/initrd.img-2.6.15-23-386
                    savedefault
                    boot

                    title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
                    root (hd1,4)
                    kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hdb5 ro single
                    initrd /boot/initrd.img-2.6.15-23-386
                    boot

                    title Ubuntu, memtest86+
                    root (hd1,4)
                    kernel /boot/memtest86+.bin
                    boot

                    ### END DEBIAN AUTOMAGIC KERNELS LIST

                    title Win XP
                    root (hd0,0)
                    savedefault
                    makeactive
                    chainloader +1


                    Now:
                    I do know that the linux drive is 10 GB
                    WinXP 80 GB
                    and Win98 is about 600 mb or so.

                    Comment


                      #11
                      Re: Grub / windows problem

                      You need to type sudo fdisk -l (thats a small letter L at the end) it looks like you've just typed sudo fdisk - so its reported its usage rather than the results of the command

                      What I can see from your menu.lst is not what I was expecting. You have Windows on your first disk - and Kubuntu on your second! I didn't realise you were using separate drives - never mind - all worked out for the best And it makes it easier to administer.

                      you can modify the command so that we see what is on each disk separately if you want

                      sudo fdisk /dev/hda
                      sudo fdisk /dev/hdb



                      Comment


                        #12
                        Re: Grub / windows problem

                        Oh sorry :P

                        here:

                        Disk /dev/hda: 80.0 GB, 80026361856 bytes
                        255 heads, 63 sectors/track, 9729 cylinders
                        Units = cylinders of 16065 * 512 = 8225280 bytes

                        Device Boot Start End Blocks Id System
                        /dev/hda1 * 1 64 514048+ b W95 FAT32
                        /dev/hda3 1276 9728 67898722+ f W95 Ext'd (LBA)
                        /dev/hda5 1276 9728 67898691 7 HPFS/NTFS

                        Disk /dev/hdb: 203.9 GB, 203928109056 bytes
                        255 heads, 63 sectors/track, 24792 cylinders
                        Units = cylinders of 16065 * 512 = 8225280 bytes

                        Device Boot Start End Blocks Id System
                        /dev/hdb1 1 1275 10241406 f W95 Ext'd (LBA)
                        /dev/hdb2 1276 8924 61440592+ 7 HPFS/NTFS
                        /dev/hdb3 8925 21672 102398310 7 HPFS/NTFS
                        /dev/hdb4 21673 24792 25061400 7 HPFS/NTFS
                        /dev/hdb5 * 1 1218 9783522 83 Linux
                        /dev/hdb6 1219 1275 457821 82 Linux swap / Solaris

                        Btw: thanks again for helping me

                        Comment


                          #13
                          Re: Grub / windows problem

                          Woah - this is scary!!!

                          OK - what do we know - Kubuntu is on hdb5 and kubuntu swap is on hdb6 - this is good!!

                          We know (I think) that W98 is on Hda1 - because thats what Grub boots into - but what are all your other partitions? Have you any idea what you have on which partition? Can yu say what disk XP is on (because I guess that its XP we are trying to find) If not, we'll have to go into linux, mount these partitions, and see what is on them.

                          Comment


                            #14
                            Re: Grub / windows problem

                            I'm an andvanced user in XP so, thats why i've got all these patitions, storage, room for other os'ses, etc. etc. :P, anyway:

                            xd, they're all mounted 
                            Stupid I didnt think of this earlier tho, LOL.

                            Win98 is hda1
                            Xp is on hda5
                            Linux is hdb5

                            hdb4 = Storage
                            hdb3 = Storage
                            hdb2 = Storage

                            Sorry for not telling you before,
                            Just realised I could read what number they have, when mounted, d'oh!:P

                            Comment


                              #15
                              Re: Grub / windows problem

                              So now we know where to find stuff but, alas, we still may have problems because of deficiencies in the Window bootloader which means that it doesn't like being booted unless its on the first primary partition, so as you have multiple primary partitions (hda1 and hda5) we need to hide them. I know the theory but I've never done it personally - so this is a bit of an experiment.

                              We need to edit the menu.lst using sudo so do something like

                              kdesu kate /boot/grub/menu.lst

                              Take this bit at the bottom

                              title Win XP
                              root (hd0,0)
                              savedefault
                              makeactive
                              chainloader +1

                              and copy it. The only bits you are changing are the bits that start with "title" and "root"

                              Change the title of the first one so that it reads Title Windows 98SE
                              Then add these lines
                              unhide (hd0,0)
                              hide (hd0,4)


                              Change the root line of the second so that it reads root (hd0,4)
                              Then above that add these lines
                              hide (hd0,0)
                              unhide (hd0,4)


                              so you end up with:

                              title Windows98 SE
                              unhide (hd0,0)
                              hide (hd0,4)
                              root (hd0,0)
                              savedefault
                              makeactive
                              chainloader +1

                              title Win XP
                              hide (hd0,0)
                              unhide (hd0,4)
                              root (hd0,4)
                              savedefault
                              makeactive
                              chainloader +1

                              Save the file, reboot - hopefully problem solved! You'll have worked out by now that Grub counts its disks and its partitions from 0 so (hd0,4) means the 5th partition of the first disc. If I've got the hiding/unhiding bit wrong then you may need to repost with that problem and have it answered by somebody with experience of multibooting windows - XP alone is quite enough for me! :P

                              I guess your W98 is Borked so you'll end up re-installing - just remember the grub-install option to put grub back and you'll be fine

                              btw - NTFS is still sometimes problematic in Linux - if you changed your storage partitions to Fat32 you could more easily read/write in kubuntu (although its still possible in NTFS) - just a thought

                              Comment

                              Working...
                              X