-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disks installed incorrectly on real hardware #337
Comments
The reason that installation isn't fully automated when using a USB drive is that the code only autoselects a disk when there's only one inserted:
This comes from the https://salsa.debian.org/installer-team/d-i source code under In our case, we have the choice to either hardcode the disk we use, patch the source code to autoselect the disk, or figure out some sort of step to automatically select it. |
Relevantly, the only reason a CDROM isn't treated as a valid disk is that there's special-case code for it:
(via We could also patch this part of the code. If we wanted to be real sketch, we could even do it at runtime, since it's just a bash script. |
oh lol. there's already support in the preseed for running a command to pick disks manually:
We just have to figure out how we want to select the disk to use. |
I've set up mitigations that appear to work for the partitioning and grub installation steps, which work by choosing the only disk that doesn't have a partition with the label ISOIMAGE, but the initramfs is still off-target, apparently due to the generated grub configuration pointing to /dev/sdb1 instead of /dev/sda1 or (more reasonably) something in /dev/disk/by-uuid/. Not entirely sure what the right solution is to get the grub config to be generated correctly. |
why doesn't this work? Shouldn't the disk have the same uuid? |
Yes, this should work, but I can't pass the disk-by-UUID to grub, because grub needs the full disk to install into, and the by-uuid symlinks are (apparently?) to partitions. I'm going to do more investigation on this. |
Aha! I think I figured it out. Grub is supposed to do the replacement with the UUID path itself. It wasn't doing so, because the UUID it had didn't match the UUID in /dev/disk/by-uuid/. After much painful debugging, it turns out that it's trying to use the UUID extracted from the filesystem header on disk, but the /dev/disk/by-uuid symlink uses udev, which is stale at this point. This can be fixed by running I'm not sure why this isn't run automatically by the installer, but running it fixes the problem, so I intend to run it and then update grub's config. |
Honestly, this might actually be an upstream bug in the debian installer... |
Nice work! I agree this could be a bug in d-i. |
This bug is theoretically fixed in #435, and needs to be tested by reinstalling on the preproduction cluster. |
This has been tested on real hardware. Specifically, I used IPMI to attach the ISO as a virtual hard disk, confirmed that it presented the same scenario as we saw with the USB drive in person (i.e. having sda for the USB drive and sdb for the disk), and confirmed that the installer still functioned in this scenario. This is not exactly the same as testing actually literally plugging in a USB drive, but I believe it's close enough -- and it means we've demonstrated we can actually install on a real machine. @cryslith I'm closing this; let me know if you think I really need to test the ISO installer on a physical USB drive instead of using the IPMI virtual storage thing. |
My feeling is that we should close this issue iff we can install on the hardware we have - from your comment I think this is the case, so I agree with closing |
On real hardware, the installer is actually on a USB stick, not on a CDROM. In practice, the USB drive shows up as sda, and the actual disk shows up as sdb.
This causes a few problems:
Given that we need to add Ceph support soon, it would be prudent for us to have a better disk-handling story.
The text was updated successfully, but these errors were encountered: