11

I think the question is pretty much self-explanatory, and requires a yes or no answer.

My specific situation is the following. I recently replaced my old HDD with an SSD, upgrading to xenial in the process. I placed the HDD with trusty in an external USB case, and tried booting from it but it didn't work.

I am wondering whether I need to add some files to the HDD in order to make it externally bootable, or whether this is a hardware problem as suggested here (which btw I think is not a duplicate). I am using an ORICO 2588US3 external case on a Toshiba Satellite L855-149.

sanwablo
  • 541
  • 2
  • 7
  • 22
  • 5
    Is system UEFI or BIOS. BIOS should just work as long as you did not dd from HDD to SSD and end up with duplicate UUIDs. But UEFI only boots from /EFI/Boot/bootx64.efi. You would have to copy /EFI/ubuntu to /EFI/Boot and rename shimx64.efi to bootx64.efi to boot external in UEFI mode. But as noted in other comments, we have seen various USB cases not work with SSD, or not work with large drives, or not work with gpt partitioned drives, or not work with USB3 ports (may be system then not case). – oldfred Dec 06 '16 at 19:04
  • In my current internal SSD, "sudo parted --list" gives me a 500MB "EFI System Partition". I guess that means the HDD must be EFI as well? I will try your method later today. – sanwablo Dec 07 '16 at 12:16
  • @oldfred I can't find either directory. There is no /EFI/Boot folder, but only /boot/efi/, and there is no /ubuntu/ folder in there. – sanwablo Dec 07 '16 at 12:29
  • Are you looking for /boot/efi/Boot/ubuntu in your install. That typically has in fstab setting that prevent you from seeing it. Boot-Repair can reset those as it also wants to see & edit ESP.http://askubuntu.com/questions/794725/can-i-remove-windows-boot-manager-from-dedicated-ubuntu-computer?noredirect=1#comment1197619_794725 Or use live installer which will let you mount ESP on both internal & external drives. – oldfred Dec 07 '16 at 16:12
  • Thanks for that. Funnily enough, editing /etc/fstab as you suggest only lets me see inside the internal SSD /boot/efi/ directory, not the external HDD one! I can't see the directory on a Xubuntu 16.04 live installer session either. Which option in boot-repair is the one that makes the changes you suggest? Selecting OS to boot as default? – sanwablo Dec 07 '16 at 19:06
  • You should not be editing live system's as it is not editable. You are editing a full install on external drive?? And that would be another mount point on a different drive. I think running just about any UEFI repair options in Boot-Repair changes fstab of a full install. Not sure if it works first time if booted from the internal install, as whenever I manually edit that ESP fstab entry, it does not remount with new permissions until I reboot. Or Boot-Repair only edits it from live installer? – oldfred Dec 07 '16 at 19:11
  • I meant I can't see it from the live installer. And I did reboot after editing fstab. So probably I'll need to run boot-repair and see what happens? – sanwablo Dec 07 '16 at 19:18
  • 1
    Just to be sure we are on same page: May be best to see details, you can run from Ubuntu live installer or any working install: Post the link to the Create BootInfo summary report. Is part of Boot-Repair: https://help.ubuntu.com/community/Boot-Info – oldfred Dec 07 '16 at 20:33
  • Here it is: http://paste2.org/2dZjBEVA – sanwablo Dec 07 '16 at 21:59
  • You need to have in sdb1 a new /EFI/Boot folder. Copy everything in sdb's /EFI/ubuntu folder to /EFI/Boot and rename shimx64.efi to bootx64.efi. External drives only boot from /EFI/Boot/bootx64.efi. And the copy of shimx64.efi that you use is hard coded to find more files in /EFI/ubuntu so you need both folders. Not sure if Boot-Repair will do that if you tell it drive is external. – oldfred Dec 07 '16 at 23:11

3 Answers3

11

Because of the internal USB to SATA bridge adapter used inside of external disk drive cases, transplanted disk drives may require reformatting before they can be used... so the answer is "maybe".

Some of the older/cheaper cases have limitations on how large a drive it will support. Usually if you're under 1TB you should be fine.

"Standard" Windows won't boot from an external USB drive. On the Ubuntu side, if you've edited /etc/fstab, and used device names (ie:/dev/sda2) in your mount statements, instead of UUID's, then there may be a booting problem as device names can change depending on your current hardware configuration, UUID's don't change.

If you cloned from HDD to SDD, you'll probably have to disconnect the HDD or you'll have booting problems because the UUID's are duplicated on both drives. You can change the UUID's on one of the drives using sudo blkid and (sudo tune2fs or gparted) such that there are no duplicated UUID's.

On a hardware note, I've had really bad luck with Orico external cases. I just sent back two to Newegg because they didn't work. Another case, using the same disk drive, worked fine.

