mirror of
https://pagure.io/fedora-qa/createhdds.git
synced 2024-11-10 18:14:21 +00:00
add script for creating virtual disks
This commit is contained in:
parent
0444ef2dbb
commit
9e83f59ea6
22
createhdds.sh
Normal file
22
createhdds.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/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!"
|
||||
_EOF_
|
||||
|
||||
guestfish <<_EOF_
|
||||
sparse disk_freespace.img 10G
|
||||
run
|
||||
part-init /dev/sda mbr
|
||||
part-add /dev/sda p 1 2097152
|
||||
mkfs ext4 /dev/sda1
|
||||
mount /dev/sda1 /
|
||||
write /testfile "Hello, world!"
|
||||
_EOF_
|
Loading…
Reference in New Issue
Block a user