Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I can't explain this, I'm wondering if someone can help me explain it. When the VM is installed using virt-install, etc., grub can see it just fine. For example:

# parted /dev/mgtvg/cos64 print
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-8: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  10.7GB  10.7GB  primary   ext4            boot

grub sees it just fine:

# grub --device-map=/dev/null

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> device (hd0) /dev/mgtvg/cos64
device (hd0) /dev/mgtvg/cos64
grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,0)

The one I crafted by hand from a restore:

# parted /dev/mgtvg/linux2os 
GNU Parted 2.1
Using /dev/dm-3
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-3: 129GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  6469MB  6468MB  primary   ext4         boot

But grub can't find anything on it:

# grub --device-map=/dev/null

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> device (hd0) /dev/mgtvg/linux2os
device (hd0) /dev/mgtvg/linux2os
grub> find /boot/grub/stage1
find /boot/grub/stage1

Error 15: File not found

I mounted it and it's clearly in there:

# mount /dev/mapper/mgtvg-linux2osp1 /mnt
[root@kvm-5widecnv kvm_vm_setup]# ls -l /mnt/boot/grub/stage1 
-rw-r--r-- 1 root root 512 Feb  4 21:50 /mnt/boot/grub/stage1

# df /mnt
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/mgtvg-linux2osp1        6216792    978036   4922956  17% /mnt

What am I missing here? Why can't grub find any of my files?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.