grub with problem

Marcio Souza

New Member
Apr 3, 2016
4
0
1
59
hello everyone, my Proxmox 3.4 has problem in grub and need to redo it, I tried to boot with ubuntu and I did not have success if algume can show me some procedure appreciate.

Marcio Souza
 
Hi, you can use system rescue cd iso, boot from a disk or from USB, good loock
 
hello

run the following commands with the system cd rescue, returned me the following message:

cannot open /boot/grub/i386-pc/search_fs_file.mod : No space left on device.


sudo mkdir /media/USB
sudo mount /dev/pve/root /media/USB/
sudo mount /dev/sda1 /media/USB/boot
sudo mount -t proc proc /media/USB/proc
sudo mount -t sysfs sys /media/USB/sys
sudo mount -o bind /dev /media/USB/dev
sudo mount -t devpts pts /media/USB/pts/
chroot /media/USB /bin/bash
grub-install /dev/sda
 
Hi,

You have to boot from the system rescue cd and select option 5 "Boot an existing linux system installed on the disk", if it boots OK it will ask for user and password, then I need to see the grub.cfg, if it doesn't boot this way I can't help you, its out of my knowledge.
 
Hi,

You have to boot from the system rescue cd and select option 5 "Boot an existing linux system installed on the disk", if it boots OK it will ask for user and password, then I need to see the grub.cfg, if it doesn't boot this way I can't help you, its out of my knowledge.

This happens because Proxmox creates three partitions on a drive:

1. a 1MB BIOS boot partition
2. a 256MB EFI partition
3. the rest

The BIOS boot partition is too small for grub to be installed into, which is why it complains there is no space left

Grub needs at least 9.3MB to install
 
This happens because Proxmox creates three partitions on a drive:

1. a 1MB BIOS boot partition
2. a 256MB EFI partition
3. the rest

The BIOS boot partition is too small for grub to be installed into, which is why it complains there is no space left

Grub needs at least 9.3MB to install

not sure why you think that would be the case, but it is wrong. 1MB is enough for grub, just needs the code for loading the rest from /boot (stage1 / 1.5)
 
not sure why you think that would be the case, but it is wrong. 1MB is enough for grub, just needs the code for loading the rest from /boot (stage1 / 1.5)

If you test it and run "grub-install /dev/sda" you'll see that it'll result in taking up 9.3MB

Unless there are other grub-install options or pre-requisites that are required.

So far, the issues are:
- unable to mount /dev/sdX1, because it is unable to determine the fs/magicblock/etc.
- you can reformat /dev/sdX1 to ext2, and then run "grub-install /dev/sdX", but you'll get the "No space left on device" error message
 
If you test it and run "grub-install /dev/sda" you'll see that it'll result in taking up 9.3MB

Unless there are other grub-install options or pre-requisites that are required.

So far, the issues are:
- unable to mount /dev/sdX1, because it is unable to determine the fs/magicblock/etc.
- you can reformat /dev/sdX1 to ext2, and then run "grub-install /dev/sdX", but you'll get the "No space left on device" error message

grub has a lot of checks to detect the installation scenario - if you give it a partition, it will install more than just the stage1(.5) there.. if your disk is partitioned correctly (GPT, correct UUIDs), a 1 MB BIOS boot partition is enough.
 
grub has a lot of checks to detect the installation scenario - if you give it a partition, it will install more than just the stage1(.5) there.. if your disk is partitioned correctly (GPT, correct UUIDs), a 1 MB BIOS boot partition is enough.

The scenario is that Proxmox is not able to boot. Proxmox had been installed and working prior to it no longer working. And upon following https://pve.proxmox.com/wiki/Recover_From_Grub_Failure

You get the following issues:
- unable to mount /dev/sdX1, because it is unable to determine the fs/magicblock/etc.
- you can reformat /dev/sdX1 to ext2, and then run "grub-install /dev/sdX", but you'll get the "No space left on device" error message

This is when using what Proxmox had already setup
 
you are following a user-provided tip for upgrading from 3.4 to 4.x.. the bios boot partition is not supposed to be mounted, and /boot is part of / and not a separate partitions on PVE systems since ages..
 
you are following a user-provided tip for upgrading from 3.4 to 4.x.. the bios boot partition is not supposed to be mounted, and /boot is part of / and not a separate partitions on PVE systems since ages..

I see. Is there a documented method for reinstalling grub for Proxmox? What do we need to do with the BIOS boot and EFI System partitions?

Code:
root@world:~# fdisk -l /dev/sdo
Disk /dev/sdo: 37.3 GiB, 40020664320 bytes, 78165360 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: gpt
Disk identifier: 19BA5C67-40CA-4F7F-9E4C-37E00A0ED190

Device      Start      End  Sectors  Size Type
/dev/sdo1    2048     4095     2048    1M BIOS boot
/dev/sdo2    4096   528383   524288  256M EFI System
/dev/sdo3  528384 78165326 77636943   37G Linux LVM
 
the installer simply does:

Code:
grub-install --target i386-pc --no-floppy --bootloader-id='proxmox' /dev/FOO
for legacy/BIOS boot

and:

Code:
grub-install --target x86_64-efi --no-floppy --bootloader-id='proxmox' /dev/FOO
with the vfat formatted ESP mounted at /boot/efi for EFI boot

FOO is the whole disk in both cases, and grub will do the rest automatically.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!