GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
347 stars 11 forks source link

Installer mounting internal storage as /cdrom #371

Open alanmimms opened 7 years ago

alanmimms commented 7 years ago

I had a bootable filesystem on my internal SSD on a Acer Chromebook 720p and wanted to try GalliumOS. I inserted the USB stick made using DD on another machine into the black USB port on my machine and powered on. When it came up the old SSD OS was running even though it DEFINITELY booted from the USB stick.

I rebooted and used the GalliumOS installer's command line to do lsblk and noted that my internal SSD (111GB) was /dev/sda and /dev/sda1 was mounted as the /cdrom filesystem. After poking around a bit, I decided to zero the first 160MB of /dev/sda using DD to see if that would fix this problem. Sure enough, after some errors about a corrupted filesystem as I shutdown the OS, the next boot of the USB stick came up with /cdrom mounted properly on /dev/sdb which is the USB stick device.

Is the logic in the determination of what device is the boot device to mount the /cdrom filesystem too simpleminded? Maybe it's taking the first disk without checking anything else?

I have Mr Chromebox BIOS 2017.apr.9 release. Maybe this is causing this problem, but I believe it's an actual bug in the installer scripts regardless of how it happens.

ghost commented 7 years ago

That's a very strange issue that I've never seen before. It's definitely not the firmware but I'm not really ready to call it a problem with the installer either. Any thoughts @reynhout?

reynhout commented 7 years ago

Interesting. What device was the USB drive reporting on, when sda was the internal?

I don't think we change anything in there that would differ from upstream Ubuntu, but I will give it some more thought.

ghost commented 7 years ago

It's also definitely worth noting that the the firmware is not what decides if the internal storage is /dev/sda or /dev/mmcblk0, that is determined by the interface used. Devices with M.2 or SATA drives including Sandy Bridge, Ivy Bridge, Haswell and Broadwell have /dev/sda, devices with eMMC like Bay Trail, Braswell, and Skylake use /dev/mmcblk0

alanmimms commented 7 years ago

The thumb drive was /dev/sdb and the internal M.2 was dev/sda. It's a Haswell platform of course. Does the fact that I upgraded the internal M.2 to a larger drive change any of this? It's just a M.2 drive - nothing special AFAIK.

ghost commented 7 years ago

Nope, it is theoretically possible for different types of M.2 drives to cause it to be identified differently by the operating system, but I've never seen that happen on a Chromebook specifically, only on desktops and laptops where faster M.2 drives are used.