On Wed, Jan 27, 2010 at 07:21:54PM -0300, Sergio Belkin wrote: > Hi, I use Centos 5.4 x86_64 > > kernel used is 2.6.18-164.11.1.el5xen > > I have a physical machine running Debian Etch (32 bit) and Debian > Lenny and I virtualized the first one as follows: > > *Created a HVM DomU with Virt-Manager with a virtual disk file of 40000 M > *Boot from LiveCD, and created a swap and a ext3 partitions (Yes, very > simple layout). > *Rsync'd files from root partition of physical machine to partition > mounted on LiveCD on DomU. > *Chrooted and edited files /boot/grub/menu.lst, /etc/fstab, etc/mtab, > /boot/grub/device.map. > *Then I rebooted from hard disk and stay freezed with the message > "booting from hard disk" . But it doesn't boot at all from hard disk. > > I can boot using grub-rescue-cdrom, but if I try to install grub with > grub-install it outputs: > > > "The file /boot/grub/stage1 not read correctly" > > (I've tried --recheck option, and depmod and update-grub commands with > no success) > Well.. stage1 is definitely needed by grub. So grub didn't get installed. Your domU can't boot then. - Do you have the stage1 file there? - Was the partition layout the same for the old server? - Is the grub.conf "root (hd0,X)" correct for the new disk? You can install grub from grub-shell like this, after chrooting to the filesystem: # grub device (hd0) /dev/sda root (hd0,0) setup (hd0) replace "hd0,0" with the correct partition index. -- Pasi > > Output of file command on virtual disk file is: > > /virtuales/videodisk.img: x86 boot sector; partition 1: ID=0x82, > starthead 1, startsector 63, 4273227 sectors; partition 2: ID=0x83, > active, starthead 0, startsector 4273290, 77626080 sectors > > The DomU file is: > > DomU (file): > > name = "video" > uuid = "54d25d78-b9d0-0159-542c-bb601cc936bb" > maxmem = 1024 > memory = 512 > vcpus = 1 > builder = "hvm" > kernel = "/usr/lib/xen/boot/hvmloader" > boot = "d" > pae = 1 > acpi = 1 > apic = 1 > localtime = 0 > on_poweroff = "destroy" > on_reboot = "restart" > on_crash = "restart" > device_model = "/usr/lib64/xen/bin/qemu-dm" > sdl = 0 > vnc = 1 > vncunused = 1 > keymap = "es" > disk = [ "file:/virtuales/videodisk.img,hda,w", > "file:/virtuales/isos/grub-rescue-cdrom.iso,hdc:cdrom,r" ] > vif = [ "mac=00:16:36:0b:24:2d,bridge=xenbr0,script=vif-bridge" ] > parallel = "none" > serial = "pty" > EOF > > > > With grub-rescue cd DomU can boot but as I've said can't install grub > and loads also loopback interface. > > > Please could you tell me what I am doing wrong? > > Thanks in advance!! > > -- > -- > Open Kairos http://www.sergiobelkin.com > Watch More TV http://sebelk.blogspot.com > Sergio Belkin - > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos