Skip to content
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

Digital ocean grub issue #2

Closed
ibrahimsag opened this issue Jun 22, 2016 · 11 comments
Closed

Digital ocean grub issue #2

ibrahimsag opened this issue Jun 22, 2016 · 11 comments

Comments

@ibrahimsag
Copy link
Contributor

I get this error while trying to use with a digital ocean vps with ubuntu image. any help is appreciated.

/nix/store/r7bnab4vmgz3ds4z0rbrfjhm20j3n1lk-grub-2.x-2015-11-16/sbin/grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
/nix/store/r7bnab4vmgz3ds4z0rbrfjhm20j3n1lk-grub-2.x-2015-11-16/sbin/grub-install: error: embedding is not possible, but this is required for cross-disk install.
/nix/store/w345fzhsr2ckzhazmxr3lc906glnxqiy-install-grub.pl: installation of GRUB on /dev/vda failed
@elitak
Copy link
Owner

elitak commented Jun 22, 2016

This is because the newer droplet images use a unrecommended partition/bootloader layout. My latest commit addresses this by allowing the grub installation to fail, but still updating the menu. In most cases like yours, you should be able to reboot into the system, after the final printed "WARNING" message.

Please try it and let me know if it works. If not, you may be able to use an older droplet image that doesn't use the GPT partition table, e.g. the previous Debian image(s).

@ibrahimsag
Copy link
Contributor Author

ibrahimsag commented Jun 24, 2016

with ubuntu 16.04:

+ rsync -a --delete --exclude=/tmp /tmp/tmp.YX747ln9wx/ /tmp/tmp.7p1USudPdN
rsync: delete_file: rmdir(var/lib/lxcfs) failed: Device or resource busy (16)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

debian 8.5 gives a similar resource busy error.

ubuntu 14.04 and debian 7.5 finishes after this. cant find nixos-rebuild when i log in after reboot.

created 2 symlinks in user environment
finalising the installation...
updating GRUB 2 menu...
setting up /etc...
mount: mount point /dev/shm is a symbolic link to nowhere
Initializing machine ID from KVM UUID.

i really would like to be able to understand what is going on. but i have no clue. can you take another look?

@elitak
Copy link
Owner

elitak commented Jun 24, 2016

I'm seeing these same problems. The /dev/shm one may be an upstream bug that I can hack around, but these resource busy ones, I don't know why they're happening. I'll keep looking for at least one droplet image that the script can be reliably run on.

I think I'll maybe just append || true to the rsync line.

@ibrahimsag
Copy link
Contributor Author

gets stuck on boot menu this time.
anyways, thanks for all the help. please, let me know if you solve this.

@elitak
Copy link
Owner

elitak commented Jun 25, 2016

I think they made some systemic change that affects all images. I'll keep working on it when I have time and post a fix when I get it.

@elitak
Copy link
Owner

elitak commented Jun 25, 2016

Okay, try the latest commit on Ubuntu 16.04

@ibrahimsag
Copy link
Contributor Author

sorry to report that it stills gets stuck during boot.
there are some messages starting with ipxe, like version numbers. and it says Booting from hard disk. i guess we couldn't replace the underlying boot files.

@elitak
Copy link
Owner

elitak commented Jun 26, 2016

So it proceeds to reboot then fails to boot? Can you screenshot the console? You're using the Ubuntu 16.04 image, right? I'm going to be supporting only 1 specific image moving forward; it'll be at the top of the comments in the file.

nixos-install isn't able to deal with the broken partition layout DO has in all its images. They have the volume partitioned with GPT but fail to create a bios partition for grub as one is supposed to do. There used to be some of them that used MSDOS headers, but they're gone now. I will open a ticket with them advising them of this problem.

A solution for you might be to just run grub manually at the end of the script. Since it works for me, can you just try to scp over the script, comment out the reboot at the end, then source nixos-infect to run the installation. At the end, you can try running something like /nix/store/*grub*/bin/grub2-install --force /dev/sda1, the goal being to force grub installation using blocklists. Then check the contents of /boot/grub/grub.cfg to see they're okay and reboot -f

@elitak
Copy link
Owner

elitak commented Jun 27, 2016

I found that Fedora 24 x64 uses proper partitioning. I've updated the script to work using that image. Let me know if that one works.

@ibrahimsag
Copy link
Contributor Author

Couldn't try to force install the grub as i lost connection couple of times. I can try it later again if we need it.

Fedora installation worked. That's a huge relief.

Thank you!

@elitak
Copy link
Owner

elitak commented Jun 27, 2016

Yeah, don't worry about the other images. The way I see it, only one needs to work, and that's going to be Fedora 24 for now, since it requires the fewest hacks.

Glad to hear it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants