FS on Ubuntu 16.04 - MortezaRamezani/gem5 GitHub Wiki

since sfdisk has changed, the default gem5img is not working properly. in the meantime we can do this, after creating the image (either with gem5img or dd):

dd if=/dev/zero of=ubuntu-14.04.img bs=1 count=0 seek=8G

and set up loop device: sudo losetup /dev/loop0 ubuntu-14.04.img

install gparted, then:

sudo gparted /dev/loop0

then create partition table with msdos and create a new partition with ext2.

confirm with parted using following link:

http://www.mariobadr.com/ubuntu-1404-disk-images-for-gem5.html

then detach the loop device:

sudo losetup -d /dev/loop0

follow the rest from Mario and Jason websites.

http://www.lowepower.com/jason/creating-disk-images-for-gem5.html

./build/X86/gem5.opt configs/graph/fs-run.py