Ubuntu Pastebin

Paste from ubuntu at Mon, 19 Oct 2015 17:12:39 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## 
## given 'go.sh' at http://paste.ubuntu.com/12863524/
##
## system booted with 'go.sh', commands run inside.
##
## ps axw | grep qemu-system-x86
## qemu-system-x86_64 -enable-kvm -drive file=/tmp/tmp.x4RielIdVw/disk.img,if=none,id=disk_img_1,format=qcow2 -device virtio-blk-pci,bootindex=1,scsi=off,drive=disk_img_1,id=virtio-disk-1,physical_block_size=4096,logical_block_size=512,min_io_size=4096,opt_io_size=4096, -drive file=/tmp/tmp.x4RielIdVw/seed.img,if=none,id=disk_img_2,format=raw -device virtio-blk-pci,bootindex=2,scsi=off,drive=disk_img_2,id=virtio-disk-2,physical_block_size=4096,logical_block_size=512,min_io_size=4096,opt_io_size=4096, -drive file=/tmp/tmp.x4RielIdVw/extra.img,if=none,id=disk_img_3,format=raw -device virtio-blk-pci,bootindex=3,scsi=off,drive=disk_img_3,id=virtio-disk-3,physical_block_size=4096,logical_block_size=512,min_io_size=4096,opt_io_size=4096, -device virtio-net-pci,netdev=net00 -netdev type=user,id=net00 -m 768 -echr 0x05 -nographic


# /var/lib/cloud/instance/scripts/part-001
=========================================
size: 16777216
queue/logical_block_size: 512
queue/physical_block_size: 4096
queue/optimal_io_size: 4096
queue/minimum_io_size: 4096
=========================================

# sfdisk --list /dev/vdc
Disk /dev/vdc: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


# meg512=$((1024*1024/512))
# read size < /sys/class/block/vdc/size
# echo size=$size; echo meg=$meg512
size=16777216
meg=2048
# echo "${meg512},$(($size-$meg512)),83" > my.info
# cat my.info
2048,16775168,83
# sfdisk /dev/vdc < my.info

# sfdisk /dev/vdc < my.info
Checking that no-one is using this disk right now ... OK

Disk /dev/vdc: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

>>> Created a new DOS disklabel with disk identifier 0x86f59afa.
Created a new partition 1 of type 'Linux' and of size 8 GiB.
/dev/vdc2: 
New situation:

Device     Boot Start      End  Sectors Size Id Type
/dev/vdc1        2048 16777215 16775168   8G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Download as text