Page 51 of 103 FirstFirst ... 41495051525361101 ... LastLast
Results 501 to 510 of 1028

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

  1. #501
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

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

    k3ntegra, you have at least three HHDs, so your set up is not as simple. What Grub error are you getting on start up? Do you see the Grub menu on start up? Also post the following from a Live CD:
    Code:
    sudo fdisk -lu
    sudo mount /dev/sdc8 /mnt
    cat /mnt/boot/grub/menu.lst

  2. #502
    Join Date
    Aug 2008
    Beans
    38

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

    Quote Originally Posted by caljohnsmith View Post
    k3ntegra, you have at least three HHDs, so your set up is not as simple. What Grub error are you getting on start up? Do you see the Grub menu on start up? Also post the following from a Live CD:
    Code:
    sudo fdisk -lu
    sudo mount /dev/sdc8 /mnt
    cat /mnt/boot/grub/menu.lst
    i get grub error 22 at startup and error 15 in super grub cd

    Code:
    ubuntu@ubuntu:~$ sudo fdisk -lu
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xa1c95ffb
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63    83891429    41945683+  82  Linux swap / Solaris
    /dev/sda2        83891430   530578754   223343662+   7  HPFS/NTFS
    /dev/sda3       530578755   763360604   116390925    7  HPFS/NTFS
    /dev/sda4       763360605   976768064   106703730    7  HPFS/NTFS
    
    Disk /dev/sdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x0f120f11
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1           16065    75441239    37712587+   f  W95 Ext'd (LBA)
    /dev/sdb2   *    75441240   312576704   118567732+   7  HPFS/NTFS
    /dev/sdb5           16128    75441239    37712556    7  HPFS/NTFS
    
    Disk /dev/sdc: 320.0 GB, 320072933376 bytes
    16 heads, 63 sectors/track, 620181 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x963c764f
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1            1008   625140431   312569712    f  W95 Ext'd (LBA)
    /dev/sdc5            1071   313197695   156598312+   7  HPFS/NTFS
    /dev/sdc6       313197759   323501471     5151856+   e  W95 FAT16 (LBA)
    /dev/sdc7       397084527   625140335   114027904+   7  HPFS/NTFS
    /dev/sdc8       323501535   393968735    35233600+  83  Linux
    /dev/sdc9       393968799   397084463     1557832+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/sdd: 2030 MB, 2030043136 bytes
    255 heads, 63 sectors/track, 246 cylinders, total 3964928 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00717db6
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1              63     3964927     1982432+   e  W95 FAT16 (LBA)
    Partition 1 has different physical/logical endings:
         phys=(245, 254, 63) logical=(246, 205, 23)
    ubuntu@ubuntu:~$ sudo mount/dev/sdc8 /mnt
    sudo: mount/dev/sdc8: command not found
    ubuntu@ubuntu:~$ sudo mount /dev/sdc8 /mnt
    ubuntu@ubuntu:~$ cat /mnt/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-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 use 'savedefault' 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=UUID=f333669b-b8f5-42fb-9bb6-70f083137076 ro
    
    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0
    
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd2,7)
    
    ## 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=(recovery) 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
    
    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false
    
    ## ## End Default Options ##
    
    title		Ubuntu 8.04.1, kernel 2.6.24-19-generic
    root		(hd2,7)
    kernel		/boot/vmlinuz-2.6.24-19-generic root=UUID=f333669b-b8f5-42fb-9bb6-70f083137076 ro quiet splash
    initrd		/boot/initrd.img-2.6.24-19-generic
    quiet
    
    title		Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
    root		(hd2,7)
    kernel		/boot/vmlinuz-2.6.24-19-generic root=UUID=f333669b-b8f5-42fb-9bb6-70f083137076 ro single
    initrd		/boot/initrd.img-2.6.24-19-generic
    
    title		Ubuntu 8.04.1, memtest86+
    root		(hd2,7)
    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/sdb2
    title		Windows NT/2000/XP (loader)
    root		(hd1,1)
    savedefault
    makeactive
    map		(hd0) (hd1)
    map		(hd1) (hd0)
    chainloader	+1
    
    
    # This entry automatically added by the Debian installer for an existing
    # linux installation on /dev/sdc6.
    title		Ubuntu 8.04.1 (8.04) (on /dev/sdc6)
    root		(hd2,5)
    kernel		/boot/vmlinuz-2.6.24-19-generic root=/dev/sdc6 
    initrd		/boot/initrd.img-2.6.24-19-generic
    savedefault
    boot
    
    ubuntu@ubuntu:~$

  3. #503
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

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

    Is the Grub error 22 on start up before you see a Grub menu, or after you select an OS entry in the Grub menu?

  4. #504
    Join Date
    Aug 2008
    Beans
    38

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

    it is before i see an os selection menu. I wouldnt mind deleting the partition that contains windows xp on the 160gb harddrive, unfortunately gparted wont let me.

  5. #505
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

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

    Quote Originally Posted by k3ntegra View Post
    it is before i see an os selection menu. I wouldnt mind deleting the partition that contains windows xp on the 160gb harddrive, unfortunately gparted wont let me.
    That may be part of the issue--what do you mean gparted won't let you delete that partition? Are you running gparted from a Live CD with:
    Code:
    gksudo gparted
    What does that show or what is the problem?

  6. #506
    Join Date
    Aug 2008
    Beans
    38

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

    Quote Originally Posted by caljohnsmith View Post
    That may be part of the issue--what do you mean gparted won't let you delete that partition? Are you running gparted from a Live CD with:
    Code:
    gksudo gparted
    What does that show or what is the problem?
    when i ran gparted to delete and reformat the partition with windows on it and then clicked apply i got an error message

    when i run the code it gives the following

    Code:
    ubuntu@ubuntu:~$ gskudo gparted
    bash: gskudo: command not found
    ubuntu@ubuntu:~$ gksudo gparted
    ======================
    libparted : 1.7.1
    ======================
    Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.
    Input/output error during read on /dev/fd0
    Unable to open /dev/scd0 read-write (Read-only file system).  /dev/scd0 has been opened read-only.
    Unable to open /dev/scd0 read-write (Read-only file system).  /dev/scd0 has been opened read-only.
    Unable to open /dev/scd0 - unrecognised disk label.
    edit:
    i was able to reformat the partition with xp on it to an ext3, and now windows is no more, i'll try to give it try now..

    when i tried SUDO grub with (hd0,0) instead of just (hd0), i got a "failed" message.

    Code:
    find /boot/grub/stage1
     (hd2,7)
    grub> root (hd2,7)
    root (hd2,7)
    grub> setup (hd0,0)
    setup (hd0,0)
     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,0)"... failed (this is not fatal)
     Running "embed /boot/grub/e2fs_stage1_5 (hd2,7)"... failed (this is not fatal)
     Running "install /boot/grub/stage1 d (hd0,0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
    Done.
    grub>
    edit2:
    still getting the same error after deleting the partition with windows on it..
    Last edited by k3ntegra; August 31st, 2008 at 07:37 PM.

  7. #507
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

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

    After you get Error 22, can you get to a GRUB prompt? You might have to press ESC, return or space.

    If you can get to a grub prompt, what output do you see if you type
    Code:
    geometry (hd2)
    geometry (hd1)
    geometry (hd0)
    geometry (hd3)
    One of these should show a drive with five partitions (it does not show extended partitions). Which one is it?

  8. #508
    Join Date
    Aug 2008
    Beans
    38

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

    Quote Originally Posted by unutbu View Post
    After you get Error 22, can you get to a GRUB prompt? You might have to press ESC, return or space.

    If you can get to a grub prompt, what output do you see if you type
    Code:
    geometry (hd2)
    geometry (hd1)
    geometry (hd0)
    geometry (hd3)
    One of these should show a drive with five partitions (it does not show extended partitions). Which one is it?
    i didn't get a grub prompt after pressing those keys, i tried all the and even some alt keys and no response. all i could do was ctrl alt del to do a system restart.

  9. #509
    Join Date
    Mar 2008
    Beans
    4,715
    Distro
    Ubuntu 9.10 Karmic Koala

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

    k3ntegra, when you install GRUB, GRUB uses Linux's drive order to number the drives. Linux sees /dev/sdc as your third drive. When you boot, GRUB uses the BIOS's drive order to number the drives. Usually Linux and the BIOS agree on the drive order, but in some cases, they don't. I am beginning to suspect that this is happening in your case.

    You can try to fix this problem by physically unplugging your drives from the data cable or USB ports and reconnecting them in different locations. I am not familiar with the ins-and-outs of master vs. slave drives, setting dip switches and so forth, so I shy away from this solution. However, if you understand what is needed to swap drive locations, then this might be the easiest way .

    If you do not want to swap the drives, there is also a way to fix this using /boot/grub/device.map. See http://ubuntuforums.org/showpost.php...11&postcount=9 and http://users.bigpond.net.au/hermanzo...htm#device.map.


    There is one problem. I don't know how to determine a priori what your BIOS thinks is your drive order. If we unplug the 2GB flash drive, we have 3 drives to worry about. There are then 6 cases:

    Each line of the table below shows the association between the drives in GRUB's (hdx) terminology and Linux's /dev/sdy terminology:

    Case 1:
    Code:
    GRUB using BIOS order         Linux order       # This is the default order that you are currently using
    (hd0)                         /dev/sda
    (hd1)                         /dev/sdb
    (hd2)                         /dev/sdc          # Linux is on sdc
    Case 2:
    Code:
    GRUB using BIOS order         Linux order       # We know Linux is not booting when we 
    (hd1)                         /dev/sda		# associate /dev/sdc with (hd2), so    
    (hd0)                         /dev/sdb		# we can discount this possibility     
    (hd2)                         /dev/sdc
    We know these first two don't/won't work. The next four are all possibilities.

    The next two assume /dev/sdc is what the BIOS sees as (hd1):

    Case 3:
    Code:
    GRUB using BIOS order         Linux order
    (hd0)                         /dev/sda
    (hd2)                         /dev/sdb
    (hd1)                         /dev/sdc
    Case 4:
    Code:
    GRUB using BIOS order         Linux order
    (hd2)                         /dev/sda
    (hd0)                         /dev/sdb
    (hd1)                         /dev/sdc
    I propose you try mbwardle's solution assuming Case 3 is true. I wrote out instructions below. If they do not work, then we know both Case 3 and Case 4 are not true because we will have discovered that /dev/sdc is not what the BIOS sees as (hd1).

    If you can boot Linux using the instructions below, then great. We'll know we are in either Case 3 or Case 4. If you still can not boot, then we'll know we are in either Case 5 or Case 6. You can then repeat the instructions below with a slight and obvious adjustment to device.map and menu.lst. (After reading the instructions below, if it isn't obvious, ask.)

    Case 5:
    Code:
    GRUB using BIOS order         Linux order
    (hd1)                         /dev/sda
    (hd2)                         /dev/sdb
    (hd0)                         /dev/sdc
    Case 6:
    Code:
    GRUB using BIOS order         Linux order
    (hd2)                         /dev/sda
    (hd1)                         /dev/sdb
    (hd0)                         /dev/sdc
    Using this method and a bit of trial and error, you hopefully will be able to boot your OSs.

    Here are mbwardle's instructions adapted to your situation:

    Unplug the 2GB flash drive from your system. That will give us one less drive to worry about.

    • Boot from the Ubuntu CD
    • Open a Terminal (Applications->Accessories->Terminal)
    • Type
      Code:
      sudo mount /dev/sdc8 /mnt  # mount your Linux partition
      sudo cp /mnt/boot/grub/device.map /mnt/boot/grub/device.map-20080831  # backup to be safe
      gksu gedit /mnt/boot/grub/device.map
    • Edit the device map to look like this:
      Code:
      (hd0) /dev/sda
      (hd1) /dev/sdc
      (hd2) /dev/sdb
      Save and exit gedit.
    • At the terminal type
      Code:
      sudo grub --device-map=/mnt/boot/grub/device.map
      root (hd1,7)
      setup (hd0)
      quit
    • Back at the terminal type
      Code:
      gksu gedit /mnt/boot/grub/menu.lst
      So a search and replace, replacing all occurrences of (hd2,7) with (hd1,7).
      Save and exit.
    • Reboot
    Last edited by unutbu; September 1st, 2008 at 02:20 AM.

  10. #510
    Join Date
    Aug 2008
    Beans
    38

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

    when i type sudo grub --device.map=device.map , i get the following


    Code:
    ubuntu@ubuntu:~$ sudo grub --device.map=device.map
    grub: unrecognized option `--device.map=device.map'
    Try ``grub --help'' for more information.
    ubuntu@ubuntu:~$

Page 51 of 103 FirstFirst ... 41495051525361101 ... 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
  •