1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

To delete grub or not delete grub, that is the question.

Discussion in 'Linux - General discussion' started by Skitzy, Nov 19, 2007.

  1. Skitzy

    Skitzy Regular member

    Joined:
    Feb 14, 2006
    Messages:
    282
    Likes Received:
    0
    Trophy Points:
    26
    I have been wanting to try an rpm based distro (Redhat) out just for kicks and giggles for a while now and just never have. So I'm currently downloading the latest copy of Fedora (cause I'm poor) but heres my problem. I dual boot and I have really bricked the sh.. outta my linux install but my windows side is in great shape. So what I plan on doing is deleting the linux partition and installing fedora but should I delete the grub partition too and lose my bootloader for windows in the process and edit grub after the install of fedora (seems really redundant to me) Or will fedora's install of grub pickup that I have windows setting there (w/o a bootloader) and add it's entry to grub for me? Or will I have a working install of fedora setting there parallel to a M.I.A. windows? I could have figured this one out the hard way I guess but I figured it was worth an ask.

    not that you needed a pic but why not?
    http://usera.imagecave.com/anotherbogusname/Partitions.JPG
    (It appears windows view is including grub w/ swap)

    EDIT: got another question if anyones got an answer. I don't see Gparted in the list for fedora, no partition editor? Or different one?
     
    Last edited: Nov 19, 2007
  2. slugfuk

    slugfuk Guest

    Hi Skitzy.. and what a good question it is ;-)

    Personally I'd leave grub where it is.. possibly copying the menu.list file to something (damn.. you can even write it down if needs must) and just install fedora over the broken linux partition.. Eventually it will get to the "install grub to the MBR.. and then let it and see what happens. Have a copy of puppy or killbill hanging about in case things don't work so well.. then you should be able to edit the /boot/grub/menu.list file manually and get everything back working as it should.

    the grub menu file should contain something like this to boot windows...

    title Windows
    root (hd0,0)
    makeactive
    chainloader +1

    after all the linux entries.

    No Gparted?? strange, but puppy has one.. I think fedora is still using cfdisk at runlevel2, though as I haven't seen fedora/redhat in a long time I can't swear to that.
     
    Last edited by a moderator: Nov 19, 2007
  3. Skitzy

    Skitzy Regular member

    Joined:
    Feb 14, 2006
    Messages:
    282
    Likes Received:
    0
    Trophy Points:
    26
    Thanks for replying, I opted to leave everything as is and try a direct install using x86_64 dvd and just edit and format the existing partitions and all went well, as far as anaconda but when I get to the part of adding GRUB, I get a bug everytime. I checked the media, no problem there. I'm just not sure. As far as my Windows partition goes.. it is fine still yet.. just have to use "Supergrub" to get there. (4now, I plan on fixing that later) I'm thinking of just wiping it all clean and going from there. The only major data loss is all tied up in games so in other words, not important (just painful) but I'd really like to figure this out. Seems very trivial..

    EDIT: actually what I'm going to do is what I thought to do in the first place.. go into windows and delete all the partitions not pertaining to windows and then try my install again. I'll update you tomorrow.
     
    Last edited: Nov 21, 2007
  4. slugfuk

    slugfuk Guest

  5. Skitzy

    Skitzy Regular member

    Joined:
    Feb 14, 2006
    Messages:
    282
    Likes Received:
    0
    Trophy Points:
    26
    Yeah, that's the disc.. although that isn't where I found it. That has been a gem in my collection for about 8mo. now. I know there are other ways or other distros one could use to repair grub but that is the method I have used for quite sometime now. Anyhow, just wanted to tell you that worked. Deleting those partitions entirely and then proceeding w/ the install (basic setup using blank space only) has me up and running. I am still waiting patiently on those lengthy updates so I won't know the condition of grub for a while but I have successfully mounted the windows volume to ensure it is still intact. I'm a bit concerned because after the initial install it did reboot and I only seen one line of grub (the grub loading message) before it did it's own thing, but Fedora creates user account on the second boot. So what I'm hoping is that it skipped grub menu for that reason. If not I may need a hand w/ grub if anyone is willing. I have never really had to poke around w/ grub much. (Supergrub spoiled me) Anyways, I'll kepp you posted.
     
  6. Skitzy

    Skitzy Regular member

    Joined:
    Feb 14, 2006
    Messages:
    282
    Likes Received:
    0
    Trophy Points:
    26
    (next day) <happy turkey day 4 those that celebrate it>

    Ok, it's confirmed.. Windows is there but it wasn't an active partition during the install so Fedora completely ignored adding it to grub. Using Supergrub it will correct the boot of windows but then Fedora isn't active and vice versa. So I'm actually going to have to edit grub myself.. Google save me! Anyways, if anyone that has edited grub happens across this please feel free to drop me a line.
     
  7. varnull

    varnull Guest

    I've edited grub more than once (notably kubuntu in 2 minutes on a sata setup)

    When it's on it's own windows boots?? but with fedora it wasn't seen so no grub menu entry.. Does that sound something like the situation?

    the lines you need to add were posted earlier, but for a fuller overview of the process here is the full grub reference page http://www.linuxtopia.org/online_books/linux_system_administration/gnu_grub_administration_guide/

    what you need to know is exactly where your fedora and windows installs are located on the physical devices.. fedora entries should be OK


    title Windows
    root (hd0,0)
    makeactive
    chainloader +1

    (the 0,0 is first drive..first partition there, so for second drive 4th partition it will be (hd2,4) and so on.

    You can change the time grub waits before booting to the default. Look for the time=5 or whatever..

    I think a look at my menu.lst file will reveal a few things..

    Code:
    # 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		5
    
    # 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/hda2 ro
    
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,1)
    
    ## 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=
    
    ## 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=(single-user 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		Debian GNU/Linux, kernel 2.6.18-5-686
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.18-5-686 root=/dev/hda2 ro 
    initrd		/boot/initrd.img-2.6.18-5-686
    savedefault
    
    title		Debian GNU/Linux, kernel 2.6.18-5-686 (single-user mode)
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.18-5-686 root=/dev/hda2 ro single
    initrd		/boot/initrd.img-2.6.18-5-686
    savedefault
    
    ### END DEBIAN AUTOMAGIC KERNELS LIST 
    so if I had windows kicking about on a spare drive, and madness drove me to want to boot it I would probably start by hanging the 3rd hdd in and editing the file to look like this..

    Code:
    title		Debian GNU/Linux, kernel 2.6.18-5-686
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.18-5-686 root=/dev/hda2 ro 
    initrd		/boot/initrd.img-2.6.18-5-686
    savedefault
    
    title		Debian GNU/Linux, kernel 2.6.18-5-686 (single-user mode)
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.18-5-686 root=/dev/hda2 ro single
    initrd		/boot/initrd.img-2.6.18-5-686
    savedefault
    
    title            Windows
    root             (hd3,0)
    makeactive
    chainloader +1
    
    
    and then seeing if it will boot.. don't know if it matters, but try setting the windows partition flag bootable also?
     
  8. Skitzy

    Skitzy Regular member

    Joined:
    Feb 14, 2006
    Messages:
    282
    Likes Received:
    0
    Trophy Points:
    26
    I eventually corrupted windows to the point of not being bootable at all and had to just DBAN the whole thing and start fresh (this is my cure all for when the headache is too much) I hate I had to go that route but what can ya' do? Anyways, I did learn a valuable lesson.. make a note of what OS is on what partition next time. I had trouble finding the NTFS partion. I tried every series of numbers I could but all I could find was the fat recovery partition and gave up. I put "Supergrub" back in and booted of it and tried the (BETA) Fix boot of windows (partition) method and that killed any chance of windows booting again. I'm not sure what happened. I tried to repair using a windows disc but no luck. So that is how I ended up boot'N'nuking. But thank you all for your efforts . I'll at least know what to do next time so if it's any consolation you did help.
     

Share This Page