Page 101 of 104 FirstFirst ... 519199100101102103 ... LastLast
Results 1,001 to 1,010 of 1034

Thread: Howto make USB boot drives

  1. #1001
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,296
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    After giving the matter a little more thought:

    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-windows.img.xz creates a drive with a 4GB Fat 32 partition visible to Windows 10 and Windows 7, Linux and IOS.

    Windows Disk Manager and GParted can be used to turn the unformatted space on a larger USB into a FAT32 or NTFS partition that can be seen by Windows 10 or Linux. GParted can be used to turn it into a stable ext partition for use by Linux.

    Booting the USB flash drive to Ubuntu using toram, I was able to unmount the USB using "sudo umount -lrf /isodevice" and in GParted move the boot partitions to the right and expand the 4GB FAT32 partition to use all the extra space. (Do not forget to leave 1MB of free space to the right of the EFI partition). The resulting drives FAT32 partition was accessible in both Windows 7 and 10 as long as it was number one and on the far left side.

    The '4GB_use-in-windows.img can be used to make an ISO booting USB of any complexity, that can be used in BIOS mode and UEFI mode computers. It can also serve as a foundation for a Full install drive and many other bootable USB projects.

    I am a little confused about why the FAT32 partition has been wanting to be on the left side of WDM and GParted. I do not ever recall mkusb's usbdata partition having trouble in Windows 7?
    Last edited by C.S.Cameron; August 16th, 2020 at 09:54 AM. Reason: Do not forget to leave 1MB of free space...

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

    Re: Howto make USB boot drives

    Quote Originally Posted by C.S.Cameron View Post
    After giving the matter a little more thought:

    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-windows.img.xz creates a drive with a 4GB Fat 32 partition visible to Windows 10 and Windows 7, Linux and IOS.

    Windows Disk Manager and GParted can be used to turn the unformatted space on a larger USB into a FAT32 or NTFS partition that can be seen by Windows 10 or Linux. GParted can be used to turn it into a stable ext partition for use by Linux.

    Booting the USB flash drive to Ubuntu using toram, I was able to unmount the USB using "sudo umount -lrf /isodevice" and in GParted move the boot partitions to the right and expand the 4GB FAT32 partition to use all the extra space. (Do not forget to leave 1MB of free space to the right of the EFI partition). The resulting drives FAT32 partition was accessible in both Windows 7 and 10 as long as it was number one and on the far left side.

    The '4GB_use-in-windows.img can be used to make an ISO booting USB of any complexity, that can be used in BIOS mode and UEFI mode computers. It can also serve as a foundation for a Full install drive and many other bootable USB projects.
    Am i understanding correctly, that you need only one of these templates,

    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img.xz

    and for that purpose we might rename it (by removing 'use-in-wins')?

    I am a little confused about why the FAT32 partition has been wanting to be on the left side of WDM and GParted. I do not ever recall mkusb's usbdata partition having trouble in Windows 7?
    - It might make a difference, that mkusb creates the partition table directly onto the USB drive, while the template almost always has a mismatch concerning the size of the drive.

    - Windows 10 has changed the treatment of USB drives, for example can use more than the first partition now. It is possible that the treatment of USB drives has changed in other ways too, for example that it is less tolerant to partitions and file systems created by other operating systems, that may not be 100% identical to what it 'expects' or 'wants'.

    - It is also possible that Linux its tools (for example Gparted) have changed, so that the current versions do not create exactly the same partition tables and file systems as they did some years ago.

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

    Re: Howto make USB boot drives

    Quote Originally Posted by sudodus View Post
    Am i understanding correctly, that you need only one of these templates,

    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img.xz

    and for that purpose we might rename it (by removing 'use-in-wins')?
    I would like to see at least the original Template dd_grub-boot-template-for-uefi-n-bios.img.xz and the new Template mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-windows.img.xz remain available.

    The original Template has been mentioned quite a few times in Ask Ubuntu.

    The only that I am a little uneasy about is that 4GB_use-in-wins.img was not working on my 4GB drive in Etcher. I would not doubt that I am the only person left with a working 4GB USB2 drive.

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

    Re: Howto make USB boot drives

    Quote Originally Posted by C.S.Cameron View Post
    I would like to see at least the original Template dd_grub-boot-template-for-uefi-n-bios.img.xz and the new Template mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-windows.img.xz remain available.

    The original Template has been mentioned quite a few times in Ask Ubuntu.
    OK
    The only that I am a little uneasy about is that 4GB_use-in-wins.img was not working on my 4GB drive in Etcher. I would not doubt that I am the only person left with a working 4GB USB2 drive.
    What 's the exact size of that drive, which is nominally 4 GB?

    The template should work in a drive size >= 3965190144 bytes (~ 3965 MB, 10-base)

    Code:
    $ LANG=C sudo parted /dev/sdd p
    Model: Generic- USB3.0 CRW -SD (scsi)
    Disk /dev/sdd: 3965MB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system  Name  Flags
     1      1049kB  3640MB  3639MB  fat32              msftdata
     2      3640MB  3641MB  1049kB                     bios_grub
     3      3641MB  3898MB  257MB   fat32              boot, esp
    
    $ LANG=C sudo parted /dev/sdd u b p
    Model: Generic- USB3.0 CRW -SD (scsi)
    Disk /dev/sdd: 3965190144B
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start        End          Size         File system  Name  Flags
     1      1048576B     3639607295B  3638558720B  fat32              msftdata
     2      3639607296B  3640655871B  1048576B                        bios_grub
     3      3640655872B  3897556991B  256901120B   fat32              boot, esp

  5. #1005
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,296
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    One is:
    cscameron@cscameron-T:~$ lsblk -b --output SIZE -n -d /dev/sdb
    4022337536
    The other is:
    cscameron@cscameron-T:~$ lsblk -b --output SIZE -n -d /dev/sdc
    4007657472

    Must be a flaw in Etcher, or my computer.

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

    Re: Howto make USB boot drives

    @ C.S.Cameron,

    I would also think that the problem is in Etcher. You could double-check that it works with Rufus and with {7-zip + Win32DiskImager} with these pendrives.
    Last edited by sudodus; August 17th, 2020 at 09:48 AM. Reason: minor edit

  7. #1007
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,296
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Howto make USB boot drives

    Etcher worked with the 4GB .img after extracting it from the .xz.
    The 3.5GB .xz worked fine as is?
    At least now I know what works.

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

    Re: Howto make USB boot drives

    @ C.S.Cameron,

    Your result indicates that Etcher needs some margin (between the size of the image and the size of the target drive) for {extraction + cloning} to work (or be accepted). Can you live with
    Code:
    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-windows.img.xz
    as it is now (made from a drive with 3965190144 bytes (~ 3965 MB, 10-base) and expanding to a drive with at least the same size)?
    Last edited by sudodus; August 18th, 2020 at 02:34 PM. Reason: modified question

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

    Re: Howto make USB boot drives

    Yes thank you sudodus.
    It is not so difficult to extract the .img file before using Etcher.
    It is probably better to use Rufus when working in Windows.

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

    Re: Howto make USB boot drives

    I did some housecleaning of the templates in the web directory for UEFI and BIOS files,

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

    and created a new md5sum file for the remaining templates,
    Code:
    grub-boot-templates-for-uefi-n-bios.md5
    The following files are there now (with some 'doublets' to allow for old links to work)

    Code:
    $ls -l *templ*
    -rw-r--r-- 1 nio nio 2735732  2 jun 17.26 dd_grub-boot-template-for-uefi-n-bios_bright-bg.img.xz
    -rw-r--r-- 1 nio nio 2768936 14 aug 16.03 dd_grub-boot-template-for-uefi-n-bios_dark-bg.img.xz
    -rw-r--r-- 1 nio nio 2768416  4 jun 10.05 dd_grub-boot-template-for-uefi-n-bios.img.xz
    -rw-r--r-- 1 nio nio 2768936  2 aug 15.59 dd_grub-boot-template-for-uefi-n-bios_new.img.xz
    -rw-r--r-- 1 nio nio 3681860  8 aug 17.18 dd_grub-boot-template-for-uefi-n-bios_only-p1p2.img.xz
    -rw-rw-r-- 1 nio nio     721 19 aug 15.08 grub-boot-templates-for-uefi-n-bios.md5
    -rw-r--r-- 1 nio nio 3331492 11 aug 22.47 mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img.xz
    -rw-r--r-- 1 nio nio 2768936 14 aug 16.03 mkusb_grub-boot-template-for-uefi-n-bios_use-in-ubuntu.img.xz
    -rw-r--r-- 1 nio nio 3681860  8 aug 17.18 mkusb_grub-boot-template-for-uefi-n-bios_use-in-wins.img.xz
    if I understand correctly,. @C.S.Cameron prefers to use the following two files,
    Code:
    mkusb_grub-boot-template-for-uefi-n-bios_fat32_4GB_use-in-wins.img.xz  # in Windows
    
    dd_grub-boot-template-for-uefi-n-bios.img.xz  # in Ubuntu
    I think that
    Code:
    mkusb_grub-boot-template-for-uefi-n-bios_use-in-ubuntu.img.xz  # in Ubuntu
    should be best in Ubuntu, because it works also with Gnome-Disks and small USB drives (>= 1 GB). But it may need some testing to check that there are no regressions for other cases.

Page 101 of 104 FirstFirst ... 519199100101102103 ... 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
  •