laurent85v / archuseriso

A set of bash script programs to create bootable Arch Linux images and to create bootable USB flash drives with a desktop environment.
GNU General Public License v3.0
228 stars 30 forks source link

Legacy (non-UEFI) booting problem #51

Closed ZhymabekRoman closed 11 months ago

ZhymabekRoman commented 11 months ago

I created a bootable USB using archuseriso. Unfortunately, USB can't boot in legacy boot mode, only UEFI. Also tried to patch fat32 boot sector using ms-sys (https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/458482).

Command:

$ sudo aui-mkusb --size-esp=1G --size-cow=40G --rootfs=f2fs aui-lxqt-linux_6_6_1-1109-x64.iso /dev/sdh

Tested PCs:

Ventoy for example works great, even with Ubuntu persistence.

Thanks again!

laurent85v commented 11 months ago

I was unable to reproduce the problem. How archuseriso was installed on the pc? Are there any error messages when creating the medium?

ZhymabekRoman commented 11 months ago
$ sudo aui-mkusb aui-lxqt-linux_6_6_1-1109-x64.iso /dev/sdh
[sudo] password for roman:

[aui-mkusb] INFO: ISO file:   aui-lxqt-linux_6_6_1-1109-x64.iso
[aui-mkusb] INFO: USB device: /dev/sdh

Confirm write to DataTraveler 3.0 57.7G (N/y)? y

[aui-mkusb] INFO: Mount iso
[aui-mkusb] INFO: mountpoint: /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/iso
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Drive partitions
[aui-mkusb] INFO: New gpt label
Device '/dev/sdh' is currently locked, waiting…
[aui-mkusb] INFO: Partition #1 in MiB: 1470
[aui-mkusb] INFO: Partition #2 in MiB: 512
[aui-mkusb] INFO: Partition #3 in MiB: All Free Space
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Format partitions
[aui-mkusb] INFO: partition #1: type Ext4, label AUILX_4zd
Device '/dev/sdh' is currently locked, waiting…
[aui-mkusb] INFO: partition #2: type FAT, label ESP_4zd
[aui-mkusb] INFO: partition #3: type Ext4, label COW_4zd
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Mount partitions
[aui-mkusb] INFO: device: /dev/sdh1, mountpoint: /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbro
[aui-mkusb] INFO: device: /dev/sdh2, mountpoint: /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbesp
[aui-mkusb] INFO: device: /dev/sdh3, mountpoint: /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbrw
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Copy live image to /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbro
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: ESP setup
[aui-mkusb] INFO: Copy to /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbesp
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Persistence setup
[aui-mkusb] INFO: Copy persistence config to /run/media/roman/Softs/Soft/!OS/!Linux/auiwork.2g5EucEX/usbrw
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Unmount working directories, may take some time
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Install boot loader
[aui-mkusb] INFO: Done!

[aui-mkusb] INFO: Success!

IMPORTANT NOTICE REGARDING PERSISTENCE !!!
- The root account and the live user account have no password !!!
- You must set a root and a user password by yourself after the first boot !!!
ZhymabekRoman commented 11 months ago

How archuseriso was installed on the pc?

yay -S archuseriso

ZhymabekRoman commented 11 months ago

I tried to test medium by aui-run, but unfourtinately:

qemu-system-x86_64: type is NULL
qemu-system-x86_64: Virtio VGA not available
laurent85v commented 11 months ago

qemu-system-x86_64: type is NULL qemu-system-x86_64: Virtio VGA not available

Install qemu-desktop for the missing qemu packages.

Some bios on older hardware have problems booting to a gpt disk. https://www.rodsbooks.com/gdisk/bios.html

ZhymabekRoman commented 11 months ago

Install qemu-desktop for the missing qemu packages.

Thanks, medium work great in Qemu emulation...

Some bios on older hardware have problems booting to a gpt disk.

Ohhh, with Ventoy there is no problem. I think probably they use a workaround (?)

laurent85v commented 11 months ago

Ohhh, with Ventoy there is no problem. I think probably they use a workaround (?)

The default is mbr for ventoy. https://www.ventoy.net/en/doc_mbr_vs_gpt.html

Archuseriso only creates gpt disks. You can try to convert gpt to mbr using gdisk. Replace /dev/sdX with coresponding id.

sudo gdisk /dev/sdX
?
r
?
g
?
a
2
w
Y

Install syslinux mbr.bin on mbr disk

sudo dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdX

I tried with a usb flash drive. I don't have the hardware to test but aui-run works.

ZhymabekRoman commented 11 months ago

Thanks! Works great! Will there be an option like --mbr to do a workaround for this problem in the future?

laurent85v commented 11 months ago

The --mbr option will be available in the next release.

Commit c21b5be

ZhymabekRoman commented 11 months ago

Thank you!