Project

General

Profile

action #176832 » process_agama_oemdrv_qcow2.txt

leli, 2025-03-28 03:07

 
localhost:/home/lemon/ndb_test # qemu-img create agama_oemdrv.qcow2 100M -f qcow2
Formatting 'agama_oemdrv.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=104857600 lazy_refcounts=off refcount_bits=16
localhost:/home/lemon/ndb_test # modprobe nbd max_part=63
localhost:/home/lemon/ndb_test # qemu-nbd -c /dev/nbd0 agama_oemdrv.qcow2
localhost:/home/lemon/ndb_test # parted --script /dev/nbd0 mklabel gpt mkpart primary ext4 1MiB 100%
localhost:/home/lemon/ndb_test # ls /mnt
lemon-ndb
localhost:/home/lemon/ndb_test # partprobe -s /dev/nbd0
/dev/nbd0: gpt partitions 1
localhost:/home/lemon/ndb_test # mkfs.ext4 -L OEMDRV /dev/nbd0p1
mke2fs 1.47.0 (5-Feb-2023)
Discarding device blocks: done
Creating filesystem with 101356 1k blocks and 25376 inodes
Filesystem UUID: 245e857e-fbcd-4bd3-bca9-e6716773872c
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

localhost:/home/lemon/ndb_test # lsblk -f /dev/nbd0p1
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
nbd0p1 ext4 1.0 OEMDRV 245e857e-fbcd-4bd3-bca9-e6716773872c
localhost:/home/lemon/ndb_test # mount /dev/nbd0p1 /mnt/lemon-ndb
localhost:/home/lemon/ndb_test # cp autoinst.xml
agama_auto_support.xml agama_ay_oemdrv.qcow2 agama_oemdrv.qcow2 autoinst.xml drive.qcow2
localhost:/home/lemon/ndb_test # cp autoinst.xml /mnt/lemon-ndb/
localhost:/home/lemon/ndb_test # la /mnt/lemon-ndb/
total 16
drwxr-xr-x 3 root root 1024 Mar 28 11:02 .
dr-xr-xr-x 1 root root 18 Mar 14 10:28 ..
-rw-r--r-- 1 root root 3027 Mar 28 11:02 autoinst.xml
drwx------ 2 root root 12288 Mar 28 11:00 lost+found
localhost:/home/lemon/ndb_test # umount /mnt/lemon-ndb
localhost:/home/lemon/ndb_test # qemu-nbd --disconnect /dev/nbd0
/dev/nbd0 disconnected
localhost:/home/lemon/ndb_test # rmmod nbd
(2-2/2)