Linux command
grub-file 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
grub-file --is-arm-efi [path/to/file]
Example
grub-file --is-i386-efi [path/to/file]
Example
grub-file --is-x86_64-efi [path/to/file]
Example
grub-file --is-arm-linux [path/to/file]
Example
grub-file --is-x86-linux [path/to/file]
Example
grub-file --is-x86_64-xnu [path/to/file]
说明
grub-file checks whether a file is a bootable image of a specific type. It examines file headers and signatures to identify kernel images, EFI applications, and other bootable formats. The command returns exit code 0 (success) if the file matches the specified type, or 1 (failure) if it does not. This is useful in scripts for validating boot images or determining the correct boot method.
参数
- --is-arm-efi
- Check for ARM EFI image
- --is-arm64-efi
- Check for ARM64 EFI image
- --is-i386-efi
- Check for i386 EFI image
- --is-x86_64-efi
- Check for x86_64 EFI image
- --is-arm-linux
- Check for ARM Linux kernel
- --is-x86-linux
- Check for x86 Linux kernel
- --is-x86_64-linux
- Check for x86_64 Linux kernel
- --is-x86_64-xnu
- Check for macOS XNU kernel
- --is-multiboot
- Check for Multiboot image
FAQ
What is the grub-file command used for?
grub-file checks whether a file is a bootable image of a specific type. It examines file headers and signatures to identify kernel images, EFI applications, and other bootable formats. The command returns exit code 0 (success) if the file matches the specified type, or 1 (failure) if it does not. This is useful in scripts for validating boot images or determining the correct boot method.
How do I run a basic grub-file example?
Run `grub-file --is-arm-efi [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --is-arm-efi do in grub-file?
Check for ARM EFI image