Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: messed up bootloader

  1. #1
    Join Date
    May 2010
    Beans
    35

    messed up bootloader

    Hey all,

    Installed Ubuntu 10.04 on my 2nd harddrive (took loads of retry's to try and get boot onto that hard drive)
    anyway finally installed it and left it working on my 2nd drive.
    But I had to load it from my first hard drives boot menu (that ubuntu had generated).

    I have now installed 7 on my primary drive, and thus when I tell my mobo(bios/cmos w/e) to load my 2nd drive, it just gets to a fairly blank prompt.

    How can I create the loader to go on my 2nd drive? (tell my mobo to load 2nd drive, and it goes stright to ubunto)

    (basicly I don't want the 2 systems on 1 bootloader)

  2. #2
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: messed up bootloader

    Your better off with one bootloader, grub that will let you choose or default the operating system. The way your going about it makes it much more difficult and leaves you where your at.

    The MS bootloader can be reloaded with 2 commands from a install dvd and the grub bootloader can be restored with 2 commands run from a live cd, it is quite easy once you know how.

    I don't know the size of your hard drives but if it was me I would have W7 and Ubuntu on one and the other used as 1 backup partition and a 2nd partition to share a ntfs partition for both operating systems.

  3. #3
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: messed up bootloader

    Quote Originally Posted by wilee-nilee View Post
    Your better off with one bootloader, grub that will let you choose or default the operating system. The way your going about it makes it much more difficult and leaves you where your at.

    The MS bootloader can be reloaded with 2 commands from a install dvd and the grub bootloader can be restored with 2 commands run from a live cd, it is quite easy once you know how.

    I don't know the size of your hard drives but if it was me I would have W7 and Ubuntu on one and the other used as 1 backup partition and a 2nd partition to share a ntfs partition for both operating systems.
    This is much better option.

    If you can use some kind of Quick Boot menu, I could somehow understand wanting to select a disk, and not an OS in grub2. But if you actually have to go into BIOS, change settings, save them and exit, that is like starting your PC twice every time. You noticed exiting from BIOS restarts it, right?

    However, if you still want to have it your way, boot ubuntu in live mode from the cd, in terminal run:

    sudo fdisk -l (small L)

    and we'll give you the commands needed to execute in order to put grub2 on your ubuntu disk.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  4. #4
    Join Date
    Apr 2008
    Beans
    17

    Re: messed up bootloader

    Quote Originally Posted by slpixe View Post
    Hey all,

    Installed Ubuntu 10.04 on my 2nd harddrive (took loads of retry's to try and get boot onto that hard drive)
    anyway finally installed it and left it working on my 2nd drive.
    But I had to load it from my first hard drives boot menu (that ubuntu had generated).

    I have now installed 7 on my primary drive, and thus when I tell my mobo(bios/cmos w/e) to load my 2nd drive, it just gets to a fairly blank prompt.

    How can I create the loader to go on my 2nd drive? (tell my mobo to load 2nd drive, and it goes stright to ubunto)

    (basicly I don't want the 2 systems on 1 bootloader)
    If I understand you correctly, you don't want Grub to be installed in two places, or don't want it on the Windows drive.
    To fix the Windows boot, create a Rescue (startup) CD in Windows 7, boot from the CD and select repair>cmd prompt, and in command line run
    BootRec.exe /fixmbr
    BootRec.exe /fixboot

    That should fix your Windows boot, but as I stated in this thread, I find that after a kernel update, Grub rewrites the Windows mbr.

    http://ubuntuforums.org/showthread.php?t=1489190

  5. #5
    Join Date
    Apr 2008
    Beans
    17

    Re: messed up bootloader

    I think this would solve your "Grub being updated in two places" problem. I just ran the command suggested here:

    http://ubuntuforums.org/showpost.php...45&postcount=9

  6. #6
    Join Date
    May 2010
    Beans
    35

    Re: messed up bootloader

    If you can use some kind of Quick Boot menu, I could somehow understand wanting to select a disk, and not an OS in grub2. But if you actually have to go into BIOS, change settings, save them and exit, that is like starting your PC twice every time. You noticed exiting from BIOS restarts it, right?
    bingo, im using a quick boot menu on my mobo, I keep putting in and pulling out hard drives, hence I wont want to have the grub menu on a drive that I may reformat or remove, I want it on the drive that has ubuntu on.

    I installed win7 after ubuntu, so it has scrapped the grub thing (so i cant get into ubuntu)

    As far as im understanding, Im going to load the cd in live mode, and use
    Code:
    sudo dpkg-reconfigure grub-pc
    to deselect my win7 drive,
    then
    Code:
    sudo fdisk -l (small L)
    to rebuild the grub loader on only the selected drives (ubuntu drive from the previous step)

    Is this all correct?

    Thanks for the help

  7. #7
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: messed up bootloader

    Quote Originally Posted by slpixe View Post
    bingo, im using a quick boot menu on my mobo, I keep putting in and pulling out hard drives, hence I wont want to have the grub menu on a drive that I may reformat or remove, I want it on the drive that has ubuntu on.

    I installed win7 after ubuntu, so it has scrapped the grub thing (so i cant get into ubuntu)

    As far as im understanding, Im going to load the cd in live mode, and use
    Code:
    sudo dpkg-reconfigure grub-pc
    to deselect my win7 drive,
    then
    Code:
    sudo fdisk -l (small L)
    to rebuild the grub loader on only the selected drives (ubuntu drive from the previous step)

    Is this all correct?

    Thanks for the help
    NO.

    I asked for fdisk because I don't want to issue commands blind. We need:
    - the name of your ubuntu partition
    - the name of the disk

    First show is the fdisk output from live mode, lets reinstall grub2 to the ubuntu disk, and only after you can boot the hdd ubuntu you need to do the dpkg command, it doesn't work from live mode.

    PS. fdisk will only show your partitions list, it is not used to reinstall grub2.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  8. #8
    Join Date
    May 2010
    Beans
    35

    Re: messed up bootloader

    Alright fdisk here we go!

    Ubuntu drive
    Code:
    Disk /dev/sda: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000b1534
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       24043   193118208   83  Linux
    /dev/sda2           24043       24793     6027265    5  Extended
    /dev/sda5           24043       24793     6027264   82  Linux swap / Solaris
    Thinks this be my win7 drive
    Code:
    Disk /dev/sdb: 37.0 GB, 37019566080 bytes
    255 heads, 63 sectors/track, 4500 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x3b323b31
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1        9000    72292468+   7  HPFS/NTFS
    
    Disk /dev/sdc: 37.0 GB, 37019566080 bytes
    255 heads, 63 sectors/track, 4500 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x22e80000
    
    Disk /dev/sdc doesn't contain a valid partition table
    I got a fair few more drives in, but im guessing when putting up grub, it wont touch them

  9. #9
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: messed up bootloader

    You see, I would have assumed your ubuntu disk is /dev/sdb, that's why it's better not to type blind.

    OK. To install grub2 from live mode you have to mount the root partition first, and then install grub2 telling it which parameter to use for root partition:

    sudo mount /dev/sda1 /mnt
    sudo grub-install --root-directory=/mnt/ /dev/sda

    That will install it on /dev/sda (the MBR) using the /mnt as root directory, and we already mounted root there.

    Reboot, set the 200GB disk as first option in BIOS, and you should see your grub menu. Boot ubuntu, and run that dpkg-reconfigure command as suggested earlier, to deselect /dev/sdb from grub2 updates, and to select /dev/sda if not selected.

    That should sort you out.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  10. #10
    Join Date
    May 2010
    Beans
    35

    Re: messed up bootloader

    alright just done the first step
    Code:
    ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt /dev/sda
    error: cannot seek `/dev/sdd'.
    error: cannot seek `/dev/sde'.
    error: cannot seek `/dev/sdd'.
    error: cannot seek `/dev/sde'.
    error: cannot seek `/dev/sdd'.
    error: cannot seek `/dev/sde'.
    Installation finished. No error reported.
    going to restart and try to boot from ubuntu drive (and remove other drives from updates)

    will post success or failure
    Last edited by slpixe; May 21st, 2010 at 03:44 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •