setup-storage + grub2

Waldemar Brodkorb fai at waldemar-brodkorb.de
Tue Apr 20 20:57:23 CEST 2010


Hi,
Michael Tautschnig wrote,

> No, using the underlying partitions doesn't really make sense, that would
> destroy LVM volume integrity. But according to some online docs it's pretty
> simple: Just strip off the /dev/mapper/ part.
> 
> I've updated the scripts in 3.4~beta1+experimental8; could you retry to see
> whether this finally works? It would be really cool if we finally had proper
> support for LVM/grub in FAI 3.4 ...

Does not work. Tested with experimental11:

disk_config:
disk_config disk1 disklabel:msdos

primary -       4G-      -       -

disk_config lvm
vg VolGroup00        disk1.1
VolGroup00-swaplv     swap    512      swap     sw
VolGroup00-rootlv     /       5G      ext3     rw
VolGroup00-bootlv     /boot   256      ext3     rw

shell.log extract:
=====   shell: GRUB_PC/10-setup   =====
+ error=0
+ trap error=1 ERR
+ set -a
+ '[' -r /tmp/fai/disk_var.sh ']'
+ . /tmp/fai/disk_var.sh
++ SWAPLIST=/dev/mapper/VolGroup00-swaplv
++ BOOT_DEVICE=/dev/mapper/VolGroup00-rootlv
++ ROOT_PARTITION=/dev/mapper/VolGroup00-rootlv
++ BOOT_PARTITION=/dev/mapper/VolGroup00-bootlv
+ '[' -z /dev/mapper/VolGroup00-rootlv ']'
+ '[' -z /dev/mapper/VolGroup00-bootlv ']'
+ ifclass NOMBR
+ '[' '' ']'
+ local cl
+ local ret=1
+ for cl in '$classes'
+ '[' xDEFAULT = xNOMBR ']'
+ for cl in '$classes'
+ '[' xLINUX = xNOMBR ']'
+ for cl in '$classes'
+ '[' xAMD64 = xNOMBR ']'
+ for cl in '$classes'
+ '[' xFAIBASE = xNOMBR ']'
+ for cl in '$classes'
+ '[' xDHCPC = xNOMBR ']'
+ for cl in '$classes'
+ '[' xGRUB_PC = xNOMBR ']'
+ for cl in '$classes'
+ '[' xchlor = xNOMBR ']'
+ for cl in '$classes'
+ '[' xLAST = xNOMBR ']'
+ '[' '' ']'
+ return 1
+ chroot /target grub-mkimage --output=/boot/grub/core.img biosdisk part_msdos ext2 lvm raid
+ chroot /target update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /memtest86+.bin
done
+ for device in '$BOOT_DEVICE'
+ grep -q '^/dev/mapper/'
+ echo /dev/mapper/VolGroup00-rootlv
++ sed 's#^/dev/mapper/##'
++ echo /dev/mapper/VolGroup00-rootlv
+ grub_dev=VolGroup00-rootlv
+ chroot /target /usr/sbin/grub-install --no-floppy '--modules=biosdisk part_msdos ext2 lvm raid' '(VolGroup00-rootlv)'
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk.  This is a BAD idea..
/usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
++ error=1
+ chroot /target /usr/sbin/grub-setup '(VolGroup00-rootlv)'
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk.  This is a BAD idea..
/usr/sbin/grub-setup: error: embedding is not possible, but this is required when the root device is on a RAID array or LVM volume.
++ error=1
+ exit 1
GRUB_PC/10-setup     FAILED with exit code 1.


> > Just as a site note, I think it does not match Xen para virt block
> > devices. (.f.e xvda)
> >  
> 
> I don't really think this is necessary as usually one doesn't have a bootloader
> *inside* Xen instances, or am I wrong?

You are right. Stupid site note ;)
 
bye
 Waldemar


More information about the linux-fai mailing list