Page 19 of 19 FirstFirst ... 9171819
Results 181 to 190 of 190

Thread: Portable installed system that boots in UEFI as well as in BIOS mode

  1. #181
    Join Date
    Mar 2011
    Location
    Idaho
    Beans
    293

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    The full install of grub does not create a /EFI/Boot folder nor bootx64.efi. You have to manually create that yourself.
    That can be created by running
    Code:
    sudo grub-install --removable /dev/sdX
    where sdX is the correct device and must have the correct usb hdd EFI partition mounted.
    that will write to the efi partition : efi/boot/bootx64.efi if running on a x64 os. You need to be booted into the usb installed linux or chroot into it. You can be booted into a different linux and add more switches to grub-install command if you do not want to boot/chroot into the usb install. If you are still in the install environment do not know just what would be needed.

    That should permit usb connected hdd/stick partitioned with gpt to boot in efi mode on all computers. I did say should. You will need to enter the firmware on boot to select the efi usb device.

    I did try it on Mint installed on a sata hdd connected to USB.

    More complicated and requires more then I will post is
    Code:
    sudo grub-mkstandalone -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi --compress="xz" --modules="part_gpt part_msdos ls cat configfile gettext " --fonts="unicode" -o "/boot/efi/EFI/boot/bootx64.efi"  "boot/grub/grub.cfg=/tmp/grub.cfg" -v

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

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    @LostFarmer,

    The reason for using mkusb as a starter for a full install is that it is doing something similar to what you describe in your post. I have not used grub-mkstandalone (not even been aware of it).

    It looks interesting, and might be the way to make things work, when it is difficult to remove the internal drive for example in computers with a soldered SSD or where the guarantee prescribes that the computer must not be opened

  3. #183
    Join Date
    Oct 2018
    Beans
    2

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    Quote Originally Posted by sudodus View Post
    A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode


    1. Current system, seems very stable so far

    The current system contains a live system and an installed system, and both work in UEFI and BIOS mode. The compressed image file

    dd_Ubuntu_14.04.2-UEFI-n-BIOS-10GB.img.xz

    at

    http://phillw.net/isos/linux-tools/uefi-n-bios/

    is created like this (only a crude description so far)
    So I tried to follow your instructions but with Ubuntu 18.04, but so far with no success. It would be very nice, if you could help me with this.

    So here's what I did:

    I'm using a SanDisk Ultra Fit USB 3.0 with 128 GB. My goal is to have a portable system which can be booted from most Computers including my Surface Pro 3. As I need the Surface and don't want to constantly repair its booloader (you can't disable the harddrive), I do all the work in VirtualBox.
    I partitioned the stick using Gparted as you described in step A, but with an additional partition as partition 1, which is an NTFS partition for exchanging files with Windows.
    So sda2 is my Fat32 partition with the live system. I installed the system using Linux Live USB Creator in Windows, because I couldn't download the file in VirtualBox (download errors, not enough free space...)
    sda5 is the partition I want to install Ubuntu to.

    listed by fdisk -lu
    Code:
    Festplatte /dev/sda: 115,7 GiB, 124218507264 Bytes, 242614272 Sektoren
    Einheiten: Sektoren von 1 * 512 = 512 Bytes
    Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
    E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
    Festplattenbezeichnungstyp: dos
    Festplattenbezeichner: 0x0009c581
    
    Gerät      Boot    Anfang      Ende  Sektoren Größe Kn Typ
    /dev/sda1            2048 112642047 112640000 53,7G  7 HPFS/NTFS/exFAT
    /dev/sda2  *    112642048 121653247   9011200  4,3G  c W95 FAT32 (LBA)
    /dev/sda3       121655294 242614271 120958978 57,7G  5 Erweiterte
    /dev/sda5       121655296 203831077  82175782 39,2G 83 Linux
    /dev/sda6       203833344 242614271  38780928 18,5G 82 Linux Swap / Solaris
    listed by parted -l
    Code:
    Modell: SanDisk Ultra Fit (scsi)
    Festplatte  /dev/sda:  124GB
    Sektorgröße (logisch/physisch): 512B/512B
    Partitionstabelle: msdos
    Disk-Flags: 
    
    Nummer  Anfang  Ende    Größe   Typ       Dateisystem     Flags
     1      1049kB  57,7GB  57,7GB  primary   ntfs
     2      57,7GB  62,3GB  4614MB  primary   fat32           boot, LBA
     3      62,3GB  124GB   61,9GB  extended
     5      62,3GB  104GB   42,1GB  logical   ext4
     6      104GB   124GB   19,9GB  logical   linux-swap(v1)
    listed by lsblk
    Code:
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    1 115,7G  0 disk 
    ├─sda1   8:1    1  53,7G  0 part /media/jo/Ubuntu Daten
    ├─sda2   8:2    1   4,3G  0 part /media/jo/MYLINUXLIVE
    ├─sda3   8:3    1     1K  0 part 
    ├─sda5   8:5    1  39,2G  0 part /media/jo/58338c12-15fd-4212-960d-6eb503964c24
    └─sda6   8:6    1  18,5G  0 part

    But in step C, when I try to install to sda5 I get an error during/at the end of the installation process.
    grub-efi-amd64-signed package failed to install into /target/
    I tried installing from a live image or without connection to the internet as that were the solutions I could find through Google.
    When this didn't work I installed grub using grub-install after the installation failed. I then proceeded to try and change the configuration files, but as there is no file named vmlinuz-4.15.0-29-generic.efi.signed in sda5/boot I get an error when choosing the new boot option.
    There is although a file named vmlinuz-4.15.0-29-generic in this directory.
    When using grub-install I made a mistake, rendering the live system unusable too. I reinstalled the live system using LiLi Usb Creator as before. I tried to install Ubuntu to sda5 again after this, getting the same error message and now I don't dare using grub-install again, as I'm just a beginner with Ubuntu and don't know how to do it properly.

    So now I can boot the live system, but after trying and failing to boot using the new entry I too get an error message saying /boot/vmlinuz could not be found.

    This are the files I changed:
    MYLINUXLIVE/boot/grub/grub.cfg
    Code:
    if loadfont /boot/grub/font.pf2 ; then
    	set gfxmode=auto
    	insmod efi_gop
    	insmod efi_uga
    	insmod gfxterm
    	terminal_output gfxterm
    fi
    
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    
    set timeout=5
    menuentry "Try Ubuntu without installing" {
    	set gfxpayload=keep
    	linux	/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash locale=de_DE bootkbd=de console-setup/lazoutcode=de ---
    	initrd	/casper/initrd.lz
    }
    menuentry "Install Ubuntu" {
    	set gfxpayload=keep
    	linux	/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash ---
    	initrd	/casper/initrd.lz
    }
    menuentry "OEM install (for manufacturers)" {
    	set gfxpayload=keep
    	linux	/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash oem-config/enable=true ---
    	initrd	/casper/initrd.lz
    }
    menuentry "Check disc for defects" {
    	set gfxpayload=keep
    	linux	/casper/vmlinuz  boot=casper integrity-check quiet splash ---
    	initrd	/casper/initrd.lz
    }
    
    
    menuentry 'Installed Ubuntu, with Linux 4.15.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29-generic-advanced-2a914602-bccd-4248-8b0a-66cff22173db' {
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos5'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  2a914602-bccd-4248-8b0a-66cff22173db
    	else
    	  search --no-floppy --fs-uuid --set=root 2a914602-bccd-4248-8b0a-66cff22173db
    	fi
    	echo	'Loading Linux 4.15.0-29-generic ...'
    	linux	/boot/vmlinuz-4.15.0-29-generic.efi.signed root=UUID=2a914602-bccd-4248-8b0a-66cff22173db ro  quiet splash $vt_handoff
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-4.15.0-29-generic
    }
    MYLINUXLIVE/syslinux/txt.cfg
    Code:
    label persist
    menu label ^Persistenter Modus
      kernel /casper/vmlinuz
      append  bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE  persistent noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
    label live
      menu label ^Live Modus
      kernel /casper/vmlinuz
      append   bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
    label live-install
      menu label ^Installation
      kernel /casper/vmlinuz
      append   bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE  only-ubiquity noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
    label check
      menu label ^Uberprufung der Integritat
      kernel /casper/vmlinuz
      append   bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE noprompt boot=casper integrity-check initrd=/casper/initrd.lz splash --
    label memtest
      menu label ^Uberprufung des Arbeitsspeichers
      kernel /install/mt86plus
    # ------------------------------------------------------------------
    label ubu-installed
      menu label ^Installed Ubuntu in partition 5 with grub in PBR
      com32 chain.c32
      append boot 5


    I think the two main problems are grub not being installed during the installation of Ubuntu 18.04 and the file vmlinuz-4.15.0-29-generic.efi.signed missing, but I don't know how to fix this.
    Any help would be appreciated.

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

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    @palindrom2,

    That method works for Ubuntu 14.04 LTS, but several things have changed during the four years since then, and I can understand that there are problems to use the same method for Ubuntu 18.04 LTS.

    You have found one difference, the name of the kernel file. Another difference is that there is another Ubuntu Startup Disk Creator, and it creates another partition structure than the old one. You must use another tool in 18.04 LTS to get the same result, for example Rufus (a Windows tool).

    But I would like to ask a few questions before continuing with details.

    What do you want to achieve?

    - Do you want a live or persistent live system?

    - Do you want an installed system?

    - Or do you want both a live or persistent live and an installed system in the USB pendrive?

    - Is it important that it can boot both in BIOS and UEFI mode?

    Depending on your answers to these questions, I will give you different advice.

  5. #185
    Join Date
    Oct 2018
    Beans
    2

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    @sudodus,
    Thank you for your quick answer.

    Quote Originally Posted by sudodus View Post
    @palindrom2,

    - Do you want a live or persistent live system?

    - Do you want an installed system?

    - Or do you want both a live or persistent live and an installed system in the USB pendrive?
    Foremost I want an installed system in the USB pendrive.
    A live persistent system would be nice, as I read in many threads that an installed system can never be this adaptable with different hardware.
    But most important is the installed system.

    Quote Originally Posted by sudodus View Post
    - Is it important that it can boot both in BIOS and UEFI mode?
    This is important, as you can't configure the surface to boot in BIOS mode and I too want to use it on a PC that can only be booted in BIOS mode.

    I tried other methods you described too(One pendrive for all PC (Intel/AMD) computers. and Another new, simpler and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode), but the error message "System BootOrder not found. Initializing defaults. Reset System" was displayed and I got stuck in an boot loop when trying to boot the Surface.
    When I googled this I found that this might be a problem with the UEFI of the Surface. As I can boot the live system from a pendrive, I thought using the live system to boot the installed system as you described would solve this.

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

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    Quote Originally Posted by palindrom2 View Post
    Foremost I want an installed system in the USB pendrive.
    A live persistent system would be nice, as I read in many threads that an installed system can never be this adaptable with different hardware.
    But most important is the installed system.

    Booting in UEFI as well as in BIOS mode is important, as you can't configure the surface to boot in BIOS mode and I too want to use it on a PC that can only be booted in BIOS mode.
    I suggest that you try with

    1. A persistent live system created directly (and automatically) with mkusb according to the following links,

    help.ubuntu.com/community/mkusb

    help.ubuntu.com/community/mkusb/persistent

    2. An installed system created with the help of the following link (starting from mkusb, but with additional manual tweaks),

    BIOS/UEFI Full Install

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

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    Stable alternative with Lubuntu 18.04.1 LTS

    Live, persistent live and installed systems

    The compressed image file
    Code:
    dd_lubuntu-18.04.1-desktop-amd64-persistent-n-installed_15GB.img.xz
    contains a

    - a live part, that can be run as
    . live-only
    . persistent live
    . installer
    - an installed part (installed like into an internal drive)

    UEFI and BIOS

    All these operation modes work in

    - UEFI mode (including secure boot) and
    - BIOS mode (alias CSM alias legacy mode)

    Get the file and its md5sum at phillw.net/isos/linux-tools/uefi-n-bios

    See details in the screenshots.

    See more details at this Ubuntu help page: help.ubuntu.com/community/Installation/UEFI-and-BIOS/stable-alternative-18.04.1

  8. #188
    Join Date
    Jun 2007
    Location
    Western Canada
    Beans
    3,089
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    I have made an attempt to link the home partition of the Persistent install with the home partition of the Full install, (as we discussed in another post).

    What worked in Something else was to use the home-rw partition as the /home partition.

    And copy & paste a few things in grub.cfg afterwards.

    I have only had success between same flavors of 'buntu, Ubuntu with Lubuntu had problems.

    It is a little freaky working with the same home on two different installs.

    Persistent install has GParted, Full install doesn't yet, Full install needs a password when Persistent install doesn't, etc

    I will try to remember the details.

    Edit:

    New users can be added but they must be added to each install individually, Adding a user to the Full install does not automatically add them to the Persistent install.
    But once installed to both they share the directory.
    You can allow a certain user on the Persistent install but not on the Full install and vice versa.
    Last edited by C.S.Cameron; February 14th, 2019 at 08:35 AM.

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

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    Interesting @C.S.Cameron

    You wrote that it is 'a little freaky'. Do you think it is worthwhile to merge the homes or do you think it will create too much confusion?

  10. #190
    Join Date
    Jun 2007
    Location
    Western Canada
    Beans
    3,089
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Portable installed system that boots in UEFI as well as in BIOS mode

    It only seems weird to me when using the same user and sharing the same home folder, but it is something that you get used to.

    With different users everything seems normal.

    I think it is better use of space just having one home partition. It makes it easier when updating and upgrading also.

    I think it is a good idea to have a single /home, home-rw partition.

    Edit:

    It works to share home folder between the same flavors of Ubuntu even if they are different editions.
    I am thinking it may work to share the home partition between different flavors as long as the usernames are different.
    That would be an easy way to have multiple persistent bootable ISO's without the 4GB limit.
    Last edited by C.S.Cameron; February 15th, 2019 at 07:52 AM.

Page 19 of 19 FirstFirst ... 9171819

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
  •