{"action":"created","issue":{"url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/8","repository_url":"https://api.github.com/repos/ryankurte/docker-rpi-emu","labels_url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/8/comments","events_url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/8/events","html_url":"https://github.com/ryankurte/docker-rpi-emu/issues/8","id":186159777,"number":8,"title":"expand rpi image","user":{"login":"kidpixo","id":2255209,"avatar_url":"https://avatars.githubusercontent.com/u/2255209?v=3","gravatar_id":"","url":"https://api.github.com/users/kidpixo","html_url":"https://github.com/kidpixo","followers_url":"https://api.github.com/users/kidpixo/followers","following_url":"https://api.github.com/users/kidpixo/following{/other_user}","gists_url":"https://api.github.com/users/kidpixo/gists{/gist_id}","starred_url":"https://api.github.com/users/kidpixo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidpixo/subscriptions","organizations_url":"https://api.github.com/users/kidpixo/orgs","repos_url":"https://api.github.com/users/kidpixo/repos","events_url":"https://api.github.com/users/kidpixo/events{/privacy}","received_events_url":"https://api.github.com/users/kidpixo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-30T20:12:23Z","updated_at":"2016-11-02T11:07:23Z","closed_at":null,"body":"Hi,\nI'm trying to expand an existing image (latest raspberry jessie), with these commands adapted from your makefile:\n\n``` bash\n docker run -it --rm --privileged=true -v $PATH_TO_IMAGES:/usr/rpi/images -w /usr/rpi ryankurte/docker-rpi-emu ./expand.sh images/2016-09-23-ra\nspbian-jessie-lite.img 4096\n\n[...output...]\nThe filesystem is already 322048 (4k) blocks long.  Nothing to do!\n```\n\nEssentially, I want to compile stuff in a fresh jessie-lite and than write it on SD in qemu, but it doesn't fit the image size as it is.\n\nI'm on mac with Docker.app , version `1.12.1, build 6f9534c`.\n\nThank you for the nice docker image!\n"},"comment":{"url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/comments/257835192","html_url":"https://github.com/ryankurte/docker-rpi-emu/issues/8#issuecomment-257835192","issue_url":"https://api.github.com/repos/ryankurte/docker-rpi-emu/issues/8","id":257835192,"user":{"login":"kidpixo","id":2255209,"avatar_url":"https://avatars.githubusercontent.com/u/2255209?v=3","gravatar_id":"","url":"https://api.github.com/users/kidpixo","html_url":"https://github.com/kidpixo","followers_url":"https://api.github.com/users/kidpixo/followers","following_url":"https://api.github.com/users/kidpixo/following{/other_user}","gists_url":"https://api.github.com/users/kidpixo/gists{/gist_id}","starred_url":"https://api.github.com/users/kidpixo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidpixo/subscriptions","organizations_url":"https://api.github.com/users/kidpixo/orgs","repos_url":"https://api.github.com/users/kidpixo/repos","events_url":"https://api.github.com/users/kidpixo/events{/privacy}","received_events_url":"https://api.github.com/users/kidpixo/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T11:07:23Z","updated_at":"2016-11-02T11:07:23Z","body":"Actually, this is the only point I miss.\r\n\r\nFollowing also this [RaspberryPi/qemu-user-static (Debian Wiki)](https://wiki.debian.org/RaspberryPi/qemu-user-static) guide, when I do\r\n\r\n>losetup -f -P --show 2015-11-21-raspbian-jessie.img\r\n>\r\n>This should set up /dev/loop0 as the whole image and /dev/loop0p2 as the partition we're expanding \r\n\r\nit doesn't mount the two partitions of the image. I solved mounting explicitly the second partition with an offset to `/dev/loop0` : \r\n\r\n```bash\r\n# fdisk -lu 2016-09-23-raspbian-jessie-lite.img\r\nDisk jessie-lite.img: 2.3 GiB, 2463105024 bytes, 4810752 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical/physical): 512 bytes / 512 bytes\r\nI/O size (minimum/optimal): 512 bytes / 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0x5a7089a1\r\n\r\nDevice           Boot  Start     End Sectors  Size Id Type\r\njessie-lite.img1        8192  137215  129024   63M  c W95 FAT32 (LBA)\r\njessie-lite.img2      137216 2713599 2576384  1.2G 83 Linux\r\n\r\n#  137216* 512 = 70254592\r\nlosetup --offset 70254592 /dev/loop0 2016-09-23-raspbian-jessie-lite.img\r\n```\r\n\r\nnow it works\r\n\r\n```\r\n# e2fsck -f /dev/loop0\r\ne2fsck 1.42.13 (17-May-2015)\r\nPass 1: Checking inodes, blocks, and sizes\r\nPass 2: Checking directory structure\r\nPass 3: Checking directory connectivity\r\nPass 4: Checking reference counts\r\nPass 5: Checking group summary information\r\n/dev/loop0: 35460/80640 files (0.1% non-contiguous), 202598/322048 blocks\r\n\r\n# resize2fs /dev/loop0\r\nresize2fs 1.42.13 (17-May-2015)\r\nResizing the filesystem on /dev/loop0 to 584192 (4k) blocks.\r\nThe filesystem on /dev/loop0 is now 584192 (4k) blocks long.\r\n```\r\nI'm working in the ubuntu container you based your image on.\r\n\r\nAny clue?"}}
{"actor":{"display_login":"kidpixo"}}