How to create Alpine live USB-stick manually?
#1
Fri, 2018-01-19 18:29
timfayz
-
- Offline
- 1 day 23 hours ago
- 2018-01-19
I'm trying to create Alpine live USB manually in order to use existing stick's partitioning layout. I know the easies way to do it is `dd` (which works with no hassle), but above all, I do it just for learning purposes. Please, one should assume (which actually is) I have no Alpine installations earlier.
The flavour of interest is XEN. Stick has 30GB volume in total.
What I did:
1) Partitioned the stick as follows: fdisk /dev/sdb create 1st partition with 512Mb, type W95 FAT32 create 3rd partition with 4Gb, type W95 FAT32 create 2nd partition with remaining space, type Linux write MBR do appropriate mkfs for each partition 2) Copied content of image into the stick: mount -o loop alpine-xen.iso /mnt/iso mount -t auto /dev/sdb1 /mnt/stick cp -r /mnt/iso/. /mnt/stick umount /mnt/*
Now I do reboot and press F9 to change boot order (my HP Pavilion 7004er supports UEFI, but for historial reasons I'm still using legacy mode). What I get - after selecting appropriate `USB Hard Drive - Samsung Flash Drive FIT` option - is this:
What does it mean and how to resolve it?
(I'm absolutely new to SYSLINUX, GRUB and related stuff)
---
After `fdisk`'ing Alpine iso I found the following:
Disklabel type: dos Disk identifier: 0x04bfbc80 Device Boot Start End Sectors Size Id Type Downloads/Distributions/alpine-xen-3.7.0-x86_64.iso1 * 0 329727 329728 161M 0 Empty Downloads/Distributions/alpine-xen-3.7.0-x86_64.iso2 312 3191 2880 1.4M ef EFI (FAT-12/16/32)
Seems like there is separate EFI partition with `bootx64.efi` loader for UEFI-compatible systems. It also has valid MBR (not protective one) and GPT tables. If I got it right, on UEFI systems I need to create separate FAT partition (type EFI) and copy `efi/boot/bootx64.efi` from iso into the same path therein. This might be a solution for issue above.
But what about BIOS-MBR-GRUB case? Any ideas?
Try using 'dd' command:
dd if=file.iso of=/dev/sdX bs=12M oflag=direct
Note: /dev/sdX must replace usb stick path, ex: /dev/sdb or /dev/sdc. Becareful! If not, your data is loss.