help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installing and configuring grub in chroot


From: Maciej Gałkiewicz
Subject: Installing and configuring grub in chroot
Date: Mon, 24 Jun 2013 15:19:28 +0200

Hi

I would like to configure grub on raw image file. I have managed to successfully installed it with:
# mount -o loop instance.image-v0.77-1-cc-grub.img tmp/
# losetup -a
/dev/loop0: [fd0d]:1074766219 (/var/lib/nova/instances/grub/instance.image-v0.77-1-cc-grub.img)
# mount -o bind /proc tmp/proc/
# mount -o bind /dev tmp/dev
# mount -o bind /sys tmp/sys
# chroot tmp/
# grub-install --force /dev/loop0
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.

The problem is that installed kernel is not added to grub.cfg.

# update-grub2
Generating grub.cfg ...
done

# ls /boot/
config-3.8-2-amd64  grub  initrd.img-3.8-2-amd64  System.map-3.8-2-amd64  vmlinuz-3.8-2-amd64

My grub version 1.99-27+deb7u1, debian wheezy (7.1)

# cat device.map
(hd0)   /dev/vda

# cat /etc/fstab
tmpfs /tmp tmpfs nodev,nosuid,size=35%,mode=1777 0 0
proc /proc proc defaults 0 0
/dev/vda / ext4 defaults 0 1

Device /dev/vda is not present inside chroot. It appears after booting the image file inside KVM.

regards
Maciej Galkiewicz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]