mirror of
https://github.com/rocky-linux/createhdds.git
synced 2024-12-22 10:08:30 +00:00
27 lines
492 B
Bash
Executable File
27 lines
492 B
Bash
Executable File
#!/bin/bash
|
|
guestfish <<_EOF_
|
|
sparse disk_full.img 10G
|
|
run
|
|
part-init /dev/sda mbr
|
|
part-add /dev/sda p 1 10485760
|
|
part-add /dev/sda p 10485761 -1
|
|
mkfs ext4 /dev/sda1
|
|
mkfs ext4 /dev/sda2
|
|
mount /dev/sda1 /
|
|
write /testfile "Hello, world!"
|
|
umount /
|
|
mount /dev/sda2 /
|
|
write /testfile "Oh, hi Mark"
|
|
umount /
|
|
_EOF_
|
|
|
|
guestfish <<_EOF_
|
|
sparse disk_freespace.img 10G
|
|
run
|
|
part-init /dev/sda mbr
|
|
part-add /dev/sda p 4096 2097152
|
|
mkfs ext4 /dev/sda1
|
|
mount /dev/sda1 /
|
|
write /testfile "Hello, world!"
|
|
_EOF_
|