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

Thread: cannot dual boot

  1. #1
    Join Date
    Oct 2005
    Location
    Malaysia
    Beans
    163
    Distro
    Ubuntu

    cannot dual boot

    i installed ubuntu 12.04 on a second hard disk

    Code:
    $ sudo fdisk -l
    
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000af68f
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   147914751    73956352   83  Linux
    /dev/sda2       147916798   156301311     4192257    5  Extended
    /dev/sda5       147916800   156301311     4192256   82  Linux swap / Solaris
    
    Disk /dev/sdb: 80.0 GB, 80025280000 bytes
    255 heads, 63 sectors/track, 9729 cylinders, total 156299375 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000dad98
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
    /dev/sdb2          206848   156297215    78045184    7  HPFS/NTFS/exFAT
    after setting on bios to boot to second hard disk, i ran
    Code:
    $ sudo os-prober
    $ sudo upgrade-grub
    after changed hiden grub to timeot 5 second, i'm able to select windows 8 but it only get to windows loading and then it restarts

    directly booting first hard disk to boot windows 8 successfully boots into windows.

    below is my windows menuentry done by os-prober

    Code:
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows 8 (loader) (on /dev/sdb1)" --class windows --class os {
    	insmod part_msdos
    	insmod ntfs
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 38A0A8BFA0A884CA
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    when i tried to change it, sudo update-grub changed it back to above entries

    had i missed any step?
    Last edited by ikki_72; December 30th, 2012 at 11:23 AM.

  2. #2
    Join Date
    Oct 2005
    Location
    Malaysia
    Beans
    163
    Distro
    Ubuntu

    Re: cannot dual boot

    i tried editing /etc/grub.d/40_custom

    Code:
    #!/bin/sh -e
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    echo "Adding Windows 8 to GRUB 2 menu"
    cat << EOF
    menuentry "Windows 8" {
    set root=(hd0,1)
    chainloader (hd0,1)+1
    }
    EOF
    got some error when updating grub

    Code:
    $ sudo update-grub
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-29-generic
    Found initrd image: /boot/initrd.img-3.2.0-29-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Windows 8 (loader) on /dev/sdb1
    error: syntax error.
    error: Incorrect command.
    error: syntax error.
    error: line no: 162
    Syntax errors are detected in generated GRUB config file.
    Ensure that there are no errors in /etc/default/grub
    and /etc/grub.d/* files or please file a bug report with
    /boot/grub/grub.cfg.new file attached.
    done
    Last edited by ikki_72; December 31st, 2012 at 12:12 PM.

  3. #3
    Join Date
    Dec 2012
    Beans
    2

    Re: cannot dual boot

    can we use 2 os system at the same time along with ubuntu????

  4. #4
    Join Date
    Jan 2012
    Location
    Bangalore
    Beans
    99
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: cannot dual boot

    Quote Originally Posted by pavitrabalse View Post
    can we use 2 os system at the same time along with ubuntu????

    yup thats pretty much possible !! and you are meaning to tell you wanna have totally 3 os's on your system??
    the ubuntumite

  5. #5
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: cannot dual boot

    If it is a new system with Windows 8, you might succeed better with Ubuntu 12.10.

    General tips:

    Try the instructions in the following link to repair your system

    https://help.ubuntu.com/community/Grub2/Installing

    In order to help we might need some more information about your system.

    - Can you run the installed Ubuntu system at all?
    - What computer is it? cpu, ram, bios or equivalent?
    Last edited by sudodus; December 31st, 2012 at 12:47 PM. Reason: clarification and fixed typing error

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: cannot dual boot

    You said you installed Ubuntu to second drive, but it is showing Ubuntu as sda & Windows as sdb. If SATA drives that usually is port order as read by BIOS.

    So if Windows is sdb, it will be hd1 if you have grub in sda. But realize whichever drive you boot from with grub will be hd0, then drives are in port order (normally). I find my flash drives sometimes are anywhere in the order, just to keep me on my toes on which drive is which.

    The old, original instructions on adding an entry to 40_custom were actually from a command line where you echo the text into a file. Then most were copy and pasting the echo command also and it worked, but the newest grub does not work with those (incorrect) commands. So remove the echo, cat & EOF commands on any entry to 40_custom.

    Some have reported issues chain loading to Windows 8. It seems to have to do with its hibernation. Best not to hibernate any dual booted system anyway.

    WARNING for Windows 8 Dual-Booters
    http://ubuntuforums.org/showthread.php?t=1953674
    It defaults shutdown to a hybrid hibernation/off state for fast boot
    http://www.kapilarya.com/how-to-enab...p-in-windows-8
    But then files may be corrupted similar to Windows 7 Hibernation:
    http://ubuntu-with-wubi.blogspot.ca/...rid-sleep.html
    http://superuser.com/questions/14472...te-w-dual-boot
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Oct 2005
    Location
    Malaysia
    Beans
    163
    Distro
    Ubuntu

    Re: cannot dual boot

    Quote Originally Posted by sudodus View Post
    If it is a new system with Windows 8, you might succeed better with Ubuntu 12.10.

    General tips:

    Try the instructions in the following link to repair your system

    https://help.ubuntu.com/community/Grub2/Installing

    In order to help we might need some more information about your system.

    - Can you run the installed Ubuntu system at all?
    - What computer is it? cpu, ram, bios or equivalent?
    forgot to mention that my desktop is using mbr mode bios, not gpt

    ubuntu is running ok when i choose to boot to second hdd (set it as first boot since bios cannot choose to boot to multiple hdd ordering)

    CPU: AMD Athlon 64 X2 4600+
    RAM: 4GB

    a bit info on bios
    Code:
    # dmidecode 2.11
    SMBIOS 2.5 present.
    48 structures occupying 1721 bytes.
    Table at 0x000FC060.
    
    Handle 0x0000, DMI type 0, 24 bytes
    BIOS Information
            Vendor: MS-7309
            Version: V1.9
            Release Date: 08/31/2007
            Address: 0xF0000
            Runtime Size: 64 kB
            ROM Size: 512 kB
    
    $ sudo dmidecode -s bios-version
    V1.9
    ubuntu info

    Code:
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 12.04.1 LTS
    Release:	12.04
    Codename:	precise
    
    $ uname -r
    3.2.0-29-generic
    Last edited by ikki_72; January 1st, 2013 at 01:07 AM.

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: cannot dual boot

    I am multi-booting Ubuntu alongside with Windows XP (came with the computer) and Windows 8 developer's preview in a computer of similar age. And I use several drives, so my situation is quite similar. My experience is that the SATA drive with Windows XP can be moved (to another SATA port and number) but the drive with Windows 8 cannot be moved if you want to boot it. So you should keep it as the first one, /dev/sda or (hd0).

    However it is possible that there are some extra features in the final Windows 8 version, that makes it hard to dual boot.
    Ubuntu 12.10 was developed later than 12.04, and should be better managing Windows 8. So if no luck with 12.04, consider installing 12.10 to succeed with dual booting.

    But don't skip 12.04 yet. I suggest you try according to the following tips. And look carefully at oldfred's tips and links.

    You de-activate 30_osprober like this
    Code:
    sudo chmod ugo-x /etc/grub.d/30_os-prober ###
    and re-activate it again with
    Code:
    sudo chmod ugo+x /etc/grub.d/30_os-prober ###
    Quote Originally Posted by ikki_72 View Post
    below is my windows menuentry done by os-prober

    Code:
    ### originally from /etc/grub.d/30_os-prober ###
    menuentry "Windows 8 (loader) (on /dev/sdb1)" --class windows --class os {
    	insmod part_msdos
    	insmod ntfs
    	set root='(hd1,msdos1)'
    	search --no-floppy --fs-uuid --set=root 38A0A8BFA0A884CA
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    1. Add this (as is after the 'exec tail' statements) to

    /etc/grub.d/40_custom

    Make a backup copy after that

    Code:
    sudo cp /etc/grub.d/40_custom /etc/grub.d/40_custom0
    Check that the backup copy is not executable!

    and start tweaking it. I think that grub gets mixed up because you changed the wiring of the drives, so try to deactivate the drivemap command
    Code:
    #	drivemap -s (hd0) ${root}
    First make temporary tests 'live' at boot time in the grub menu (click 'e' to enter edit mode). You can also click 'c' to enter simple commands. For example

    ls

    will show you which drives there are, and help you identify which (drive,partition) is the windows one at boot time.

    And when you have found what works to boot Windows, write that into

    /etc/grub.d/40_custom

    Edit: ... and run
    Code:
    update-grub
    Last edited by sudodus; January 1st, 2013 at 06:30 AM.

  9. #9
    Join Date
    Oct 2005
    Location
    Malaysia
    Beans
    163
    Distro
    Ubuntu

    Re: cannot dual boot

    the thing is, i could not boot from hard disk if it had been configured as 2nd hdd on bios.

    any other workround? configure grub on win 8?

    i need 12.04 for steam linux. the only reason i'm using ubuntu instead of debian.

  10. #10
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: cannot dual boot

    Quote Originally Posted by ikki_72 View Post
    the thing is, i could not boot from hard disk if it had been configured as 2nd hdd on bios.

    any other workround? configure grub on win 8?

    i need 12.04 for steam linux. the only reason i'm using ubuntu instead of debian.
    Maybe this link will help

    https://help.ubuntu.com/community/Grub2/Installing

    See for example the chapter about

    Reinstalling GRUB 2 from a Working System

    What you want to do is to install grub to the boot sector of the first HDD, /dev/sda (to the head of the drive, not to a partition). And you want it to point from there to /boot on the second drive, which should work if you swap the cables again so that the Windows drive is /dev/sdb, and run the following command
    Code:
    sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sdb
    Normally grub identifies the partition with its UUID, so that it will be found even after changing place and x in /dev/sdx for the drive.

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
  •