Commit 5cbea782 authored by Andreas Schmidt's avatar Andreas Schmidt

WIP: Resizing.

parent ec5c8d44
#!/bin/bash
apt-get update
apt-get install qemu qemu-user-static pixz -y
apt-get install file qemu qemu-user-static pixz -y
# Extract
......@@ -9,7 +9,7 @@ pixz -d ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.xz ubuntu-16.04.2-minimal
md5sum -c ubuntu-16.04.2-minimal-odroid-xu4-20170516.img.md5
# Resize Image
qemu-img resize ubuntu-16.04.2-minimal-odroid-xu4-20170516.img +10G
#qemu-img resize ubuntu-16.04.2-minimal-odroid-xu4-20170516.img +10G
# Mount
limit=$(sfdisk -l --bytes ubuntu-16.04.2-minimal-odroid-xu4-20170516.img | tail -n 1 | awk '{print $2}')
......@@ -17,13 +17,14 @@ limit=$(sfdisk -l --bytes ubuntu-16.04.2-minimal-odroid-xu4-20170516.img | tail
# Resize Image
loopdev=/dev/loop0
echo $limit
echo $loopdev
losetup --offset $((512 * $limit)) $loopdev ubuntu-16.04.2-minimal-odroid-xu4-20170516.img
/bin/bash
e2fsck -f $loopdev
/bin/bash
resize2fs $loopdev
e2fsck -f $loopdev
losetup -d $loopdev
#losetup --offset $((512 * $limit)) $loopdev ubuntu-16.04.2-minimal-odroid-xu4-20170516.img
#e2fsck -f $loopdev
#resize2fs -f $loopdev
#losetup -d $loopdev
# Mount
dir=/mnt/rna
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment