Announcement

Collapse
No announcement yet.

Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

    I recently bought a netbook (Asus EeePC 1215B, 4Gig RAM, 500GB disk, Fusion E-450 apu), which came preloaded with windows 7 home premium. Now, what I want is to have both Windows 7 and Kubuntu 11.10 on it, windows for the games and the university-mandated windows-only stuff, and kubuntu for everything else.

    The disk was partitioned as follows when I got it:
    100GB -> C:
    15GB -> windows recovery data
    350GB -> D: (was empty, clearly meant just for data)
    16MB -> ? (I think it's EFI-related stuff)

    Since 100GB is plenty enough for windows, I decided to not mess around with windows and simply salvage the 350GB partition for use by Kubuntu. I made a recovery USB stick out of the 15GB partition, which frees up the option of having another primary partition, since I at first thought that the issue was having the /boot in an extended partition. I want to set this up as follows:
    256MB -> /boot (ext3, primary)
    and in an extended partition
    8GB -> swap
    15GB -> / (ext4)
    the rest -> /home (ext4)

    I've downloaded kubuntu-11.10-desktop-amd64.iso, and used another system I have (with Kubuntu 10.10) to create a startup USB stick with it. The MD5 of the ISO checks out, as does the file check on the stick after booting from it. CD boots are not an option, because the netbook doesn't have an optical drive. Installation itself works too. No problems there yet. During installation, I pointed the boot loader to /dev/sda2 (the /boot partition).

    Now, the problem is that I am unable to get the installation right in order to boot into Kubuntu. I've been using EasyBCD (as suggested on the help.ubuntu.com page), and no matter what combination I try, it doesn't work. The most success I've had so far is using EasyBCD to add a Linux entry to GRUB2 (where the location is automagically selected, according to that program). Upon boot, this simply gives me a "grub>" cmd option, with a few commands. Is there anything I've missed, or anything I shouldn't have done? And more importantly, can anyone help me with the solution?

    I'm a beginner/intermediate user. I know how to use a console, but that's about it (I mainly use Linux for non-sysadmin related stuff)

    Many thanks in advance for trying to help me.

    #2
    Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

    Some more detail on your current drive configuration is needed. You list four partitions, then say you added an extended (which I assume was the drive D: space) but then you say /boot is /dev/sda2 so the order your giving doesn't jibe with the list you've given. Start with a list of partitions by device name and what they contain.

    BTW, /boot can be on a logical partition, linux doesn't have those rules. The only restriction is the file system of /boot has to be a readable type by GRUB. Since we're on the topic, the only reason to have a separate /boot is if you are in fact using a file system not readable by GRUB - which it doesn't seem you are - but that's totally up to you of course, and has no bearing on your problem.

    You also state you "pointed the boot loader to /dev/sda2" which means you're planning on booting to Windows 7 and using it's bootloader to chain-boot to GRUB. If this is not what you've intended, herein lies your problem. AFAIK, no BIOS is capable of booting directly to a partition - the bootloader has to be in the Master Boot Record (dev/sda) not solely in a Partition Boot Record (/dev/sdaX). It's possible you've confused the bootloader location with the location of the boot manager's (GRUB) files. Which by default is /boot/grub/ and doesn't change if you move the bootloader.

    If you did intend to boot to Windows 7 first and then chain-load GRUB, let me know and we'll proceed. BTW, I've never heard of or used EasyBCD so I can't say what it did to your setup and I won't be able to help you with that. It is fairly easy to correctly re-install GRUB without doing an entire install.

    Some other opinions not related to your boot problem:

    1. 8GB swap is unnecessarily large. For portable computers, matching your RAM size is sufficient. The extra 4GB simply won't ever get used unless you're doing major video editing or something like that, which is unlikely on a EeePC. On the other hand, you've plenty of drive space so it won't hurt anything. I just wanted to mention it for reference.

    2. If you still intended on using a separate /boot, ext2 will be slightly faster for that partition. Journal-ing file systems are only really needed for file systems being used often. A /boot partition is mostly read-only (at least until you update your kernel). Again, this is not a problem - just my opinion based on my experience.

    Please Read Me

    Comment


      #3
      Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

      I also removed the 15GB recovery partition to make room for /boot. This means that my current disk layout is (grabbing this from KDE partition manager from within the live environment of my USB install stick):
      /dev/sda
      - /dev/sda1 - 100GB NTFS - Houses the C: partition with Windows 7.
      - /dev/sda2 - 256MB Ext3 - /boot
      - /dev/sda4 - extended
      - /dev/sda5 - 8 GB swap
      - /dev/sda6 - 15GB Ext4 - /
      - /dev/sda7 - 342GB Ext4 - /home
      - /dev/sda3 - 16MB EFI stuff, has something to do with asus bootbooster or bios-stuff

      Basically, the EFI stuff and the NTFS partition need to stay (and I'm not sure about the EFI stuff, but since it's only 16MB I won't touch it). Anything in between can change. Since /boot does not need to be a primary partition according to you, I could build it like this:
      /dev/sda
      - /dev/sda1 - 100GB NTFS - Houses the C: partition with Windows 7.
      - /dev/sda2 - 4GB swap
      - /dev/sda4 - extended
      - /dev/sda5 - 15GB Ext4 - /
      - /dev/sda7 - 347GB Ext4 - /home
      - /dev/sda3 - 16MB EFI stuff
      I like to keep things as simple as possible, so I might just do a reinstall of kubuntu with this layout.

      Summed up, I want five partitions. C:, swap, /, /home and the EFI stuff.

      As for the bootloader, I don't care which bootloader is used. What I want out of it is this: I want a menu, with Windows 7 and Kubuntu as the choice options, and I want it to default to Kubuntu after some timeout (like 5 seconds or so). The windows bootloader does give these options (I've gotten the menu structure, default option and timing easily fixed using that EasyBCD tool), but the actual booting into Linux does not work there. Don't know if it's a problem with the windows bootloader or something else though...

      I have previously installed it (I'm at 3 tries now) while pointing the bootloader to /dev/sda (it's a dropdown menu when using manual mode to partition the disk), and it still did not work and booted straight into windows.

      Comment


        #4
        Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

        Probably, you're running into Microsoft's latest attempt to stifle competition and your BIOS is "fixing" your MBR (Master boot record). I don't have any experience with the newer EFI BIOS so you'll have to wait for someone who knows to come along or look elsewhere. There might be some documentation with your computer that can tell you how to adjust this behavior.

        AFAIK, you can install GRUB to the / partition and edit the Win7 boot manager using BCDEDIT or EasyBCD, If you're getting the grub> prompt, that usually means it can't find the boot files and needs to be reset.

        Basically, booting to the USB and entering a few commands should do it. If you're going ahead with the re-install and re-partition do that first and report back when you're stuck again.

        Please Read Me

        Comment


          #5
          Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

          Originally posted by Purplemess
          I also removed the 15GB recovery partition to make room for /boot. This means that my current disk layout is (grabbing this from KDE partition manager from within the live environment of my USB install stick):
          /dev/sda
          - /dev/sda1 - 100GB NTFS - Houses the C: partition with Windows 7.
          - /dev/sda2 - 256MB Ext3 - /boot
          - /dev/sda4 - extended
          - /dev/sda5 - 8 GB swap
          - /dev/sda6 - 15GB Ext4 - /
          - /dev/sda7 - 342GB Ext4 - /home
          - /dev/sda3 - 16MB EFI stuff, has something to do with asus bootbooster or bios-stuff
          Please run the following command:
          Code:
          sudo -s
          mount /dev/sda2 /mnt/boot
          ls -1 /mnt/boot #paste the output of this command.
          umount /mnt/boot
          exit
          ASROCK Z87 Pro4 - i5 4670K - R9 270x ☞ Triple Boot: KDE NEON ★ Windows 10 ★ Windows 7

          Comment


            #6
            Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

            @ubuntuku, here's the output:
            Code:
            root@ubuntu:~# ls -1 /mnt/boot
            abi-3.0.0-12-generic
            config-3.0.0-12-generic
            grub
            initrd.img-3.0.0-12-generic
            lost+found
            memtest86+.bin
            memtest86+_multiboot.bin
            System.map-3.0.0-12-generic
            vmcoreinfo-3.0.0-12-generic
            vmlinuz-3.0.0-12-generic
            @oshunluvr, I'll reinstall it with the new disk layout. Simpler things means less places where it can go wrong. What should I choose in terms of the location of the boot loader? /dev/sda or /dev/sda5 (where /boot is going to be located)?

            Comment


              #7
              Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

              Ok make sure you don't have any partitions mounted, run the following commands:
              Code:
              sudo -s
              mount /dev/sda2 /mnt/boot
              sudo grub-install --root-directory=/mnt /dev/sda
              umount /mnt/boot
              reboot
              Let us know the result.
              ASROCK Z87 Pro4 - i5 4670K - R9 270x ☞ Triple Boot: KDE NEON ★ Windows 10 ★ Windows 7

              Comment


                #8
                Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                boot loader location is relevant to your desired setup, not the location of the boot files. If you, as you stated earlier, want to boot to GRUB then it needs to be on /dev/sda. If you're willing to use Windows boot loader then install it to /dev/sda5.

                Assuming I'm right and EFI is interfering with your boot loader, we'll need to address that issue first.

                In way of explaining in more detail: The "bootloader" is a 512 byte section that contains the drive partition table (the last 66 bytes) and points the system to the boot manager. That's it. All the fancy boot stuff is done by the boot manager. Point being is the boot manager and boatloader do not have to be on the same partition. Specifically, the bootloader can only reside in the MBR or a PBR and really doesn't reside in a partition at all. Rather, it's in a reserved bit of space.

                Please Read Me

                Comment


                  #9
                  Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                  OK, I've pointed it to /dev/sda now. Theoretically, that should mean that upon next reboot grub will kick in, and direct me to Linux even while there is a windows OS present?

                  I'll post the results.

                  edit: the results
                  After installation, it's still the windows boot loader that is running the show. No sign of grub anywhere, and no improvement whatsoever (still can't get easyBCD to boot successfully into Linux).

                  Since my drive no longer has a separate /boot partition, I ran this code:
                  Code:
                  sudo -s
                  mkdir /mnt/root
                  mount /dev/sda5 /mnt/root
                  grub-install --root-directory=/mnt/root /dev/sda    (gave msg: Installation finished. No error reported.)
                  umount /mnt/root
                  reboot
                  This DID yield result, and gave me the "GRUB version 1.99-12ubuntu5" bootloader. Default option was "Ubuntu, with Linux 3.0.0-12-generic" with a 10sec timeout, together with some others. One of those is "Windows 7 (loader) (on /dev/sda1)"

                  The default option booted me into Kubuntu 11.10, and the windows option booted into windows as it should. In short: big problem solved! Thank you both for helping!

                  In return a few smaller problems. First of all, I would like to have the timeout for the default option (Kubuntu) reduced to 2 seconds. That's enough time for me to give input if I want to go to windows, without increasing boot time heavily (assuming no user input in normal situation, when I want to go to Kubuntu). Secondly. I would like to be able to change the text of the boot options shown by GRUB. Purely aesthetic, but I like seeing "Kubuntu 11.10" more than seeing "Ubuntu, with Linux 3.0.0-12-generic". Are these changes possible?
                  double-edit: It appears StartUpManager would work. I'll triple-edit with the results (for helping folks after me with the same questions).
                  triple-edit: It's gnome, which means it wants to download and install 84MB of other stuff. Nevermind the startupmanager stuff, I'll try the other suggestions below.

                  Comment


                    #10
                    Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                    The boot menu timeout adjustment is easy. The other one is not (well, I guess you could argue that editing /boot/grub/grub.cfg IS easy, but that edit won't survive the next update of a kernel or a grub package).

                    If you open the file /etc/default/grub with kate in superuser mode, the fourth non-commented line reads like this:

                    Code:
                    GRUB_TIMEOUT=10
                    Just change the 10 to a 2, and save it, and then run
                    Code:
                    sudo update-grub
                    in a terminal, and you've got it your way.

                    Setting aside the direct edit of /boot/grub/grub.cfg, I believe you'll have to go into the scripts in /etc/grub.d/ and make a study of "10_linux", which is an automated part of the Grub 2 menu builder. Be careful -- back it up before you do anything to it. I'm not enough of a programmer to understand exactly how it is forming the menu titles -- but I sure if it's important enough you can figure it out.

                    Comment


                      #11
                      Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                      you need grub-customizer
                      Code:
                      sudo add-apt-repository ppa:danielrichter2007/grub-customizer
                      sudo apt-get update
                      sudo apt-get install grub-customizer
                      [img width=400 height=311]http://dl.dropbox.com/u/16223945/grub-customizer.png[/img]
                      ASROCK Z87 Pro4 - i5 4670K - R9 270x ☞ Triple Boot: KDE NEON ★ Windows 10 ★ Windows 7

                      Comment


                        #12
                        Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                        Nice tip Ubuntuku! I didn't know about that tool. I have done it the manual way in the past.

                        Please Read Me

                        Comment


                          #13
                          Re: Grub/boot problem with dualboot of windows 7 and kubuntu 11.10

                          Yup, that thing works really well. Basically got everything fixed just the way I want it. Thanks for all the help!

                          Comment

                          Working...
                          X