I am trying to install rancherOS on a new M.2 SSD, but it fails (seemingly) at formatting the drive:
sudo ros install -t gptsyslinux -f --debug -c cloud-config.yml -d /dev/nvme0n1 -i rancher/os:v0.9.0 Installing from rancher/os:v0.9.0
> INFO[0000] start !isoinstallerloaded
> DEBU[0000] blkid type of /dev/sr0: iso9660
> DEBU[0000] mount (&exec.Cmd{Path:"/bin/mount", Args:[]string{"mount", "-t", "iso9660", "/dev/sr0", "/bootiso"}, Env:[]string(nil), Dir:"", Stdin:io.Reader(nil), Stdout:io.Writer(nil), Stderr:io.Writer(nil), ExtraFiles:[]*os.File(nil), SysProcAttr:(*syscall.SysProcAttr)(nil), Process:(*os.Process)(nil), ProcessState:(*os.ProcessState)(nil), ctx:context.Context(nil), lookPathErr:error(nil), finished:false, childFiles:[]*os.File(nil), closeAfterStart:[]io.Closer(nil), closeAfterWait:[]io.Closer(nil), goroutine:[]func() error(nil), errch:(chan error)(nil), waitDone:(chan struct {})(nil)})
> DEBU[0001] Mounted /dev/sr0
> INFO[0001] trying to load /bootiso/rancheros/installer.tar.gz
> INFO[0066] Loaded images from /bootiso/rancheros/installer.tar.gz
> INFO[0066] starting installer container for rancher/os:v0.9.0 (new)
> DEBU[0066] Run(&{/bin/system-docker [system-docker run --rm --net=host --privileged -v /:/host --volumes-from=all-volumes rancher/os:v0.9.0 -t gptsyslinux -d /dev/nvme0n1 -i rancher/os:v0.9.0 -f --no-reboot -c /opt/user_config.yml --isoinstallerloaded=1 --debug] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>})
Unable to find image 'rancher/os:v0.9.0' locally
v0.9.0: Pulling from rancher/os
627beaf3eaaf: Pull complete
c62794cdced6: Pull complete
c4626eff5f27: Pull complete
b47e38b4585d: Pull complete
4914c31b1e0c: Pull complete
172683e78e1a: Pull complete
865dbcf06d52: Pull complete
df311c14e097: Pull complete
41861a405f90: Pull complete
Digest: sha256:f48961131d180cebfc55a324e89316e35227ca43025cb74886d5929b76cb21ee
Status: Downloaded newer image for rancher/os:v0.9.0
Installing from rancher/os:v0.9.0
mount: /dev/sr0 is write-protected, mounting read-only
> time="2017-04-06T00:43:40Z" level=error msg="mkfs.ext4: exit status 1"
> time="2017-04-06T00:43:40Z" level=error msg="formatdevice exit status 1"
> time="2017-04-06T00:43:40Z" level=error msg="formatAndMount exit status 1"
> time="2017-04-06T00:43:40Z" level=error msg="error layDownOS exit status 1"
> time="2017-04-06T00:43:40Z" level=fatal msg="Failed to run install" err="exit status 1"
> FATA[0074] Failed to run install err="exit status 1"
fdisk output for the device is:
Disk /dev/nvme0n1: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xee88c077
Device Boot Start End Sectors Size Id Type
/dev/nvme0n1p1 * 2048 250066943 250064896 119.2G 83 Linux
I’ve tried a couple different versions to install (0.9.0, 0.9.1, and latest) and they all fail - so it doesn’t seem to be an issue with a specific installer image. Based on the fdisk output above it seems like the formatting is actually succeeding, not sure why it reports an exit status of 1.
I was able to manually format:
sudo mkfs.ext4 -L RANCHER_STATE /dev/nvme0n1
mke2fs 1.43.1 (08-Jun-2016)
Found a dos partition table in /dev/nvme0n1
Proceed anyway? (y,n) y
Discarding device blocks: done
Creating filesystem with 31258710 4k blocks and 7815168 inodes
Filesystem UUID: 2612d138-bd44-416a-abf4-960881281ebc
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
And then tried the install again with the same result. Finally, tried completely wiping the disk and installing:
sudo dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=1
1+0 records in
1+0 records out
But again, failed in the same way. What am I missing? I have another machine that I was able to install on a USB, but want to install to a more reliable disk type.