Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

  1. #1
    Join Date
    Sep 2007
    Location
    Vietnam
    Beans
    73
    Distro
    Ubuntu 18.04 Bionic Beaver

    USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    I have a new Lenovo Thinkpad T440p with Windows 7 installed. This is a company machine and I cannot install Linux on it ("corporate IT does not support this") and I can (for the same reason) not set up a dual-boot system on the machine's SSD.

    With my previous machine (an older Dell Vostro) I simply created an Ubuntu install on a USB flashdrive (15 Gbyte as "/" and 15 Gbyte as "/home"). This allowed me to do the things I needed using Linux.

    With the new machine I wished to do the same. The UEFI on the T440p was set to allow UEFI and Legacy boot with UEFI as the first priority, further it was also set to allow CSM support and Secure Boot was disabled.

    On startup the machines splash screen displays a message stating "Press enter to interrupt normal boot", ignoring this message boots the machine directly to Windows 7. Presssing enter brings up a menu which allows you to enter the EUFI (BIOS) setup or select a boot device (SSD, DVD or Network).

    I selected DVD to boot from an Ubuntu 14.10 (64-bit) disk. This worked well and I could confirm that things worked as I am used to. I then inserted the 32Gb flashdrive I had previously used and proceeded to install Ubuntu in the same way as I always do. The intended set up was to have the boot loader installed on the flash drive so that when it is not connected to the machine, it is a Windows machine, but with the flash drive installed it would be a dual boot (although I would use this only to run Linux).

    All went well and the install completed normally. Upon re-booting the machine with the flashdrive connected I got the GRUB menu I expected, selected Ubuntu which booted without problems. I then removed the flash drive and tried booting Windows. This did not work. The screen displays a note saying "Booting in insecure mode" and then displays a GRUB screen (GNU GRUB version 2.02~beta2-15) and a "grub>" prompt.

    Going into the UEFI (BIOS), and looking at the Boot priority order, showed the following:

    1. ubuntu
    2. Windows Boot Manager
    3. USB CB
    4. USB FDD
    5. ATAPI CD HL-DT-ST DVDRAM GU90N (dvd drive)
    6. ATA HDD0 SAMSUNG M27TD256HAFV-000L9 (256 Gbyte SSD)
    7. ATA HDD1:
    8. ATA HDD2:
    9. USB HDD
    10. PCI LAN (two options IPV4 and IPV6)

    With Ubuntu selected as first priority, the machine will boot into Ubuntu off the flash without a problem. Removing the drive and trying to boot Windows results in the appearance of the GRUB prompt. Changing the Boot Order and selecting the Windows Boot Manager as the first priority means that the machine boots Windows whether the flash drive is connect or not.

    The two screenshots show the partition setup for the flash drive and the SSD.

    From these it appears that the boot loader for Linux (GRUB) is installed on the SSD and not on the flash drive (which is where I thought I had set it to be installed and where on my old machine it used to be installed. The fstab (found on the flashdrive at /etc/fstab and shown below) shows /boot/efi created on the SSD.

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sdb1 during installation
    UUID=fe31225f-df58-4373-add3-902ddb58b4bb /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/sda2 during installation
    UUID=F0E5-06EA  /boot/efi       vfat    defaults        0       1
    # /home was on /dev/sdb5 during installation
    UUID=2939ec3b-322e-4b57-a014-4a7b1ac1f3d9 /home           ext4    defaults        0       2
    # swap was on /dev/sdb6 during installation
    UUID=e11653ba-734d-455c-9f3e-2237a552d717 none            swap    sw              0       0

    What I wish to achieve is the following.


    1. A machine that will boot Windows directly from the SSD when the flash drive is not connected.
    2. A machine that will boot to the GRUB menu the flash drive is connected.


    This is how it worked on my old Dell machine (but this had a conventional BIOS and not UEFI).

    In my limited understanding of these things, it seems that the Linux bootloader (GRUB) got installed to the SSD and not the flashdrive and that to get things to work in the way I want them to work, the Linux bootloader needs to be "moved" from SSD to the flashdrive.

    From this two questions:

    1. Is my understanding correct, and if so how do I move the bootloader (without messing up the Windows install)
    2. If I have this all wrong, what do I need to do to get things to work in the way I want (as it was on my older Dell).

    In the meantime the workaround for me is to set the boot order to the Windows Boot Manager by defualt (number 1) and change the order to have the Linux bootloader as 1 in the UEFI when I wish to run Ubuntu. This will work, but it is a nuisance as one of the things I use Ubuntu for is a daily back up of my computer.

    Any advise would be greatly appreciated.

    Cheers,
    Attached Images Attached Images
    Jac de Beer

    Save the Earth, it is the only planet that has chocolate!

  2. #2
    Join Date
    Apr 2011
    Location
    3rd Rock from the Sun
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: USB flasdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Use Boot-Repair tool to "create a bootinfo summary" note the url to the file and post the link here.
    Keep the flashdrive plugged in when you use BR.

    From the screenshots it looks like you've installed ubuntu in MBR mode. So Windows is booting in EFI and Ubuntu in MBR. Not a good thing.
    To install Ubuntu you need a GPT partition scheme on the flashdrive. and it should also have an ESP FAT32 partition. Bootinfo should be able to tell us more.

    Meanwhile go through this: https://help.ubuntu.com/community/UEFI
    "Evolution is Nature's way of issuing upgrades."


  3. #3
    Join Date
    Sep 2007
    Location
    Vietnam
    Beans
    73
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: USB flasdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Hi fantab,

    Thanks for taking the time to respond.

    I have run boot-repair as you suggested. O booted the machine from a live DVD, installed boot-repair and ran it. The report can be found at:

    I ran a second boot-repair with Ubuntu booted from the USB flashdrive and this report is at:


    I have looked at both, but I am afraid that I do not make head or tail out of either of these.

    Your advice would be greatly appreciated.

    Cheers,
    Jac de Beer

    Save the Earth, it is the only planet that has chocolate!

  4. #4
    Join Date
    Mar 2011
    Beans
    1,718

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Looks like you set up the USB as a legacy boot, not a UEFI boot.
    Read:
    https://help.ubuntu.com/community/UEFI
    and
    http://askubuntu.com/questions/22183...uefi-supported
    for info on UEFI.
    Basically, you need to boot the live media in UEFI mode to perform a UEFI installation. The installer SHOULD make a 300M FAT32 partition with the boot flag on the target USB for holding the UEFI bootloaders (in directories /EFI/Boot and /EFI/ubuntu). The nvram on you your host SHOULD simply have the USB device first. And NOTHING other than the nvram order needs to be written to the host machine. Now what actually happens may vary, but you can always just copy any files in the wrong directories to the right ones, the bootloaders are just files under UEFI, or use boot-repair to do the necessary work (and probably some unnecessary work too). The minimal USB EFI partition is:
    1)/EFI/ubuntu holding a grub.cfg file which merely bring in the maintained grub.cfg from your /boot/grub directory.
    2)/EFI/Boot/bootx64.efi which is a copy of grubx64.efi (with secure boot off). If you want to enable secure boot, you should instead make /EFI/Boot/bootx64.efi a copy of shimx64.efi, and have grubx64.efi there too. Actually, the secure boot setup works for both, so I'd do the additional work of copying one more file.
    The host machine needs to have the USB device first in boot order, the default bootloader will be the /EFI/Boot/bootx64.efi, and that's it.
    The installers tended to put everything on the host's system's EFI, but that's just in the /EFI/ubuntu directory, so may be easily removed (or just left there as a backup).

  5. #5
    Join Date
    Apr 2011
    Location
    3rd Rock from the Sun
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Quote Originally Posted by ubfan1 View Post
    Looks like you set up the USB as a legacy boot, not a UEFI boot.
    Read:
    https://help.ubuntu.com/community/UEFI
    and
    http://askubuntu.com/questions/22183...uefi-supported
    for info on UEFI.
    +1.

    Code:
    parted -l:
    
    Model: ATA SAMSUNG MZ7TD256 (scsi)
    Disk /dev/sda: 256GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags:
    
    Number  Start   End    Size   File system  Name                          Flags
    1      1049kB  316MB  315MB  ntfs         Basic data partition          hidden, diag
    2      316MB   840MB  524MB  fat32        EFI system partition          boot, esp
    3      840MB   974MB  134MB               Microsoft reserved partition  msftres
    4      974MB   256GB  255GB  ntfs         Basic data partition          msftdata
    
    
    Model: Kingston DataTraveler 3.0 (scsi)
    Disk /dev/sdb: 31.5GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags:
    
    Number  Start   End     Size    Type      File system     Flags
    1      4129kB  15.0GB  15.0GB  primary   ext4            boot
    2      15.0GB  31.5GB  16.5GB  extended
    5      15.0GB  30.0GB  15.0GB  logical   ext4
    6      30.0GB  31.5GB  1451MB  logical   linux-swap(v1)
    As you can see Samsung HDD or /dev/sda is GPT partitioned. GPT [GUID Partition table] is a MUST for an OS to work in UEFI mode.
    The Kingston or /dev/sdb is 'msdos' partitioned and this does NOT support UEFI booting.
    Reinstall ubuntu in UEFI mode on USB device. You may also find this HOW TO useful.
    Remember -
    1. how you boot Ubuntu DVD/USB to install is how you install. If you boot the media in UEFI mode then Ubuntu will install in UEFI mode.
    See Here to know how you've booted.
    2. Install bootloader, Grub to USB drive only, in your case /dev/sdb.

    Good Luck.
    "Evolution is Nature's way of issuing upgrades."


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

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    I thought you had to have gpt to boot in UEFI mode. But obviously live installer is not, so it is not an absolute requirement.
    It looks like you installed in BIOS/CSM boot mode, but Boot-Repair converted to UEFI, by reinstalling the grub UEFI boot loader into the internal drive.

    You could convert back to BIOS boot for Ubuntu and leave Windows as UEFI. But Booting is more difficult as you have to switch modes UEFI/BIOS each time you reboot into the other system. Generally better to have both as UEFI.

    Even when I installed a second copy of Ubuntu to a second drive and told it to install grub to sdb, it still installed grub to sda's efi partition. I just then copied that boot folder to the sdb efi partition.

    You do not have to try to have both boot mode. Sudodus has had issues as updates get out of sync. But this shows how to install to a flash drive.
    Flash drive to boot in UEFI or BIOS - sudodus
    https://help.ubuntu.com/community/In.../UEFI-and-BIOS
    http://spblinux.de/blog/2013/06/uefi...ck-with-grub2/
    http://askubuntu.com/questions/55900...rive-with-uefi
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Sep 2007
    Location
    Vietnam
    Beans
    73
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Thanks fantab, ubfan1 and oldfred.

    Quite a bit of valuable information to get my head around. I will read through all of this in some more detail and then see what is to be done. I will get back to this thread with further questions or, with a bit of luck, be able to mark it solved

    Cheers,
    Jac de Beer

    Save the Earth, it is the only planet that has chocolate!

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    The following link describes how to install Ubuntu in UEFI mode. I removed the internal disk to avoid confusion during the installation.

    https://help.ubuntu.com/community/In...t_in_UEFI_mode

  9. #9
    Join Date
    Sep 2007
    Location
    Vietnam
    Beans
    73
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    Thanks sudodus,

    I will take a good look through the explanation in the link you posted over the weekend (getting there...). The installation is usable at the moment, but I have to keep changing the boot sequence in the nvram to boot Ubuntu... a bit of a nuisance.

    Anyway, lots of info from everyone so I am sure I can get it to work.

    Cheers,
    Jac de Beer

    Save the Earth, it is the only planet that has chocolate!

  10. #10
    Join Date
    Jul 2008
    Beans
    233
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: USB flashdrive 14.04 install on Lenovo T440p (UEFI) running Win 7

    I have purchased the same computer. Preparing to install 14.04. Has this been solved?
    Lenovo T440p | Trusty Tahr
    Dell Studio XPS 1645 | Intel Core i7 1.73GHz | Xenial Xerus

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •