Find the answer to your Linux question:
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 33
Jonathan i replayed to casper without refreshing the site. Originally Posted by Jonathan183 I suggest with the Linux hard drive only installed as primary you press escape at the grub ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Apr 2008
    Posts
    23

    Jonathan i replayed to casper without refreshing the site.

    Quote Originally Posted by Jonathan183 View Post
    I suggest with the Linux hard drive only installed as primary you press escape at the grub menu to exit the graphical menu ... then select Linux boot option and press e to edit ... you should have entries something like ...
    Code:
    root (hd0,0)
    kernel ....
    is the first number 0 or 1 ... if it is 1 you installed Linux with Windows disk also connected to the system ... you need to update the hd1 to hd0 in the menu.lst file

    Yes i had installed linux with windows disk connected.
    But i think it was hd1 before i format and it worked fine.
    if i understood well, when i disconect my first HD i should see root (hd0,0) and not (hd1,0) because it will try to boot hd1 which actually it is disconected.But after when i connect the first one the linux drive is going to be hd1 again?

    If you have only just installed Linux then follow devils caspers instructions to reinstall Linux with the hard drive set as primary and the Windows hard drive disconnected.

    Could you please expain me why install Linux as primary.
    I know that windows needs ti be installed on the primary.
    So what the need of installing an OS on the primary?

    If you have been using the installed Linux version a while then boot from the live CD, post the output of fdisk, mount the linux root partition (assume you don't have a separate boot partition) and post the contents of your_root_partition/boot/grub/menu.lst file.
    Thanks,

  2. #12
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Ok I will try to explain my understanding of the situation ...
    Grub needs to be on the MBR of the hard drive the system uses to boot from. Windows usually likes to be installed on the first hard drive and places its bootloader code in the MBR of the first hard drive.

    You can install Windows on the primary hard drive and then install Linux. This will setup a dual boot by installing Grub to the MBR of the primary hard drive (the Windows drive). The system needs two hard drives to boot; the primary hard drive with grub code in the MBR and Windows partition(s), the secondary hard drive with grub configuration files and Linux. Removal of either drive will stop both OS working and you will be forced to re-install a bootloader.

    If you install Windows to primary then swap disks so Windows is a secondary hard drive then install Linux to the new primary hard drive you have:-
    grub in new primary hard drive, Linux on primary hard drive, Windows bootloader in MBR of second hard drive and Windows partitions on second hard drive.
    Removing the Linux hard drive will leave a functional and bootable Windows OS, removal of the Windows hard drive still leaves a functional and bootable Linux system.
    The grub disk map fools Windows into thinking it is on the primary hard drive.

    It sounds as though you have Windows installed to the primary, Linux installed on the secondary hard drive ... but you have changed the BIOS boot order. I suggest you change the BIOS boot order back as it was and reinstall grub to the Windows disk MBR either using the SuperGrub CD or boot from the live CD and use
    Code:
    grub
    find /boot/grub/stage1
    You should get the file found on (hd1,x) where x is 0 or 1 or 2 etc.
    Then type the following - replace (hd1,x) with the output you get from the find command
    Code:
    root (hd1,x)
    setup (hd0)
    quit
    them reboot the system.

    Ed: if you want further help on this it is worth you booting from the live CD and posting the output of
    Code:
    sudo fdisk -l
    mount the linux partition with the grub menu (I will assume it is sdb1)
    Code:
    sudo mkdir /manmount
    sudo mount /dev/sdb1 /manmount
    and post the output of
    Code:
    sudo cat /manmount/boot/grub/menu.lst

  3. #13
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by Jonathan183
    It sounds as though you have Windows installed to the primary, Linux installed on the secondary hard drive ... but you have changed the BIOS boot order. I suggest you change the BIOS boot order back as it was and reinstall grub to the Windows disk MBR either using the SuperGrub CD or boot from the live CD
    I won't suggest anyone to do that.

    Two reasons :
    * Its doesn't work in a few machines because of GRUB/BIOS compatibility problems.
    * If anything goes wrong with any HD/OS, other OS will not boot up. Both HDs will depend on each other for booting up.

    I would suggest you to keep both OSes/HDs independent of each other. Thats the best way to setup dual booting in Two Hard Disks.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. $spacer_open
    $spacer_close
  5. #14
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Quote Originally Posted by devils casper View Post
    I won't suggest anyone to do that.

    Two reasons :
    * Its doesn't work in a few machines because of GRUB/BIOS compatibility problems.
    * If anything goes wrong with any HD/OS, other OS will not boot up. Both HDs will depend on each other for booting up.

    I would suggest you to keep both OSes/HDs independent of each other. Thats the best way to setup dual booting in Two Hard Disks.
    I agree that it is better to setup OS independent and tried to explain in the same post above how and why. It does sound as though the poster originally had things setup that way so BIOS compatibility should not be an issue. Since the poster seems to insist that Windows will remain primary then the only other option would be to setup Windows bootloader to load Linux.

    My original suggestion was to keep the OS independent as you originally indicated. So my suggestion was to restore the boot loader configuration to the pre-Windows install setup.

  6. #15
    Just Joined!
    Join Date
    Apr 2008
    Posts
    23
    ok to sum up,

    Quote Originally Posted by Jonathan183 View Post
    Ok I will try to explain my understanding of the situation ...
    Grub needs to be on the MBR of the hard drive the system uses to boot from. Windows usually likes to be installed on the first hard drive and places its bootloader code in the MBR of the first hard drive.

    This is a common problem:

    You can install Windows on the primary hard drive and then install Linux. This will setup a dual boot by installing Grub to the MBR of the primary hard drive (the Windows drive). The system needs two hard drives to boot; the primary hard drive with grub code in the MBR and Windows partition(s), the secondary hard drive with grub configuration files and Linux. Removal of either drive will stop both OS working and you will be forced to re-install a bootloader.

    This was the best option:

    If you install Windows to primary then swap disks so Windows is a secondary hard drive then install Linux to the new primary hard drive you have:-
    grub in new primary hard drive, Linux on primary hard drive, Windows bootloader in MBR of second hard drive and Windows partitions on second hard drive.
    Removing the Linux hard drive will leave a functional and bootable Windows OS, removal of the Windows hard drive still leaves a functional and bootable Linux system.
    The grub disk map fools Windows into thinking it is on the primary hard drive.

    This is the proposal solution,due to my grub hasnt any incompatibilities with bios:

    It sounds as though you have Windows installed to the primary, Linux installed on the secondary hard drive ... but you have changed the BIOS boot order. I suggest you change the BIOS boot order back as it was and reinstall grub to the Windows disk MBR either using the SuperGrub CD or boot from the live CD and use
    Code:
    grub
    find /boot/grub/stage1
    You should get the file found on (hd1,x) where x is 0 or 1 or 2 etc.
    Then type the following - replace (hd1,x) with the output you get from the find command
    Code:
    root (hd1,x)
    setup (hd0)
    quit
    them reboot the system.

    Ed: if you want further help on this it is worth you booting from the live CD and posting the output of
    Code:
    sudo fdisk -l
    mount the linux partition with the grub menu (I will assume it is sdb1)
    Code:
    sudo mkdir /manmount
    sudo mount /dev/sdb1 /manmount
    and post the output of
    Code:
    sudo cat /manmount/boot/grub/menu.lst
    Thanks,

  7. #16
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Have you tried to re-install GRUB using SuperGRUB CD and edit menu.lst file?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #17
    Just Joined!
    Join Date
    Apr 2008
    Posts
    23
    Yes, my results are on the first page at the last post

  9. #18
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I think that the problem was before windows format and it appears now
    i am going to reinstall it.I am going to keep windows as primary and linux as slave.But what the need of keeping un-plug the windows disk?
    I didn't read above message because you embedded your message in mine.

    If you want to keep Linux HD as Secondary only then follow Jonathan's instructions. In this type of setup, you might face boot up problem later on.

    My suggestion is, keep Linux disk Primary, Windows Secondary and add code for Windows OS in menu.lst. Thats it. You wont have to do anything special for dual boot setup.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #19
    Just Joined!
    Join Date
    Apr 2008
    Posts
    23
    Quote Originally Posted by devils casper View Post
    I didn't read above message because you embedded your message in mine.

    If you want to keep Linux HD as Secondary only then follow Jonathan's instructions. In this type of setup, you might face boot up problem later on.

    My suggestion is, keep Linux disk Primary, Windows Secondary and add code for Windows OS in menu.lst. Thats it. You wont have to do anything special for dual boot setup.
    ok before i do anything this is my fdisk -l results:

    ubuntu@ubuntu:/$ sudo fdisk -l

    Disk /dev/sda: 40.0 GB, 40020664320 bytes
    255 heads, 63 sectors/track, 4865 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 4865 39078081 7 HPFS/NTFS

    Disk /dev/sdb: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 9636 77401138+ 83 Linux
    /dev/sdb2 9637 9729 747022+ 5 Extended
    /dev/sdb5 9637 9729 746991 82 Linux swap / Solaris

    and this is my menu.lst :

    # menu.lst - See: grub(, info grub, update-grub(
    # grub-install(, grub-floppy(,
    # 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 3

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 5

    ## 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=81f8a98f-a77f-413b-884f-5426432bf93b ro

    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd1,0)

    ## 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, kernel 2.6.24-16-generic
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=81f8a98f-a77f-413b-884f-5426432bf93b ro quiet splash noapic nolapic irqpoll=noacpi
    initrd /boot/initrd.img-2.6.24-16-generic
    quiet

    title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
    root (hd1,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=81f8a98f-a77f-413b-884f-5426432bf93b ro single
    initrd /boot/initrd.img-2.6.24-16-generic

    #title Ubuntu 8.04, memtest86+
    #root (hd1,0)
    #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/sda1
    title Microsoft Windows XP Professional
    root (hd0,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1

    This may help you understand better my system

  11. #20
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Remove mapping code from Windows title block. Windows OS should boot up fine.
    Code:
    title Microsoft Windows XP Professional
    rootnoverify (hd0,0)
    makeactive
    chainloader +1
    I assume that Ubuntu is booting up fine right now and problem is with Windows OS only.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Posting Permissions

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