Fedora中制作UEFI/BIOS启动的U盘安装盘

 

 

livecd-iso-to-disk --format --reset-mbr --efi Fedora-Workstation-Live-x86_64-34.iso /dev/sdb                // 可以 BIOS 和 UEFI 启动

 

 
[root@fedora iso]# dnf install livecd-tools

[root@fedora iso]# cd /mnt/vb-share/iso
[root@fedora iso]# ls
Fedora-Workstation-Live-x86_64-34.iso

[root@fedora iso]# livecd-iso-to-disk --format --efi Fedora-Workstation-Live-x86_64-34.iso /dev/sdb                // 只能 UEFI 启动

Verifying image...
/mnt/vb-share/iso/Fedora-Workstation-Live-x86_64-34.iso:   a69fbbb1f0f26a42fdd8180c69aeede1
Fragment sums: 63648891ecf2aab1be93471c8ee4cf2b91e2f589a74daf3fd92b716b5bc8
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.

    WARNING: This will DESTROY All DATA on: /dev/sdb !!

        Press Enter to continue, or Ctrl C to abort.

/dev/sdb:8 个字节已擦除,位置偏移为 0x00000200 (gpt):45 46 49 20 50 41 52 54
/dev/sdb:8 个字节已擦除,位置偏移为 0x754017e00 (gpt):45 46 49 20 50 41 52 54
/dev/sdb:2 个字节已擦除,位置偏移为 0x000001fe (PMBR):55 aa
/dev/sdb:将调用 ioctl 来重新读分区表:成功
Waiting for devices to settle...
mkfs.fat 4.2 (2021-01-31)

Copying LiveOS image to target device...
squashfs.img
  1,884,733,440 100%    9.97MB/s    0:03:00 (xfr#1, to-chk=0/1)

Syncing filesystem writes to disc.
    Please wait, this may take a while...
Setting up /EFI/BOOT
Copying /images directory to the target device.
efiboot.img
     11,509,760 100%   56.42MB/s    0:00:00 (xfr#1, to-chk=0/1)
macboot.img
     24,100,864 100%   55.71MB/s    0:00:00 (xfr#1, to-chk=0/1)
initrd.img
     56,906,100 100%  101.76MB/s    0:00:00 (xfr#1, to-chk=0/1)
vmlinuz
     10,619,184 100%   77.07MB/s    0:00:00 (xfr#1, to-chk=0/1)
Updating boot config files.
Installing boot loader...
Target device is now set up with a Live image!

[root@fedora iso]#
[root@fedora iso]# fdisk -l /dev/sdb
Disk /dev/sdb:29.31 GiB,31474155520 字节,61472960 个扇区
磁盘型号:MFS-SW          
单元:扇区 / 1 * 512 = 512 字节
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:gpt
磁盘标识符:BB4F9B5A-F14A-4BCD-B477-02D54D21B110

设备        起点     末尾     扇区  大小 类型
/dev/sdb1   8192 61468671 61460480 29.3G EFI 系统
[root@fedora iso]#



[root@fedora iso]#

[root@fedora iso]# livecd-iso-to-disk --format --reset-mbr --efi Fedora-Workstation-Live-x86_64-34.iso /dev/sdb                // 可以 BIOS 和 UEFI 启动

Verifying image...
/opt/vb-share/iso/Fedora-Workstation-Live-x86_64-34.iso:   a69fbbb1f0f26a42fdd8180c69aeede1
Fragment sums: 63648891ecf2aab1be93471c8ee4cf2b91e2f589a74daf3fd92b716b5bc8
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.

    WARNING: This will DESTROY All DATA on: /dev/sdb !!

        Press Enter to continue, or Ctrl C to abort.

/dev/sdb:8 个字节已擦除,位置偏移为 0x00000200 (gpt):45 46 49 20 50 41 52 54
/dev/sdb:8 个字节已擦除,位置偏移为 0x754017e00 (gpt):45 46 49 20 50 41 52 54
/dev/sdb:2 个字节已擦除,位置偏移为 0x000001fe (PMBR):55 aa
/dev/sdb:将调用 ioctl 来重新读分区表:成功
Waiting for devices to settle...
mkfs.fat 4.1 (2017-01-24)

Copying LiveOS image to target device...
squashfs.img
  1,884,733,440 100%  372.83MB/s    0:00:04 (xfr#1, to-chk=0/1)

Syncing filesystem writes to disc.
    Please wait, this may take a while...
Setting up /EFI/BOOT
Copying /images directory to the target device.
efiboot.img
     11,509,760 100%  405.38MB/s    0:00:00 (xfr#1, to-chk=0/1)
macboot.img
     24,100,864 100%  294.27MB/s    0:00:00 (xfr#1, to-chk=0/1)
initrd.img
     56,906,100 100%  301.33MB/s    0:00:00 (xfr#1, to-chk=0/1)
vmlinuz
     10,619,184 100%  171.12MB/s    0:00:00 (xfr#1, to-chk=0/1)
Updating boot config files.
Installing boot loader...
Target device is now set up with a Live image!

[root@fedora iso]#
[root@fedora iso]# fdisk -l /dev/sdb
Disk /dev/sdb:29.31 GiB,31474155520 字节,61472960 个扇区
磁盘型号:MFS-SW          
单元:扇区 / 1 * 512 = 512 字节
扇区大小(逻辑/物理):512 字节 / 512 字节
I/O 大小(最小/最佳):512 字节 / 512 字节
磁盘标签类型:gpt
磁盘标识符:BB4F9B5A-F14A-4BCD-B477-02D54D21B110

设备        起点     末尾     扇区  大小 类型
/dev/sdb1   8192 61468671 61460480 29.3G EFI 系统
[root@fedora iso]#




posted @ 2021-04-03 12:53  张同光  阅读(650)  评论(0编辑  收藏  举报