heynnema
  • 70,711
  • Thanks, hyennema. One questions first: what kind of reformatting is required? Could you provide a link with a tutorial? Does it involve wiping the whole disk? Also, this Orico case seems to be working fine: it is mounted automatically and I have copied many of my files to my new drive. I just can't boot from it. – sanwablo Dec 06 '16 at 17:33
  • Windows won't boot from an external USB without a hack. Ubuntu should boot fine. Reformatting wipes the drive. The Orico case could still be the problem. – heynnema Dec 06 '16 at 17:41
  • Could somebody please explain why I got a down vote? I've been working with hardware for over 40 years, so I know my answer is valid. – heynnema Dec 06 '16 at 17:41
  • I will vote your posts up too - heynnema's answer is relevant and helpful, and the question is relevant :-) – sudodus Dec 06 '16 at 18:00
  • Yeah, don't forget voting questions up as well if they're good ones! – sanwablo Dec 06 '16 at 18:12
  • @sawablo done!! – heynnema Dec 06 '16 at 18:20
  • I would suspect that the downvote came from a misunderstanding of your answer. I think your answer is perfectly alright and helps explain. +1 =) – Terrance Dec 06 '16 at 18:23
  • @sawablo I've made some edits to my answer. – heynnema Dec 15 '16 at 13:38
4

Yes - Linux works from USB - and I am learning now, that Windows can work too

I have done it many times, with HDDs and SSDs. It should definitely work in the same computer, and will work in many other computers too, particularly if you have not installed any proprietary drivers. (It works in my Toshiba Satellite Pro bought 2013, but another model than yours.)

If it does not work, I would suspect

  1. either the casing (some electronic component or some programming in the casing) or the combination of the computer's USB system and the casing,

  2. or the UEFI/BIOS system in the computer. If the drive is installed in UEFI mode, there might be problems, particularly if the UEFI system does not follow the standard specifications.

  3. [Edit] There are general tips and detailed instructions in the following link and links from it to help you make a portable installed Ubuntu system in an external drive,

    Boot Ubuntu from external drive.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Which version of Windows are you claiming "does not work from USB"? From personal experience I know that Windows 10 1611 does work. So does Windows Embedded Standard (since it was named XP Embedded) but that behaved somewhat differently from vanilla Windows. Probably the various bugs preventing USB boot were fixed in the mainline distribution at the same time "Windows To Go" was introduced, but it would be nice to confirm that. – Ben Voigt Dec 06 '16 at 19:33
  • Interesting! I have tried a few times with previous versions (before Windows 10) and always failed. I have also had this information from other people that Microsoft does not want it to work. I installed Win10_1607 system and I have the iso file, and I can try tomorrow. I would be happy if it works now, even if it will not be portable like linux distros :-) – sudodus Dec 06 '16 at 20:43
  • 1
    To make a bootable USB, don't clone an existing install or run the usual GUI installer, instead mount the ISO and use dism. The command is /Apply-Image, needs some parameters which you can easily find with google. Use the version of dism in the sources subdirectory of your mounted ISO. – Ben Voigt Dec 06 '16 at 20:47
  • Well, I was talking about an installed Windows system. (I added the feature to create a Windows install USB drive to mkusb-nox and dus, so I know that part of the problem.) – sudodus Dec 06 '16 at 20:50
  • 1
    dism creates an installed system. I'm not simply talking about copying the install files to the USB, which creates a bootable installer. This will be full Windows running from the USB, but you need to bypass the installer GUI which makes assumptions (such as, the created install will only be booted on the computer creating it) which are valid for fixed disks but not for USB. – Ben Voigt Dec 06 '16 at 20:53
  • I see. Interesting. I have used Windows preinstallation environments, I guess this method that you describe makes the something similar, but for a full Windows system. How portable will it be? – sudodus Dec 06 '16 at 21:00
  • 1
    Well, for certain the CPU architecture needs to be a match. Applying an x64 install image won't get you a USB disk that boots on x86 or ARM. Beyond that, it's probably more portable than (for example) SATA, because the USB controller software interface is highly standardized and only a handful of drivers need to be present (OHCI, EHCI, UHCI, xHCI) plus USB mass storage profile, no worries about BIOS setting for RAID mode that doesn't speak AHCI and needs proprietary drivers. I heard that getting such an install to stay activated if you move it around can be an issue. – Ben Voigt Dec 06 '16 at 22:02
  • I never had success for both Windows and Ubuntu Mate – Nidhin David Dec 10 '16 at 14:57
1

Installing a system in a specific machine on a specific drive does not guarantee it will be bootable on other machines:

  1. The launcher may be on another drive
  2. If your launcher is an .efi file, it won't work on legacy systems booting exclusively from MBR launchers.
  3. If using secure boot, you may not always have correct signature to boot.
  4. Boot partition is not guaranteed to be on the same drive when applicable

Excluding all above:

  1. Motherboard can prevent booting from USB due to configuration or legacy nature
  2. Booting may fail due to missing driver for a particular system
  3. USB bridge may be too slow to initialize and prevent detection on time by motherboard as bootable.

To make it short, no, it won't be automatically bootable, you must ensure your storage and target system has everything required.

Zulgrib
  • 263