Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Run Linux off of USB hard disk?

  1. #1
    Join Date
    May 2017
    Beans
    71

    Run Linux off of USB hard disk?

    Hello all,

    So I've been thinking about the possibility of running an entire operating system off of a USB hard disk for testing purposes.

    Is it possible?

    Also, how would this set up conflict with my existing M.2. SSD which already has the GRUB files in order to boot properly?

    No conflict at all?

    Thanks!

  2. #2
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,359
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Run Linux off of USB hard disk?

    If you want a USB Hard disk that will boot on both BIOS and UEFI computers look at this https://askubuntu.com/questions/1217...e-step-by-step

  3. #3
    tea for one is offline Chocolate-Covered Ubuntu Beans
    Join Date
    May 2008
    Beans
    1,344
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Run Linux off of USB hard disk?

    In order to avoid conflict with existing GRUB files on your M.2.SSD, then isolate, de-activate or physically remove the drive before installing Ubuntu on your USB hard disk.

    Ubuntu will install GRUB on the first available drive, therefore it is better to only have the target drive accessible during installation.

    Boot each system independently via UEFI boot screen

    Boot priority can be controlled by UEFI

    Each OS should be installed in UEFI mode with GPT

    Each drive should have EFI partition

    Each drive should have grub (if both Linux)

    Ensure that you have different UUIDs for each OS

  4. #4
    Join Date
    May 2017
    Beans
    71

    Re: Run Linux off of USB hard disk?

    Quote Originally Posted by C.S.Cameron View Post
    If you want a USB Hard disk that will boot on both BIOS and UEFI computers look at this https://askubuntu.com/questions/1217...e-step-by-step
    That is a very good guide, thanks! Kind of intricate yes, but will give it a try. It would be a good idea if somebody created a program or little script to make a bootable USB device like this!

    Apparently I can only install operating systems on UEFI mode with my pre-built mini-pc from Lenovo. Do you think it's still possible?

    Quote Originally Posted by tea for one View Post
    In order to avoid conflict with existing GRUB files on your M.2.SSD, then isolate, de-activate or physically remove the drive before installing Ubuntu on your USB hard disk.
    Is it possible to de-activate any disks (SSD or HDD) via BIOS settings?

    I know one can manually set a list of booting device priority in the BIOS, but if I set a "USB-HDD" on the top of the boot list, why will it still conflict with my existing primary SSD?

    Wouldn't it be the same situation as booting a Live CD or Live USB with an existing primary hard disk containing the bootloader?

  5. #5
    tea for one is offline Chocolate-Covered Ubuntu Beans
    Join Date
    May 2008
    Beans
    1,344
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Run Linux off of USB hard disk?

    Just to clarify for future advice and to avoid confusion:-

    • Are you interested in a live USB with persistence?
    • Or, do you want a full separate installation with username, password etc?

    My comments are based on a full installation to a separate device.
    Quote Originally Posted by username2758 View Post

    Is it possible to de-activate any disks (SSD or HDD) via BIOS settings?
    Yes, that is perfect if your UEFI firmware has the setting.

    I know one can manually set a list of booting device priority in the BIOS, but if I set a "USB-HDD" on the top of the boot list, why will it still conflict with my existing primary SSD?
    There will be no conflict after you have installed to your separate USB-HDD.
    As I mentioned previously, the GRUB problem can occur during the installation process of the second OS, therefore only have the target drive accessible.
    Wouldn't it be the same situation as booting a Live CD or Live USB with an existing primary hard disk containing the bootloader?
    A live session will not overwrite or interfere with existing GRUB - unless you explicitly want to change, repair or re-configure GRUB.

  6. #6
    Join Date
    May 2017
    Beans
    71

    Re: Run Linux off of USB hard disk?

    Quote Originally Posted by tea for one View Post
    Just to clarify for future advice and to avoid confusion:-

    • Are you interested in a live USB with persistence?
    • Or, do you want a full separate installation with username, password etc?

    My comments are based on a full installation to a separate device.
    Of course I want a separate, full installation of Linux on a USB device. Guess I made that clear.

    The only reason I asked about the possibility of conflict is because I never tried this before, and thought to myself "oh, if there are two different hard disks with each having its own bootloader, then could there be conflict?".

    But now I guess it's settled. According to you, the only possible GRUB issue can occur during installation, not initialization. Therefore, it's settled.

    All that is left now is find that BIOS settings that disables the SSD or HDD completely. I never found one motherboard that has it. But if it does exist, then it would save a lot of time for sure.

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Run Linux off of USB hard disk?

    If you do not have UEFI setting to disable internal drive, then review this old bug report on where grub in UEFI boot mode installs.
    My motherboard has disable as one of options on setting drives with AHCI & RAID.

    I have installed multiple times to external flash drives & SSD. Bit surprised on how fast SSD was, expected USB3 port to be slower.

    Posted work around to manually unmount & mount correct ESP during install #23 & #26
    https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379
    Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.
    Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)
    Or if you have ESP on second or external drive, you can just reinstall grub, either manually or using Boot-Repair's advanced mode & full reinstall of grub to correct drive.

    Before I found above work around, it used to just install grub to my internal drive.
    I found I could manually edit the 3 line grub.cfg in /EFI/ubuntu/grub.cfg with my main working install's ESP. And then added boot of external to 40_custom.
    But external drives directly boot from UEFI using /EFI/Boot/bootx64.efi, just as the live installer does. Slightly different version of bootx64.efi with live installer & full install. You then must have an ESP on external drive & boot files in that ESP.
    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.

  8. #8
    tea for one is offline Chocolate-Covered Ubuntu Beans
    Join Date
    May 2008
    Beans
    1,344
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Run Linux off of USB hard disk?

    Quote Originally Posted by username2758 View Post
    All that is left now is find that BIOS settings that disables the SSD or HDD completely. I never found one motherboard that has it. But if it does exist, then it would save a lot of time for sure.
    It certainly does exist in many iterations of UEFI.

    However, in your case, you will have to examine the settings/features/configurations of your Lenovo UEFI.

    There does not seem to be any great consistency in UEFI firmware settings of individual vendors.

  9. #9
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,359
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Run Linux off of USB hard disk?

    For a less complex alternative to the link I posted see: https://askubuntu.com/questions/1300...-bios-and-uefi

    You can flash it to disk using mkusb, Rufus, Etcher, Disks or dd.

    The image file was created by sudodus, (the creator of mkusb). It works with an SSD but overwrites the whole drive.

  10. #10
    Join Date
    May 2017
    Beans
    71

    Re: Run Linux off of USB hard disk?

    Quote Originally Posted by C.S.Cameron View Post
    For a less complex alternative to the link I posted see: https://askubuntu.com/questions/1300...-bios-and-uefi

    You can flash it to disk using mkusb, Rufus, Etcher, Disks or dd.

    The image file was created by sudodus, (the creator of mkusb). It works with an SSD but overwrites the whole drive.
    Oh my God, thank you Cameron! This looks much easier than the other method.

    Just one question: with a full install USB drive of Ubuntu for example, will I be able to carry it around and plug it into any other motherboard and make it boot to the OS regardless of any driver compatibility issues? IIRC, with Microsoft Windows you can't do that because of either the motherboard or the previously installed drivers. Not sure though.

Page 1 of 3 123 LastLast

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
  •