0%

Make bootable usb install media on Linux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
echo "g
n


+1G
n



t
1
11
t
2
11
w
"|fdisk /dev/sdb
1
mount -o loop /data/ISO/en-us_windows_11_business.iso /media/cdrom
1
2
mkfs.vfat /dev/sdb1
mkfs.ntfs -Q /dev/sdb2
1
mkdir -pv /tmp/{vfat,ntfs}
1
2
mount -t vfat /dev/sdb1 /tmp/vfat/
mount -t ntfs /dev/sdb2 /tmp/ntfs/
1
2
3
4
5
6
7
8
rsync -avz --exclude=sources/ /media/cdrom/* /tmp/vfat/
rsync -avz --exclude=boot.wim /media/cdrom/sources/* /tmp/ntfs/sources/
mkdir /tmp/vfat/sources/
cp /media/cdrom/sources/boot.wim /tmp/vfat/sources/
sync
umount /tmp/vfat
umount /tmp/ntfs
rm -rf vfat ntfs