我正在基于ArchWiki设置过程运行此脚本。在GRUB配置步骤中失败
我在具有1 GB内存的VMware Player中使用archlinux-2013.12.01-dual.iso,内存sda
为810 MB。我还在主机上安装了CIFS共享。
# DEV=sda
# PART=sda1
# echo "1,,L,*" | sfdisk /dev/$DEV
# mkfs.ext3 /dev/$PART
# mount /dev/$PART /mnt
# pacstrap -i /mnt base
# genfstab -U -p /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# pacman -S grub
# pacman -S os-prober
# grub-mkconfig -o /boot/grub/grub.cfg
我得到:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning.
/run/lvm/lvmetad.socket: connect failed: No such file or directory
/run/lvm/lvmetad.socket: connect failed: No such file or directory
No volume groups found
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 164
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.done
我没有安装LVM分区/驱动器。
# fdisk -l /dev/sda
Disk /dev/sda: 819 MiB, 858783744 bytes, 1677312 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: 0x000d5a2a
Device Boot Start End Blocks Id System
/dev/sda1 2048 1677311 837632 83 Linux
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 819M 0 disk
└─sda1 8:1 0 818M 0 part /mnt
sr0 11:0 1 522M 0 rom /run/archiso/bootmnt
sr1 11:1 1 10M 0 rom
loop0 7:0 0 224.2M 1 loop /run/archiso/sfs/root-image
loop1 7:1 0 1.4G 1 loop
└─arch_root-image 254:0 0 1.4G 0 dm /
loop2 7:2 0 1.4G 0 loop
└─arch_root-image 254:0 0 1.4G 0 dm /
/boot/grub/grub.cfg.new
是:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9d1d349e-d061-4e0f-9312-be19ca2dcb74
else
search --no-floppy --fs-uuid --set=root 9d1d349e-d061-4e0f-9312-be19ca2dcb74
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-9d1d349e-d061-4e0f-9312-be19ca2dcb74' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9d1d349e-d061-4e0f-9312-be19ca2dcb74
else
search --no-floppy --fs-uuid --set=root 9d1d349e-d061-4e0f-9312-be19ca2dcb74
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=9d1d349e-d061-4e0f-9312-be19ca2dcb74 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-9d1d349e-d061-4e0f-9312-be19ca2dcb74' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9d1d349e-d061-4e0f-9312-be19ca2dcb74
else
search --no-floppy --fs-uuid --set=root 9d1d349e-d061-4e0f-9312-be19ca2dcb74
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=9d1d349e-d061-4e0f-9312-be19ca2dcb74 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9d1d349e-d061-4e0f-9312-be19ca2dcb74' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 9d1d349e-d061-4e0f-9312-be19ca2dcb74
else
search --no-floppy --fs-uuid --set=root 9d1d349e-d061-4e0f-9312-be19ca2dcb74
fi
echo 'Loading Linux core repo kernel ...'
linux /boot/vmlinuz-linux root=UUID=9d1d349e-d061-4e0f-9312-be19ca2dcb74 rw quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-linux-fallback.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9d1d349e-d061-4e0f-9312-be19ca2dcb74' {
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
archlinux-2013.12.01-dual.iso
384 MB内存的VMware Player中使用标准。sda
是810 MB。在辅助ISO上,sr1
我运行了一个脚本来安装Vim并在主机上安装CIFS共享。