Приветствую, знатоки!
Дано: - centos 6 установленный на raid1 на физический сервер.
/dev/md0 on / type ext4 (rw,commit=10)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/md4 on /home type ext4 (rw,noatime,commit=20,data=writeback,barrier=0,noacl,nouser_xattr)
/dev/md2 on /tmp type ext4 (rw,noatime,commit=20,data=writeback,barrier=0,noacl,nouser_xattr)
/dev/md5 on /usr type ext4 (rw,noatime,commit=10)
/dev/md3 on /var type ext4 (rw,noatime,commit=10)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Что для этого делаю:
- Создаю stage4
- Подготавливаю виртуальную машину и разбиваю виртуальный диск, mkfs.ext4 /dev/sda1
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1ee5262b Device Boot Start End Sectors Size Id Type /dev/sda1 2048 18876415 18874368 9G 83 Linux /dev/sda2 18876416 20971519 2095104 1023M 82 Linux swap / Solaris
- Монтирую, распаковываю stage, чрутюсь
mount -t proc proc /mnt/her/proc mount --rbind /sys /mnt/her/sys mount --make-rslave /mnt/her/sys mount --rbind /dev /mnt/her/dev mount --make-rslave /mnt/her/dev chroot /mnt/her /bin/bash source /etc/profile export PS1="(chroot) $PS1"
- Пытаюсь поставить grub
(chroot) [root@sysresccd /]# grub-install /dev/sda /dev/md0 does not have any corresponding BIOS drive. (chroot) [root@sysresccd /]# grub Probing devices to guess BIOS drives. This may take a long time. 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> root (hd0,0) root (hd0,0) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no Error 14t: Filesystem compatibility error, cannot read whole file (chroot) [root@sysresccd /]# grub-install --recheck /dev/sda Probing devices to guess BIOS drives. This may take a long time. /dev/md0 does not have any corresponding BIOS drive. (chroot) [root@sysresccd /]# grub Probing devices to guess BIOS drives. This may take a long time. 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/sda device (hd0) /dev/sda grub> root (hd0,0) root (hd0,0) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no Error 14t: Filesystem compatibility error, cannot read whole file
Вопрос: Что я делаю не так?