{"action":"created","issue":{"url":"https://api.github.com/repos/rancherio/os/issues/135","labels_url":"https://api.github.com/repos/rancherio/os/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/rancherio/os/issues/135/comments","events_url":"https://api.github.com/repos/rancherio/os/issues/135/events","html_url":"https://github.com/rancherio/os/issues/135","id":66940406,"number":135,"title":"rancheros-install -f does not partition or re-read table correctly","user":{"login":"huslage","id":413867,"avatar_url":"https://avatars.githubusercontent.com/u/413867?v=3","gravatar_id":"","url":"https://api.github.com/users/huslage","html_url":"https://github.com/huslage","followers_url":"https://api.github.com/users/huslage/followers","following_url":"https://api.github.com/users/huslage/following{/other_user}","gists_url":"https://api.github.com/users/huslage/gists{/gist_id}","starred_url":"https://api.github.com/users/huslage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huslage/subscriptions","organizations_url":"https://api.github.com/users/huslage/orgs","repos_url":"https://api.github.com/users/huslage/repos","events_url":"https://api.github.com/users/huslage/events{/privacy}","received_events_url":"https://api.github.com/users/huslage/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-07T17:12:22Z","updated_at":"2015-06-20T08:16:51Z","closed_at":"2015-04-30T21:26:23Z","body":"```\r\n[rancher@rancher ~]$ sudo rancheros-install -c cloud-init -f -v v0.2.1 -d /dev/sda -t generic   \r\nAll data will be wiped from this device\r\nPartition: true\r\nDEVICE: /dev/sda1\r\nAre you sure you want to continue? [yN]y+ DEVICE=/dev/sda1\r\n+ [[ -z /dev/sda1 ]]\r\n++ wc -l\r\n+++ cut -d / -f3\r\n+++ echo /dev/sda1\r\n++ grep sda1 /proc/partitions\r\n+ PARTITION_COUNT=1\r\n+ '[' 1 -gt 1 ']'\r\n+ fdisk /dev/sda1\r\n\r\nWelcome to fdisk (util-linux 2.25.2).\r\nChanges will remain in memory only, until you decide to write them.\r\nBe careful before using the write command.\r\n\r\n\r\nCommand (m for help): Partition type\r\n   p   primary (1 primary, 0 extended, 3 free)\r\n   e   extended (container for logical partitions)\r\nSelect (default p): Partition number (2-4, default 2): Value out of range.\r\nPartition number (2-4, default 2): \r\nNo free sectors available.\r\n\r\nCommand (m for help): \r\n\r\nCommand (m for help): \r\nThe partition table has been altered.\r\nCalling ioctl() to re-read partition table.\r\nRe-reading the partition table failed.: Invalid argument\r\n\r\nThe kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).\r\n```\r\nThe script stops after this. Re-running `rancheros-install` with `/dev/sda1` gives us:\r\n\r\n```\r\n[root@rancher rancher]# rancheros-install -c cloud-init -v v0.2.1 -d /dev/sda1 -t generic\r\nAll data will be wiped from this device\r\nPartition: true\r\nDEVICE: /dev/sda1\r\nAre you sure you want to continue? [yN]y\r\n\r\n+ DEVICE=/dev/sda1\r\n+ [[ -z /dev/sda1 ]]\r\n++ wc -l\r\n+++ echo /dev/sda1\r\n+++ cut -d / -f3\r\n++ grep sda1 /proc/partitions\r\n+ PARTITION_COUNT=1\r\n+ '[' 1 -gt 1 ']'\r\n+ fdisk /dev/sda1\r\n\r\nWelcome to fdisk (util-linux 2.25.2).\r\nChanges will remain in memory only, until you decide to write them.\r\nBe careful before using the write command.\r\n\r\nCommand (m for help): Partition type\r\n   p   primary (1 primary, 0 extended, 3 free)\r\n   e   extended (container for logical partitions)\r\nSelect (default p): Partition number (2-4, default 2): Value out of range.\r\nPartition number (2-4, default 2): \r\nNo free sectors available.\r\n\r\nCommand (m for help): \r\n\r\nCommand (m for help): \r\nThe partition table has been altered.\r\nCalling ioctl() to re-read partition table.\r\nRe-reading the partition table failed.: Invalid argument\r\n\r\nThe kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).\r\n```\r\n`fdisk` shows a partition:\r\n```\r\nDisk /dev/sda: 17.1 GB, 17179869184 bytes\r\n171 heads, 2 sectors/track, 98112 cylinders\r\nUnits = cylinders of 342 * 512 = 175104 bytes\r\n\r\n   Device Boot      Start         End      Blocks  Id System\r\n/dev/sda1               6       98113    16776192  83 Linux\r\n```\r\n\r\n`cloud-init` is simply my ssh keys."},"comment":{"url":"https://api.github.com/repos/rancherio/os/issues/comments/113729746","html_url":"https://github.com/rancherio/os/issues/135#issuecomment-113729746","issue_url":"https://api.github.com/repos/rancherio/os/issues/135","id":113729746,"user":{"login":"fatihusta","id":11256228,"avatar_url":"https://avatars.githubusercontent.com/u/11256228?v=3","gravatar_id":"","url":"https://api.github.com/users/fatihusta","html_url":"https://github.com/fatihusta","followers_url":"https://api.github.com/users/fatihusta/followers","following_url":"https://api.github.com/users/fatihusta/following{/other_user}","gists_url":"https://api.github.com/users/fatihusta/gists{/gist_id}","starred_url":"https://api.github.com/users/fatihusta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatihusta/subscriptions","organizations_url":"https://api.github.com/users/fatihusta/orgs","repos_url":"https://api.github.com/users/fatihusta/repos","events_url":"https://api.github.com/users/fatihusta/events{/privacy}","received_events_url":"https://api.github.com/users/fatihusta/received_events","type":"User","site_admin":false},"created_at":"2015-06-20T08:16:51Z","updated_at":"2015-06-20T08:16:51Z","body":"Hi deniseschannon\r\n\r\nyes I am setting file creating in this way.\r\n\r\nI've erased VirtualBox on the definition and create it again. It worked.\r\n\r\nI tried to reproduce the same situation. But I was not successful.\r\nI will share it here I can reproduce the error.\r\n\r\nThanks for your help.\r\n\r\nSory my bad english.\r\n"}}