Oct 282009
仮想ディスク上のgrub設定を編集したときのメモ。
[root@localhost ~]# fdisk -u -l /var/lib/libvirt/images/centos5_3-sda.img You must set cylinders. You can do this from the extra functions menu. Disk /var/lib/libvirt/images/centos5_3-sda.img: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x0003cb19 Device Boot Start End Blocks Id System /var/lib/libvirt/images/centos5_3-sda.img1 * 63 192779 96358+ 83 Linux /var/lib/libvirt/images/centos5_3-sda.img2 192780 14811929 7309575 83 Linux /var/lib/libvirt/images/centos5_3-sda.img3 14811930 16771859 979965 82 Linux swap / Solaris Partition 3 has different physical/logical endings: phys=(1023, 254, 63) logical=(1043, 254, 63) [root@localhost ~]# mount -o loop,offset=`expr 192780 \* 512` /var/lib/libvirt/images/centos5_3-sda.img /mnt # mount -o loop,offset=`expr 63 \* 512` /var/lib/libvirt/images/centos5_3-sda.img /mnt/boot [root@localhost ~]# cat /mnt/boot/grub/menu.lst # Enable console output via the serial port. unit 0 is /dev/ttyS0, unit 1 is /dev/ttyS1... serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=15 serial console kernel /vmlinuz-2.6.26-2-amd64 root=/dev/vda2 ro quiet ↓ kernel /vmlinuz-2.6.26-2-amd64 root=/dev/vda2 ro quiet console=tty0 console=ttyS0,115200n8
Sorry, the comment form is closed at this time.