所以这算是一天中遇到的两个不幸的问题,好在是可以在一天之内把这些问题解决了。(转载保留 Phodal's Blog Phodal's zenthink)
这个问题就相对比较好解决了
列出分区
ls
选择分区,设置分区
set root=(hd0,msdos8) set prefix=(hd0,msdos8)/boot/grub2
insmod normal normal
### BEGIN /etc/grub.d/10_linux ### menuentry 'openSUSE 12.2' --class 'opensuse-12-2' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f8b70b14-23bf-4703-9cc8-ed593448ae61' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos8' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 --hint='hd0,msdos8' f8b70b14-23bf-4703-9cc8-ed593448ae61 else search --no-floppy --fs-uuid --set=root f8b70b14-23bf-4703-9cc8-ed593448ae61 fi echo '载入 Linux 3.4.47-2.38-desktop ...' linux /boot/vmlinuz-3.4.47-2.38-desktop root=UUID=f8b70b14-23bf-4703-9cc8-ed593448ae61 video=1366x768 resume=/dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-part6 splash=silent quiet showopts echo '载入初始化内存盘...' initrd /boot/initrd-3.4.47-2.38-desktop }
也就是把这行root=UUID=f8b70b14-23bf-4703-9cc8-ed593448ae61 video=1366x768 resume=/dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-part6 splash=silent quiet showopts简化为linux /boot/vmlinuz-3.4.47-2.38-desktop再修改一下/etc/fstab
/dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-part6 swap swap defaults 0 0 /dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-part8 / ext4 acl,user_xattr 1 1 proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0将part6和part 8改为
/dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-sda6 swap swap defaults 0 0 /dev/disk/by-id/ata-ST95005620AS_5YX1CJ2L-sda8 / ext4 acl,user_xattr 1 1 proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0
mount /dev/sda8 /mnt mount --bind /dev /mnt/dev mount --bind /proc /mnt/proc mount --bind /etc/resolv.conf /mnt/etc/resolv.conf chroot /mnt yast2