Page 2 of 103 FirstFirst 12341252102 ... LastLast
Results 11 to 20 of 1028

Thread: How to install Grub from a live Ubuntu cd.

  1. #11
    Join Date
    Aug 2005
    Location
    Canada
    Beans
    1,081

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by true_friend View Post
    find /boot/grub/stag1
    this command is resulting can not find the file
    what i do for this????????
    Looks like it may be a typo. What about trying
    Quote Originally Posted by catlett
    find /boot/grub/stage1
    This step isn't necessary, it's only a convenient way of finding which partition grub's stage1 is on. If you know which hard drive and partition /boot/grub is on, you can simply bypass the find step, while following the other steps in catlett's guide, and plug in the proper values for the root (hdX,Y) command.

    e.g., if you've only one hard drive and /boot/grub is on the first partition

    Code:
     root (hd0,0)
    e.g., if you've only one hard drive and /boot/grub is on the second partition

    Code:
     root (hd0,1)
    Quote Originally Posted by catlett
    Thanks for the feed back. I have been worried I would forget something and it would effect someone's system. I hope you don't mind, I just copy/pasted your comments into the how to. They stated the issue and were to the point so why not use them? (as long as you don't object of course)
    No worries, glad to be of help. Even if most people probably have grub on the MBR, it's nice to have mention of how you can put it on a partition.
    Though if I knew it was going to be tacked on to the guide I'd have done a better proof read for grammar and coherence.
    Last edited by 5-HT; August 4th, 2006 at 01:52 AM.

  2. #12
    Join Date
    Apr 2006
    Location
    Switzerland
    Beans
    92
    Distro
    Ubuntu 11.04 Natty Narwhal

    Smile Re: How to install Grub from a live Ubuntu cd.

    Hi,

    I got my PCs MBR overwritten by XPs, boot loader. is it possible that instead of restoring GRUB Boot Loader, I somehow write the boot sector (512 bytes) to a file, and then add an entry for the file to boot.ini of ntloader? I remember I saw it somewhere, but dont remember now.

    Thanks for any hint.

  3. #13
    Join Date
    Aug 2005
    Location
    Canada
    Beans
    1,081

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by Jabran Asghar View Post
    Hi,

    I got my PCs MBR overwritten by XPs, boot loader. is it possible that instead of restoring GRUB Boot Loader, I somehow write the boot sector (512 bytes) to a file, and then add an entry for the file to boot.ini of ntloader? I remember I saw it somewhere, but dont remember now.

    Thanks for any hint.
    Does this help? http://www.ubuntuforums.org/showpost...36&postcount=9
    (thread: http://www.ubuntuforums.org/showthread.php?t=211370)

  4. #14
    Join Date
    Apr 2006
    Location
    Switzerland
    Beans
    92
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How to install Grub from a live Ubuntu cd.

    Yes, this is what I was looking for. Thanks for the link.

  5. #15
    Join Date
    May 2006
    Location
    Pakistan
    Beans
    425
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: How to install Grub from a live Ubuntu cd.

    my problem was not the stage spelling. but path
    root (hd0,0) was missing.

  6. #16
    catlett's Avatar
    catlett is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Mar 2006
    Location
    Boston, MA
    Beans
    1,861
    Distro
    Ubuntu 6.10 Edgy

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by true_friend View Post
    my problem was not the stage spelling. but path
    root (hd0,0) was missing.
    Grub need the grub files to run the setup. The path is where grub will find them. When you do the find command, it is telling you where the file are located on the hard drive. The root (hd?,?) is how you tell grub where the files are. The setup (hd?) is grub installing itself and the patyh you enter there is telling grub where you want it instaled.
    You can try running setup (hd0) to see what happens but it appears grub wasn't installed previously. If you know it, enter the path root is on even if grub isn't there. You may get lucky.

  7. #17
    Join Date
    Jun 2005
    Location
    Belgium,Antwerp
    Beans
    99
    Distro
    Xubuntu 6.10 Edgy

    Re: How to install Grub from a live Ubuntu cd.

    Thanks!
    Was exactly what i needed..
    I kept doing 'sudo grub-install '(hd0,0)'' which obviously didn't work
    Linux IS user-friendly, it's just picky about it's friends.

  8. #18
    Join Date
    Aug 2006
    Beans
    20

    Re: How to install Grub from a live Ubuntu cd.

    I follwed your procedure to the T, infact the live cd (6.06 LTS) took everything in beautifully. It even gave me the output that the grub has been succesfully loaded.

    I have a dual boot (windows 2000 and dapper). This is how my menu.1st looks like

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

    ## 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/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=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-26-386
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro quiet splash
    initrd /boot/initrd.img-2.6.15-26-386
    savedefault
    boot

    title Ubuntu, kernel 2.6.15-26-386 (recovery mode)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda2 ro single
    initrd /boot/initrd.img-2.6.15-26-386
    boot

    title Ubuntu, kernel 2.6.15-23-386
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda2 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 (hd0,1)
    kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda2 ro single
    initrd /boot/initrd.img-2.6.15-23-386
    boot

    title Ubuntu, memtest86+
    root (hd0,1)
    kernel /boot/memtest86+.bin
    boot

    ### 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/hda1
    title Windows 2000
    root (hd0,0)
    savedefault
    #makeactive
    chainloader +1


    Could I have a corrupted grub? If so..how do I go about rectifying it?

    Thanks in advance.

  9. #19
    catlett's Avatar
    catlett is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Mar 2006
    Location
    Boston, MA
    Beans
    1,861
    Distro
    Ubuntu 6.10 Edgy

    Re: How to install Grub from a live Ubuntu cd.

    That appears to be a perfectly fine grub menu. Is it having an issue?
    Right now it is booting with the 2.6.15-23-386 kernel to the second partition of your first hard drive, where it expects to find ubuntu. Are you getting into Ubuntu?
    It is also booting to the first partition of your first hard drive where it expects to find windows. Are you getting into windows?

    This file can be edited by any text editor as long as you have root priveleges. The file's path is /boot/grub/menu.lst.
    If you needed to access this document from Ubuntu, the commmand would be
    Code:
    sudo gedit /boot/grub/menu.lst
    But this appears to be a perfectly fine menu. It has windows on the first partition and ubuntu on the second partition.

  10. #20
    catlett's Avatar
    catlett is offline Chocolate Ubuntu Mocha Blend
    Join Date
    Mar 2006
    Location
    Boston, MA
    Beans
    1,861
    Distro
    Ubuntu 6.10 Edgy

    Re: How to install Grub from a live Ubuntu cd.

    Quote Originally Posted by Adrian_b View Post
    Thanks!
    Was exactly what i needed..
    I kept doing 'sudo grub-install '(hd0,0)'' which obviously didn't work
    Glad you found it and it worked. I drove myself crazy ever since I first started adding other distros to my system.
    I started with windows and ubuntu. Never had a problem, grub would install during the ubuntu install and that would be it.
    Once I started multi-booting and constantly installing,deleting partitions, installing another etc I would end up with grub issues.
    I never could find an easy way to install grub without being booted into a Linux distribution.
    Not for nothing but what good is "grub-install" when you can't boot into your desktop to issue the command?!
    My temporary solution was to install grub to a floppy on installation. Then I would have a copy of grub on the floppy that I could always use. Once the floppy booted me into my desktop I would issue grub-install.
    I even found out how to make a grub floppy (that is my only other how to) but it still wasn't what I wanted. I wanted a simple way to install grub without being in an installed Linux distro. I couldn't believe the grub developers didn't make a way to install from a boot disk. They did, of course, but it wasn't easy to find. The find, root, setup string is buried in the grub manual and it doesn't mention using a live CD. They state it as an alternative to grub-install. I then saw a mempis how to about using a live cd and find, setup etc. I am always looking for grub info so I bookmarked it to go into it later but I must not have saved it. I searched and searched but never found it again. I finally decided to look into it myself and see if it can be done. Once I knew it worked, I thought I would share it with others who are have grub issues.
    I hope this ends the agony of grub. As far as the "help I installed windows and grub is gone" or "grub was working yesterday but today I get error ##?

Page 2 of 103 FirstFirst 12341252102 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •