Announcement

Collapse
No announcement yet.

Install to USB HDD...

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

    Install to USB HDD...

    Hey everyone..I have a quick question. I currently dual boot with Mandriva/XP. Mandriva has been a good distro, but the current version is just so so. I installed Kubuntu in VirtualBox and so far it seems to be great. However, there weren't any options for the GRUB unless I missed it somewhere, but I didn't see it. What I want to do is install Kubuntu completely on a USB HDD (for now)... meaning that when the drive is plugged it, it boots directly to Kubuntu without writing anything to the internal HDD. If the drive is NOT plugged in, it would then go to the Mandriva GRUB.

    I don't want to add a Kubuntu entry to my Mandriva GRUB. My system supports USB boot, and that's the route I want to take. So, how can I prevent the Kubuntu GRUB from being written to the internal HDD?

    Hope I made sense on this...
    THANKS!

    #2
    Re: Install to USB HDD...

    Does you BIOS support booting USB drives? If so, you can do this:

    Depending on the USB name - use 'fdisk -l' to make sure
    Then if its on first partition.

    Code:
    mount /dev/sdb1 /mnt
    mount --bind /dev /mnt/dev
    mount --bind /dev/pts /mnt/dev/pts
    mount --bind /dev/shm /mnt/dev/shm
    mount -t proc none /mnt/proc
    mount -t sysfs none /mnt/sys
    chroot /mnt /bin/bash
    grub-install /dev/sdb --root-directory=/ --recheck
    That would put grub on the MBR of sdb. Then boot choosing usb.
    Boot Info Script

    Comment


      #3
      Re: Install to USB HDD...

      So I am about to install, at what point do I do this step?
      Thanks for the info!!

      Originally posted by verndog

      Depending on the USB name - use 'fdisk -l' to make sure
      Then if its on first partition.

      Code:
      mount /dev/sdb1 /mnt
      mount --bind /dev /mnt/dev
      mount --bind /dev/pts /mnt/dev/pts
      mount --bind /dev/shm /mnt/dev/shm
      mount -t proc none /mnt/proc
      mount -t sysfs none /mnt/sys
      chroot /mnt /bin/bash
      grub-install /dev/sdb --root-directory=/ --recheck
      That would put grub on the MBR of sdb. Then boot choosing usb.

      Comment


        #4
        Re: Install to USB HDD...

        You should install Kubuntu on USB, then boot into Mandriva, plug in your USB drive and then follow these steps.

        Comment


          #5
          Re: Install to USB HDD...

          Originally posted by aqeeliz
          You should install Kubuntu on USB, then boot into Mandriva, plug in your USB drive and then follow these steps.
          If I install on USB then by default will Kubuntu overwrite the Mandriva GRUB?

          Mainly I don't want to mess with my Mandriva GRUB. In the past I have royally SCREWED it up, and I have it setup how I want it, so if I can avoid messing with it, that's my goal.
          Thanks for the help!!

          Comment


            #6
            Re: Install to USB HDD...

            Originally posted by Kallen
            Originally posted by aqeeliz
            You should install Kubuntu on USB, then boot into Mandriva, plug in your USB drive and then follow these steps.
            If I install on USB then by default will Kubuntu overwrite the Mandriva GRUB?

            Mainly I don't want to mess with my Mandriva GRUB. In the past I have royally SCREWED it up, and I have it setup how I want it, so if I can avoid messing with it, that's my goal.
            Thanks for the help!!
            No, because your going to install grub on /dev/sdb. Your Mandrivia is on /dev/sda correct?

            Output the following, with USB drive plugged in.:

            Code:
            sudo fdisk -l
            sudo blkid
            Boot Info Script

            Comment


              #7
              Re: Install to USB HDD...

              This thread might help: http://kubuntuforums.net/forums/inde...0208#msg220208

              In my post, I mention that I like to do single drive installs only - but that does create some configuration needs afterwards to get everything automatically set up when both drives are present.

              At the very end of the install screens there might/should be an "advanced" button that allows selecting which device to put grub on. If the option allows selecting the usb drive to put grub on, then installing with both drives present might be almost painless - and possibly preferable.

              My laptop operates the same way you are talking about. With the usb drive connected, that is the boot device, but when the usb drive is removed, the internal drive boots.

              Comment


                #8
                Re: Install to USB HDD...

                The method in that thread works but is slightly OTT (at least for me). It definitely works and therefore, well, workable

                To answer the OPs question: you specify location of grub at the very last install screen. The option is well hidden and you need to click the "advanced" box to go into it. There you will be given the option of which drive and partition to install it in. Here some piccies for you - I highlighted the advanced option:





                You just need to make sure you do NOT select sda but sdb or sdc or whatever your drive designation your usb stick is.

                HTH

                EDIT:
                And while you're at it, make a backup copy of your /boot/grub/ folder - you know it makes sense
                Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                Comment


                  #9
                  Re: Install to USB HDD...

                  I don't have anything to add to the instructions on how to do this, just wanted to mention that running from a USB hard drive will result in a loss of performance. USB bus speeds are not nearly as fast as the speed of an internal hard drive.

                  Comment


                    #10
                    Re: Install to USB HDD...

                    Originally posted by toad
                    The method in that thread works but is slightly OTT (at least for me). It definitely works and therefore, well, workable

                    To answer the OPs question: you specify location of grub at the very last install screen. The option is well hidden and you need to click the "advanced" box to go into it. There you will be given the option of which drive and partition to install it in. Here some piccies for you - I highlighted the advanced option:





                    You just need to make sure you do NOT select sda but sdb or sdc or whatever your drive designation your usb stick is.

                    HTH

                    EDIT:
                    And while you're at it, make a backup copy of your /boot/grub/ folder - you know it makes sense
                    AAaaahhhhh ok, I did not even notice that little Advanced button. Thanks.

                    Originally posted by Detonate
                    I don't have anything to add to the instructions on how to do this, just wanted to mention that running from a USB hard drive will result in a loss of performance. USB bus speeds are not nearly as fast as the speed of an internal hard drive.
                    Yeah I know...mainly I wanted to test Kubuntu without installing it on my main drive. Keeping in mind the degradation in performance. Mandriva has been great, but it's going downhill for me/my system.



                    Comment


                      #11
                      Re: Install to USB HDD...

                      So far, boot is a no-go. I installed it to the external (sdb). Under advanced, it defaulted the GRUB install to sdb. Reboot the system, and nothing. Checked BIOS, and USB Memory is first in boot order. Booted back to CD, ran sudo fdick -lu and it shows that sdb1 is boot partition. I am used to having an option on the LiveCDs to reinstall GRUB and couldn't find it, so rather than manually run the commands I simply reinstalled everything (not a big deal...10 minutes verses like 1.5 hours with Windows...) Anyways, this time I selected sdb1 for the GRUB install. Still nothing. Soooo....what am I missing? Thanks again

                      Comment


                        #12
                        Re: Install to USB HDD...

                        "I installed it to the external (sdb). Under advanced, it defaulted the GRUB install to sdb. Reboot the system, and nothing."

                        That should have worked. By selecting sdb, that puts GRUB in the MBR of sdb (using the GRUB files in sdb1). You do want GRUB in sdb. If you put it in sdb1, then you have to do what Verndog says to install it to the MBR of sdb.


                        > When you say you re-booted and nothing happened, what do you mean? What DID happen?

                        > And, of course, you said you made sure that BIOS was set to boot from USB.
                        Now, I have seen this (on the BIOS of one of my machines): I have to set BIOS to boot from USB (e.g., a flash drive or an external USB HD), but I also must enter BIOS and ensure that the boot order specifies the USB drive (in your case sdb) is listed as first in HD boot order (following the CD drive). PITA, quirky, sometimes not required, unpredictable, but when I do take time on re-boot to enter BIOS and manually ensure all is well, then it boots properly upon pressing F10 (Intel: save BIOS settings and Exit BIOS).

                        > You might try this, assuming GRUB was put in sdb1:
                        Re-boot, hopefully get SOME GRUB menu, perhaps from Mandriva, hit the "c" key (or whatever) to get a GRUB prompt (like grub>), then
                        grub>set root=(hd1,1)
                        grub>chainloader+1

                        Or, if GRUB was installed to the MBR of sdb:
                        grub>chainloader (hd1)+1

                        (I'm assuming hd0 will be sda and hd1 will be sdb. So (hd1,1) = sdb1 if using GRUB2! If using GRUB Legacy, then do: set root=(hd1,0) for sdb1.)


                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Re: Install to USB HDD...

                          When I say that nothing happens upon reboot, I mean to say that the system boots from the internal HDD which is third in the boot priority. It's set at USB Memory, CD, HDD. I have checked several times to ensure this, and it still skipped the USB. I am runing a Toshiba Satelite, and when first booted I can hit F2 to enter setup or F12 for boot menu. Boot menu gives the device options to boot from (so if say CD was not set to be before HDD I could select it here and still boot from CD). I have done this and select USB and it still goes to the internal. Install of the OS was successful as I can access the file system from Mandriva...

                          Comment


                            #14
                            Re: Install to USB HDD...

                            have a look whether it is flagged as bootable...
                            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                            Comment


                              #15
                              Re: Install to USB HDD...

                              Yep, what toad says.
                              Use GParted Live CD to see if a boot flag is set on sdb1 (to set it: Partition > Manage Flags).
                              Otherwise, getting suspicious that this is a BIOS quirk, not a GRUB quirk ... ?

                              Other two options (which you ruled out) explained in my GRUB how-to's:
                              -- Build a separate dedicated GRUB partition on sda, a small one like 300 MB, to control all booting;
                              -- Simply add a boot stanza for sdb1 in your Mandriva GRUB menu (which you can always delete if you wish or choose not use it);

                              Btw, did you try the chainloading I recommended to see if it will boot that way (through BIOS)? Get the Mandriva boot menu and hit the "c" key (or whatever)?
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X