/EFI/BOOT and /boot are not partitions, they are directories. Your script creates two gpt partitions on USB sticks. Here's what the partition that are created look like when queried using parted -l [/i]
Code: Select all
Number Start End Size File system Name Flags
1 1049kB 34.6MB 33.6MB fat16 EFI System boot
2 34.6MB 4058MB 4023MB fat32 Microsoft basic data
Partition 1 is a 32MB FAT16 formatted partition type coded as ef00 (EFI System). Partition 2 is a 3.75 GB FAT32 formatted partition type coded as 0007 (Microsoft basic data). The reason why there are two uefi boot menu options when I boot with the stick plugged is because these two partitions exist as FAT formatted partitions. On system power up, the uefi firmware looks for FAT formatted block devices on removable drives and creates a boot entry for each one. The boot entry is a pointer to the block device.
When you select a boot entry by pressing the enter key, the uefi firmware looks for a /EFI/BOOT directory with a uefi bootloader image file. For x64 machine, the file name is
bootx64.efi. For a 32 bit architecture the file name is
bootIA32.efi. These files are the binary bootloader files which initiates the booting process. Essentially the uefi firmware executes
/EFI/BOOT/BOOTx64.efi . Since bootloader images are binary files they are architecture specific. It should be noted that bootloader files on removable disks have to be named using the
BOOT{machine type short-name}.EFI convention. This is not true for bootloader files on permanent hard drives, which only are required to end in the
.efi extension. The same bootloader image is used on both the hard drives and removable drive, they are just rename according to the requirements of the media. As an example on Slackware the elilo bootloader image is called
elilo.efi (both the 32 bit and 64 bit images are renamed to elilo.efi when installed by the package management system) when installed to a hard drive, but its renamed to
bootx64.efi for removable drives targeted for the 64 bit intel architecture.
Getting back to the two partition created by the install_on_usb script, the first partition does not have any directories or bootloader images. Here I have mounted the first partiton /dev/sdc1 on a mount point and using
tree -d to show the directory structure.
Code: Select all
rich[~]$ sudo mount /dev/sdc1 /mnt/stick_1/
rich[~]$ cd /mnt/stick_1/
rich[stick_1]$ tree -d
.
0 directories
As you can see the partition is empty, no directories, no files. Remember this was created using the install_on_usb script, not SLI. Because it does not have a /EFI/BOOT/ directory with the bootx64.efi boot image, it does not boot and the uefi firmware just move on to booting the default OS.
The second partition does contain files and directories:
Code: Select all
rich$ sudo mount /dev/sdc2 /mnt/stick_2/
rich[stick_1]$ cd /mnt/stick_2/
rich[stick_2]$ tree -d
.
|-- EFI
| `-- BOOT
`-- boot
|-- menus
|-- modules
|-- optional
|-- packages
`-- syslinux
There are two directory paths, /EFI/BOOT and /boot. The /EFI/BOOT directory contains the bootloader image, bootx64.efi and other files necessary to uefi boot using elilo. The /boot directory contains all the necessary files to boot in legacy mode. Since the partition is formatted in FAT fs and has the necessary /EFI/BOOT path with the uefi bootloader
bootx64.efi it boots into the elilo menu and from there can boot Salix Live.
djemos wrote:what you suggest?
I suggest that the install_on_usb script create one partition, formatted as FAT32 and install the
/EFI/BOOT and
/boot directories just as it installed them on the second partition identify above. Hopefully this is what your new script does. I will test it out and report back.