-1

I currently find myself in a desperate situation. I'm trying to boot from the pendrive on my computer installed with Ubuntu 22.10, it is not recognizing my pendrive formatted with the NTFS file system, which consequently makes it impossible to boot and format my computer.

I've always formatted my notebook with NTFS and it worked perfectly, but with this latest version of Ubuntu 22.10 I'm not having success. Currently my computer only recognizes the FAT32 file system (I can usually format it in this format), but the problem is that I am trying to install Windows 11 and a certain ISO file is 4.8 GB, i.e. , the file is broken with a file size limitation of 4GB (the OS installation window will open but will not install because of this).

I honestly don't know what's going on, I've tried other file system formats, but Ubuntu is only releasing FAT32 and I can't install the operating system due to the file size limitation. Before someone tells me that the Pendrive is not configured correctly, Incorrect boot order in BIOS/UEFI, Corrupted boot image, Defective or damaged Pendrive, etc., I have already checked all of this, does anyone know of a solution?

9
  • 2
    UEFI only boots from FAT32, so a Windows installer typically is FAT32. If you use Windows to create an installer from an ISO, it has a tool to split the .wim file to fit. Many old instructions were from when .wim file was under 4GB and those now are wrong. Create Windows installer with the oversize .wim file help.ubuntu.com/community/mkusb#Windows_USB_install_drive & help.ubuntu.com/community/Installation/iso2usb/diy/…
    – oldfred
    Sep 12 at 18:14
  • @oldfred, Friend, to tell the truth I know almost nothing about Linux and to make matters worse, my English is from "Translator". If you could take the time to respond with more details on how to resolve this based on the documentation, I would greatly appreciate it.
    – Leandro
    Sep 12 at 20:19
  • @roaima, But, as you are going to run a Windows Media Creator tool on Linux, the file is .exe
    – Leandro
    Sep 12 at 20:20
  • @roaima, Rufus is for Windows only. Mine is Linux (Ubuntu).
    – Leandro
    Sep 12 at 21:37
  • 1
    Syslinux then. I'm still puzzled as to what you're really trying to achieve. Is it to get a Windows installer onto the USB stick? Sep 12 at 21:46

2 Answers 2

1

Several but not all computers can boot from an NTFS partition in UEFI mode. In other words, the Windows installer, that you created I think similar to this method on a USB drive, should work in several computers, but it seems your computer needs a FAT32 partition for that purpose.

There are several ways to fix or work around that problem, in order to create a Windows installer on a USB drive.

  • Links to a 'Do it yourself' method is described here (overview) and here (details).

  • This 'Do it yourself' method is implemented in the mkusb package and available via mkusb-dus and mkusb-plug.

    sudo add-apt-repository universe  # this line only for standard Ubuntu
    
    sudo add-apt-repository ppa:mkusb/ppa
    sudo apt-get update
    sudo apt-get install mkusb mkusb-plug
    
    sudo apt-get install usb-pack-efi  # only for persistent live drives
    

    A Windows installer made by mkusb can boot both in UEFI mode and BIOS mode (alias CSM alias legacy mode).

  • A tool to make a computer boot from NTFS in UEFI mode, an NTFS UEFI driver, 'UEFI:NTFS', is described by Pete Batard, who created and maintains Rufus.

  • The classic tool to create a Windows installer, winusb, was forked to woeusb, and it has been modified several times to keep up with modifications of both Windows and Linux. I think this link describing the github version of woeusb is up to date (but have not checked in Sept 2023).

  • Finally, you can use the method provided by Microsoft, but that method will not be described here ;-)

0
0

Assuming you can actually format some drive/partition with NTFS on your Ubuntu machine or some other machine, you can extract and copy the content (i.e. files, directories inside) of the Windows ISO to the drive and boot it with grub. It does not matter whether the drive is the same drive where grub is installed on.

On (modern) Windows, you can mount the ISO by simply double clicking it. You should then see it attached as some sort of virtual drive where you can select all, copy and paste the content from the ISO to the NTFS-formatted drive.

On Linux, you can mount it with the mount command. For example:

mkdir -p /tmp/src/
mount path/to/iso/file /tmp/src/

The command should succeed as long as your distro ships a kernel that has the loop device driver and UDF driver enabled. (Might even work if it has only ISO9660 driver but not the UDF one.)

Then also mount the NTFS formatted drive. For example:

mkdir -p /tmp/dst/
mount /dev/sdXY /tmp/dst/

Again, this requires your distro ships either a kernel with NTFS driver or ntfs-3g, the userspace/FUSE driver, in their package repo. For the latter should be able to install it with your package manager, if it is not installed yet.

If the drive is a USB drive, it might be automatically mounted by your desktop environment (DE) via udisks2. If that's the case, you probably need to find out where it is mounted, instead of mounting it again with mount. (Often it would be somewhere under /media or /run/media. And you might not even need to know where exactly the path is if you can see it in your file manager and are going to perform the file copying with it.)

Then you simply copy the content of the ISO to the drive with e.g.:

cp -rv /tmp/src/* /tmp/dst/

or

rsync -rv /tmp/src/ /tmp/dst/

(Make sure you know that trailing slash matters a lot for the source path if you are going to use rsync.)

Certainly you can perform the file copying with GUI file manager in the "Windows manner" instead. (But well, GUI file copying has been surprisingly problematic for a long time, like stalling / cannot finish for no reasons even long after the expected flushing time. Maybe things have become better. Maybe not. I have no idea since CLI works perfectly fine for me.)

Then unmount the USB drive and the ISO:

umount /tmp/dst/
umount /tmp/src/

UEFI firmware from many vendors do not have "extra" support for NTFS. AFAIK AMI Aptio is the only implementation that ships its own NTFS DXE driver.

Fortunately, you don't even have to side load that like the Rufus approach does. You can have a grub menu entry that leads you to the Windows installer:

menuentry 'Install Windows' {
    search -u 49EA0D032930D9B5 -s
    chainloader /efi/boot/bootx64.efi
}

49EA0D032930D9B5 in the example is the volume serial number of the NTFS filesystem (where the content of the ISO have been copy to). It is treated as the filesystem UUID (note: NOT PARTUUID) in Linux so you should be able to find it out with lsblk -f or blkid easily.

IIRC you have to make sure /efi/boot/bootx64.efi is all in small letter as it is in the ISO/UDF (and because the content is now in an NTFS).

You might find some similar example which ask you to have a bunch of insmod. In my experience with the grub shiped in Arch Linux, none is necessary. But you can probably have it for part_msdos, part_gpt and ntfs anyway just in case.

(Note that this works only if your have efi grub. If you have bios grub that has been booted through CSM, this won't work. I think you'll get an error from grub in that case. It probably won't just give you a black screen or reset. I don't know for sure though.)

P.S. Since I personally haven't been generating grub.cfg for a long time, I don't have an exact idea where you should put the menu entry so that grub-mkconfig / update-grub will add it to grub.cfg (and hence your grub boot menu). It's probably some file under /etc/grub.d or so. Do your own research. Also, since you probably need it for a while only, you may even just put it to the end of your grub.cfg (under /boot/grub).

1
  • In fact, the same approach might work even if you just dd the ISO to a partition / drive since grub has driver for UDF as well. I have never tried that though.
    – Tom Yan
    Sep 20 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .