Page 98 of 102 FirstFirst ... 488896979899100 ... LastLast
Results 971 to 980 of 1016

Thread: Howto make USB boot drives

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

    Re: Howto make USB boot drives

    @C.S.Cameron,

    Thanks for the test results. I will try to reproduce your test results from Windows.

    I have a faint idea of what might be the problem: The GPT backup table at the tail end of the drive is missing. If this is the problem, it should be possible to fix with gptfix or manually with gdisk. So you can try that even before I get any own test results.

    Edit:

    This gptfix is built into mkusb. The partitioning tools that I use in Ubuntu will also fix the GPT backup table, when I add a partition, and I will always do that (when using it for 'grub-n-iso' as well as template for an installed system). Have you tested if your systems will boot in UEFI mode after you have created another partition in a drive with the template?
    Last edited by sudodus; August 2nd, 2020 at 11:07 AM.

  2. #972
    Join Date
    Jun 2007
    Location
    A Village in the Jungle
    Beans
    3,265
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    One thing I noticed is that there is a file named efi.img in the /boot/grub folder of the image that is not being extracted by Rufus or etcher, but is being extracted by mkusb and Disks? I tried replacing this file by hand yesterday but it did not seem to help.

    I got a little lost trying gptfix and gdisk yesterday.

    My previous experiments indicated that once the disk was booting to the GRUB menu there was no problem when NTFS and an ISO were added. If it wasn't booting to the menu in UEFI mode, adding the ISO did not help.

    EDIT:
    Oops, no. efi.img only disappears if I install BIOS GRUB.
    Last edited by C.S.Cameron; August 2nd, 2020 at 01:28 PM.

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

    Re: Howto make USB boot drives

    Quote Originally Posted by C.S.Cameron View Post
    One thing I noticed is that there is a file named efi.img in the /boot/grub folder of the image that is not being extracted by Rufus or etcher, but is being extracted by mkusb and Disks? I tried replacing this file by hand yesterday but it did not seem to help.
    If the extracting tool (7-zip) and the cloning tool work correctly, the cloned drive should be identical to what is created by mkusb, except the GPT backup partition table at the tail end of the drive.
    I got a little lost trying gptfix and gdisk yesterday.
    Maybe you must install gdisk, and maybe the version must be fairly up to date. In my main computer with 18.04.x LTS I have 'GPT fdisk (gdisk) version 1.0.3'
    My previous experiments indicated that once the disk was booting to the GRUB menu there was no problem when NTFS and an ISO were added. If it wasn't booting to the menu in UEFI mode, adding the ISO did not help.

    EDIT:
    Oops, no. efi.img only disappears if I install BIOS GRUB.
    I think it is like this: It might not work to boot 'only the template' in UEFI mode. But after you create a partition (with a file system, where to put either an iso file or an installed system), the tool to create the partition should fix the GPT backup partition table at the tail end of the drive. At least this has been my experience. And then the drive should boot also in UEFI mode.

    But I have still not tried to do it from Windows, and I will return when I have test results from that adventure.

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

    Re: Howto make USB boot drives

    @C.S.Cameron,

    Will this new template

    dd_grub-boot-template-for-uefi-n-bios_new.img.xz

    work for you in UEFI mode also when you create it in Windows?

    Code:
    $ <<<'02f0af35a3fbfe10b9cbbc0c0aa2ce96  dd_grub-boot-template-for-uefi-n-bios_new.img.xz' md5sum -c
    dd_grub-boot-template-for-uefi-n-bios_new.img.xz: OK
    Maybe your problem is that you use target drives that are smaller than the drive, where the template was created. In that case this new template file should work better, because it was created in a USB drive with size 1 GB.

    In my computers it behaves somewhat better than the previous version, even without using gpt-fix. For example gparted is more happy with it. But I won't know until I get your test results, because also the old version boots in my computers with smaller USB drives (than where it was created) both in UEFi and BIOS modes without using gpt-fix.
    Last edited by sudodus; August 2nd, 2020 at 03:44 PM.

  5. #975
    Join Date
    Jun 2007
    Location
    A Village in the Jungle
    Beans
    3,265
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    @sudodus:

    When flashed on Windows, using Rufus or Etcher or W32DI, BIOS partition is No1, EFI partition is No2.

    Boots to "error: no such partition. / Entering rescue mode.../grub rescue>"

    Added NTFS partition and ubuntu.iso, still boots to "error: no such filesystem. / Entering rescue mode.../grub rescue>"

    When flashed to USB on Ubuntu using mkusb, BIOS partition is now No2, EFI partition is No3. Why?

    Mkusb drive boots to menu in BIOS and UEFI modes no errors.

    Added NTFS partition and ubuntu.iso to mkusb drive boots Ubuntu Live in BIOS and UEFI as expected.

    I am perplexed, As you say, the cloned drives should be identical no matter what flashed them.

    If I create a new image from the working mkusb drive above using Disks, the restored clone works if made using Rufus, Etcher, Disks and mkusb.

    If I flash "dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz" using Rufus or Etcher, the USB works no problem, both BIOS and UEFI.

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

    Re: Howto make USB boot drives

    Quote Originally Posted by C.S.Cameron View Post
    @sudodus:

    When flashed on Windows, using Rufus or Etcher or W32DI, BIOS partition is No1, EFI partition is No2.

    Boots to "error: no such partition. / Entering rescue mode.../grub rescue>"

    Added NTFS partition and ubuntu.iso, still boots to "error: no such filesystem. / Entering rescue mode.../grub rescue>"

    When flashed to USB on Ubuntu using mkusb, BIOS partition is now No2, EFI partition is No3. Why?

    Mkusb drive boots to menu in BIOS and UEFI modes no errors.

    Added NTFS partition and ubuntu.iso to mkusb drive boots Ubuntu Live in BIOS and UEFI as expected.

    I am perplexed, As you say, the cloned drives should be identical no matter what flashed them.

    If I create a new image from the working mkusb drive above using Disks, the restored clone works if made using Rufus, Etcher, Disks and mkusb.

    If I flash "dd_unb_ubuntu-20.04_15GB_2020-06-26.img.xz" using Rufus or Etcher, the USB works no problem, both BIOS and UEFI.
    I can only draw the conclusion that Windows thinks it is smart and wants to help us. But it is not smart enough. instead of pure cloning, it discovers that there is no partition #1 and therefore re-numbers the partitions, which we don't want at all. (It happens with all the tools you try in Windows, and I don't think all the tools would be programmed to do it, hence I blame Windows for this extra action. (In Swedish we use the term björntjänst (bear's service) for such unwanted 'helpful' actions. Maybe disservice is the correct term in English.)

    If this conclusion is correct, a solution would be to modify the partition numbering in the template, and to modify the content of the grub configuration (not only grub.cfg) to match the new partition structure. This may take some time. Another solution would be to add a partition #1 into the current template. This is more like a quick fix, but might work too.

  7. #977
    Join Date
    Jun 2007
    Location
    A Village in the Jungle
    Beans
    3,265
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    I was thinking maybe a small ext4 partition and a small NTFS partition. They could be expanded as necessary. Partition 1 could be the traditional NTFS usbdata partition. ISO files can be stored on either, or the ext4 partition could be relabeled as casper-rw/writable, or it could be reformatted as FAT32 for use by multiboot persistent-path folders.

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

    Re: Howto make USB boot drives

    @C.S.Cameron,

    Will these new templates

    dd_grub-boot-template-for-uefi-n-bios_ext4_3.5GB.img.xz

    dd_grub-boot-template-for-uefi-n-bios_ntfs_3.5GB.img.xz


    work for you in UEFI mode also when you create boot drives from them in Windows?


    Check with

    dd_grub-boot-template-for-uefi-n-bios_filesys_3.5GB.img.xz.md5

    Code:
    $ md5sum -c dd_grub-boot-template-for-uefi-n-bios_filesys_3.5GB.img.xz.md5
    dd_grub-boot-template-for-uefi-n-bios_ext4_3.5GB.img.xz: OK
    dd_grub-boot-template-for-uefi-n-bios_ntfs_3.5GB.img.xz: OK
    
    $ ls -lh dd_grub-boot-template-for-uefi-n-bios_*_3.5GB.img.xz
    -rw-r--r-- 1 sudodus sudodus 3,1M aug  3 16:50 dd_grub-boot-template-for-uefi-n-bios_ext4_3.5GB.img.xz
    -rw-r--r-- 1 sudodus sudodus 3,2M aug  3 17:12 dd_grub-boot-template-for-uefi-n-bios_ntfs_3.5GB.img.xz
    These compressed files contain a 'partition #1' either with ext4 or NTFS. For me ext4 works better with 'grub-n-iso'. The drive with NTFS gets stuck at shutdown (but works during the operation).

    - A live (live-only) system can be created in a 4 GB pendrive or memory card,
    - a persistent live system needs at least 8 GB and
    - an installed system needs at least a 16 GB pendrive or memory card.

    If the user wants to install an operating system, and the drive is big enough, it can be a good idea to keep an NTFS partition to exchange files with Windows. The operating system can be installed into a new partition that is created in the unallocated drive space.

    If the user want a persistent live system, I suggest that partition #1 has the ext4 file system. A partition for persistence can be created in the unallocated drive space, and the file system can be ext2 (less wear) or ext4 (more stable due to journaling).

    Code:
    $ lsblk -fm /dev/sd[cd]
    NAME   FSTYPE LABEL     UUID                                 MOUNTPOINT                 SIZE OWNER GROUP MODE
    sdc                                                                                    29,5G root  disk  brw-rw----
    ├─sdc1 ext4   modify-me b60b12f7-5b75-4922-ac96-331f3b309772 /media/sudodus/modify-me     3G root  disk  brw-rw----
    ├─sdc2                                                                                  977K root  disk  brw-rw----
    └─sdc3 vfat   usbboot   02D3-7915                                                     244,1M root  disk  brw-rw----
    sdd                                                                                     7,4G root  disk  brw-rw----
    ├─sdd1 ntfs   MODIFY-ME 61C3CA6C0D30D421                     /media/sudodus/MODIFY-ME     3G root  disk  brw-rw----
    ├─sdd2                                                                                  977K root  disk  brw-rw----
    └─sdd3 vfat   usbboot   02D3-7915                                                     244,1M root  disk  brw-rw----
    Last edited by sudodus; 4 Weeks Ago at 02:54 PM. Reason: the 3.5GB templates are removed

  9. #979
    Join Date
    Jun 2007
    Location
    A Village in the Jungle
    Beans
    3,265
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    @sudodus:
    Both ext4 and NTFS versions worked for me in Win 10 using Rufus and Etcher.
    However Both had a blinking curser when quitting.
    Hitting Esc exits the splash screen so we can see what is happenig.
    I tried something a little different and just made the ext4 and NTFS partitions 1MB each.
    This seems pretty versatile when modifying the partitions.
    I got a notice in GParted about EFI problems that I figure were what you mentioned efi-fix was about.

    Screenshot from 2020-08-04 11-57-51.pngScreenshot from 2020-08-04 11-59-52.pngScreenshot from 2020-08-04 11-42-48.jpg
    Last edited by C.S.Cameron; August 4th, 2020 at 08:04 AM.

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

    Re: Howto make USB boot drives

    Quote Originally Posted by C.S.Cameron View Post
    @sudodus:
    Both ext4 and NTFS versions worked for me in Win 10 using Rufus and Etcher.
    However Both had a blinking curser when quitting.
    i don't get any problem, except when running 'grub-n-iso' with the iso file in an NTFS file system. (It shuts down nicely when the iso file resides in an ext4 file system.)

    Please explain what you were running and how you quit, when you had that blinking cursor.
    Hitting Esc exits the splash screen so we can see what is happening.
    Yes.
    I tried something a little different and just made the ext4 and NTFS partitions 1MB each.
    This seems pretty versatile when modifying the partitions.
    If I understand correctly, you would prefer a template with

    - partition #1: size 1 MB, NTFS
    - partition #4: size 1 MB, ext4

    A drive made from this template cannot be used as is, those partitions must be modifed, at least the size, maybe also to another file system. For example, the default grub.cfg points to a file 'ubuntu.iso' in partition #1, and that works best with ext4 (in partition #1). So this is not my favourite template. But you have reasons to want it this way, and I can create and upload such a template for you and for end users, who follow your advice here at the Ubuntu Forums and at AskUbuntu.

    I got a notice in GParted about EFI problems that I figure were what you mentioned efi-fix was about.

    Screenshot from 2020-08-04 11-57-51.pngScreenshot from 2020-08-04 11-59-52.pngScreenshot from 2020-08-04 11-42-48.jpg
    Yes, that is the idea with 'gpt-fix'. gparted can fix it too, but maybe only when the drive is bigger than the original one.

Page 98 of 102 FirstFirst ... 488896979899100 ... 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
  •