Find the answer to your Linux question:
Results 1 to 6 of 6
Hi there, I'm trying to install Ubuntu 8.10, and having a little difficulty with Grub. I have three hard drives with the following partitions: hd0 - Windows - Programs - ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    4

    Dual-Booting with Grub


    Hi there,

    I'm trying to install Ubuntu 8.10, and having a little difficulty with Grub.

    I have three hard drives with the following partitions:

    hd0
    - Windows
    - Programs
    - Grub Boot

    hd1
    - Personal Documents

    hd2
    - NTFS Storage
    - FAT32 Storage
    - ext3 Ubuntu
    - Swap

    What I'm trying to do is allow Grub to be installed on hd0 and load the Ubuntu install on hd2. The problem is that when I try to load Linux from Grub on hd0 it goes into kernel panic because it's not pointing to the right place, and when I try to load Windows from Grub on hd2 NTLDR is missing. Windows boots fine on hd0, and Ubuntu boots fine from hd2.

    I would rather not have to open up my case and swap cables every time I want to change my OS. Please tell me that it's actually possible

    Thanks

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the output of sudo fdisk -l command and contents of /boot/grub/menu.lst file here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    4
    Can do.

    Quote Originally Posted by sudo fdisk -l
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0d473130

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 26108 209712478+ 7 HPFS/NTFS
    /dev/sda2 26109 32635 52428127+ 7 HPFS/NTFS
    /dev/sda3 32636 60801 226243395 5 Extended
    /dev/sda5 32636 43078 83883366 83 Linux
    /dev/sda6 43079 60278 138158968+ b W95 FAT32
    /dev/sda7 60280 60801 4192933+ 82 Linux swap / Solaris

    Disk /dev/sdb: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x899e899e

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 2611 20972826 7 HPFS/NTFS
    /dev/sdb2 2612 38913 291595815 f W95 Ext'd (LBA)
    /dev/sdb5 2612 38912 291587751 7 HPFS/NTFS
    /dev/sdb6 38913 38913 8001 83 Linux

    Disk /dev/sdc: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x89f689f6

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 1 38912 312560608+ 7 HPFS/NTFS
    alex@Aura:~$
    alex@Aura:~$
    alex@Aura:~$ sudo fdisk -l

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0d473130

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 26108 209712478+ 7 HPFS/NTFS
    /dev/sda2 26109 32635 52428127+ 7 HPFS/NTFS
    /dev/sda3 32636 60801 226243395 5 Extended
    /dev/sda5 32636 43078 83883366 83 Linux
    /dev/sda6 43079 60278 138158968+ b W95 FAT32
    /dev/sda7 60280 60801 4192933+ 82 Linux swap / Solaris

    Disk /dev/sdb: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x899e899e

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 2611 20972826 7 HPFS/NTFS
    /dev/sdb2 2612 38913 291595815 f W95 Ext'd (LBA)
    /dev/sdb5 2612 38912 291587751 7 HPFS/NTFS
    /dev/sdb6 38913 38913 8001 83 Linux

    Disk /dev/sdc: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x89f689f6

    Device Boot Start End Blocks Id System
    /dev/sdc1 * 1 38912 312560608+ 7 HPFS/NTFS
    Quote Originally Posted by 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=a7631680-02fe-425b-a233-8152bd8e8ca9 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=7e73162d-c0d6-43a0-b9f0-19ac77dbdb90

    ## 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.10, kernel 2.6.27-7-generic
    uuid 7e73162d-c0d6-43a0-b9f0-19ac77dbdb90
    kernel /vmlinuz-2.6.27-7-generic root=UUID=a7631680-02fe-425b-a233-8152bd8e8ca9 ro quiet splash
    quiet

    title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
    uuid 7e73162d-c0d6-43a0-b9f0-19ac77dbdb90
    kernel /vmlinuz-2.6.27-7-generic root=UUID=a7631680-02fe-425b-a233-8152bd8e8ca9 ro single

    title Ubuntu 8.10, memtest86+
    uuid 7e73162d-c0d6-43a0-b9f0-19ac77dbdb90
    kernel /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/sda1
    title Microsoft Windows XP Professional
    root (hd1,0)
    savedefault
    makeactive
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader +1
    For reference, I'm using this post as a guide. Not working so well.

    To be clear, the 320 GB drive with 4 partitions is the one with Windows, with Windows XP Pro in the first partition. The 500 GB drive has Linux.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Your ouput from the fdisk -l command shows you have two Linux partitions, sda5 and sdb6, one on each hard drive. It also shows bootable/active ntfs (windows) partitions on each drive, sda1 and sdb1. The menu.lst entry you have for windows should boot the system on sdb1. So, what are the two Linux partitions and which one do you want to use, the one on sda (sda5)?

  6. #5
    Just Joined!
    Join Date
    Jan 2009
    Posts
    4
    sda5 is my /root directory, where I've installed Ubuntu. sdb6 is an 8 MB partition that I mounted as /boot when I reinstalled Ubuntu. Before I had that, Grub would attempt to load State 1.5 and lock up with Error 22. Now Grub is loading properly when that drive is the boot device, but it's not pointing to sda5 to load the kernel, and it goes into kernel panic.

    I'm trying my damndest to get Grub to load the partition on sdb1; sda1 is a 200GB Storage partition, and sda2 was intended for the Windows 7 beta, but that was when I thought getting this configured would be easier. I may just merge it into sda1. EDIT: To be even more clear, sda1 and sda2 hold no active Windows components other than the System Volume Information, and sda1 has a RECYCLER file. sda2 hasn't been used at all yet.

    As it stands, when I try to run Grub from hd0 and boot Windows XP, the file NTLDR is reported as missing and the boot freezes. However, when I try to boot from hd1 into Windows, it goes perfectly smoothly. It's quite irritating.

    Thanks for your help, and sorry for not clarifying that earlier.

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I never use separate /boot partitions so what I suggest is you go to the link below and read through it. It explains how to create/use a separate /boot partition and it is specifically for Ubuntu. The first part explains how to create the partition, mount it and since you have already done that you won't need to do it again. I would suggest you read through the section a couple of times before doing anything so you know you understand it.

    grub page

Posting Permissions

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