分页: 1 / 1

光驱位硬盘

发表于 : 2016-05-03 22:51
冰谛-王者法则
笔记本的光驱换成了硬盘,在上面安装CentOS7,
sudo update-grup后重启进入CentOS7报错:
error:no such device:c7f6c751-5dde-4e6d-8eea-29ebc757895f.
error:hd1 cannot get C/H/S values.
error:you need to load the kernel first

我的笔记本BIOS启动选项只有hard device能从硬盘启动,
并不能选择哪一块硬盘启动

如果我选择hard device启动,再从ubuntu的grup进入CentOS7的话,是可以进入系统,
但很多内核模块没有加载,也不能手动加载(表现为不能挂载ubuntu的ext4文件系统,win的ntfs,无限网卡也识别不了)
之前硬盘用移动硬盘盒从ubuntu的grub进入CentOS7也是这样,但是选择usb启动从CentOS7的grub没问题

Re: 光驱位硬盘

发表于 : 2016-05-04 7:40
poloshiao
我的笔记本BIOS启动选项
是 UEFI 還是 Legacy Bios ?
如果不確定 查閱 你的筆電或主板使用說明書

Re: 光驱位硬盘

发表于 : 2016-05-04 8:40
冰谛-王者法则
poloshiao 写了:
我的笔记本BIOS启动选项
是 UEFI 還是 Legacy Bios ?
如果不確定 查閱 你的筆電或主板使用說明書
Legacy Bios

Re: 光驱位硬盘

发表于 : 2016-05-04 10:09
poloshiao
如果我选择hard device启动,再从ubuntu的grub
登入 Ubuntu 桌面
把下面指令 複製 貼進終端機 執行
1. sudo apt-get install pastebinit
2. sudo cat /boot/grub/grub.cfg | | pastebinit
會回應 http://paste.ubuntu.com/xxxxxxx # xxxxxxx 是一組數字
3. 把 http://paste.ubuntu.com/xxxxxxx 貼上來
4. 如果你能使用 瀏覽器如 firefox 把 http://paste.ubuntu.com/xxxxxxx 打開
看看 安裝 CentOS 的 menuentry 是哪一個 順便指名一下

Re: 光驱位硬盘

发表于 : 2016-05-04 10:29
冰谛-王者法则
poloshiao 写了:
如果我选择hard device启动,再从ubuntu的grub
登入 Ubuntu 桌面
把下面指令 複製 貼進終端機 執行
1. sudo apt-get install pastebinit
2. sudo cat /boot/grub/grub.cfg | | pastebinit
會回應 http://paste.ubuntu.com/xxxxxxx # xxxxxxx 是一組數字
3. 把 http://paste.ubuntu.com/xxxxxxx 貼上來
4. 如果你能使用 瀏覽器如 firefox 把 http://paste.ubuntu.com/xxxxxxx 打開
看看 安裝 CentOS 的 menuentry 是哪一個 順便指名一下
http://paste.ubuntu.com/16210522/

menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c60b74a5-bf21-41e6-83f7-d168b57b4526' {
insmod part_msdos
insmod xfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 c7f6c751-5dde-4e6d-8eea-29ebc757895f
else
search --no-floppy --fs-uuid --set=root c7f6c751-5dde-4e6d-8eea-29ebc757895f
fi
linux /vmlinuz-0-rescue-318f0b106b404dbca495500798e97ff4 root=/dev/dm-1
initrd /initramfs-0-rescue-318f0b106b404dbca495500798e97ff4.img
}

Re: 光驱位硬盘

发表于 : 2016-05-04 11:40
poloshiao
笔记本的光驱换成了硬盘,在上面安装CentOS7,
sudo update-grup后重启进入CentOS7报错:
error:no such device:c7f6c751-5dde-4e6d-8eea-29ebc757895f.
error:hd1 cannot get C/H/S values.
error:you need to load the kernel first
http://paste.ubuntu.com/16210522/
menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c60b74a5-bf21-41e6-83f7-d168b57b4526' {
insmod part_msdos
insmod xfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 c7f6c751-5dde-4e6d-8eea-29ebc757895f
else
search --no-floppy --fs-uuid --set=root c7f6c751-5dde-4e6d-8eea-29ebc757895f
fi
linux /vmlinuz-0-rescue-318f0b106b404dbca495500798e97ff4 root=/dev/dm-1
initrd /initramfs-0-rescue-318f0b106b404dbca495500798e97ff4.img
}
1. 表示 Ubuntu 的 grub 識別 c7f6c751-5dde-4e6d-8eea-29ebc757895f 沒問題

2. 登入 Ubuntu 桌面
把下面指令 複製 貼進終端機 執行
2-1. sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-2. sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-3. sudo cat /etc/fstab | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
把結果複製 貼上來

3. 登入 CentOS 桌面
把下面指令 複製 貼進終端機 執行
3-1. sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
3-2. sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
3-3. sudo cat /etc/fstab | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
把結果複製 貼上來

Re: 光驱位硬盘

发表于 : 2016-05-04 11:45
冰谛-王者法则
poloshiao 写了:
笔记本的光驱换成了硬盘,在上面安装CentOS7,
sudo update-grup后重启进入CentOS7报错:
error:no such device:c7f6c751-5dde-4e6d-8eea-29ebc757895f.
error:hd1 cannot get C/H/S values.
error:you need to load the kernel first
http://paste.ubuntu.com/16210522/
menuentry 'CentOS Linux release 7.2.1511 (Core) (on /dev/mapper/centos-root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c60b74a5-bf21-41e6-83f7-d168b57b4526' {
insmod part_msdos
insmod xfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 c7f6c751-5dde-4e6d-8eea-29ebc757895f
else
search --no-floppy --fs-uuid --set=root c7f6c751-5dde-4e6d-8eea-29ebc757895f
fi
linux /vmlinuz-0-rescue-318f0b106b404dbca495500798e97ff4 root=/dev/dm-1
initrd /initramfs-0-rescue-318f0b106b404dbca495500798e97ff4.img
}
1. 表示 Ubuntu 的 grub 識別 c7f6c751-5dde-4e6d-8eea-29ebc757895f 沒問題

2. 登入 Ubuntu 桌面
把下面指令 複製 貼進終端機 執行
2-1. sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-2. sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-3. sudo cat /etc/fstab | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
把結果複製 貼上來

3. 登入 CentOS 桌面
把下面指令 複製 貼進終端機 執行
3-1. sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
3-2. sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
3-3. sudo cat /etc/fstab | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
把結果複製 貼上來
c7f6c751-5dde-4e6d-8eea-29ebc757895f

/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"

Re: 光驱位硬盘

发表于 : 2016-05-04 11:55
poloshiao

代码: 全选

c7f6c751-5dde-4e6d-8eea-29ebc757895f
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"
請同時註明指令
請補齊其它指令及回應

Re: 光驱位硬盘

发表于 : 2016-05-04 17:57
冰谛-王者法则
poloshiao 写了:

代码: 全选

c7f6c751-5dde-4e6d-8eea-29ebc757895f
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"
請同時註明指令
請補齊其它指令及回應
sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
lrwxrwxrwx 1 root root 10 5月 4 08:38 c7f6c751-5dde-4e6d-8eea-29ebc757895f -> ../../sdb1

sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"

sudo cat /etc/fstab | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
UUID=c7f6c751-5dde-4e6d-8eea-29ebc757895f /boot xfs defaults 0 0
(CentOS硬盘下的,ubuntu下为空)

Re: 光驱位硬盘

发表于 : 2016-05-04 18:03
qy117121
centos 7 用的是gub 还是grub2 ?
如果用的是grub的话,你可以用grub4dos 来引导启动centos 7

Re: 光驱位硬盘

发表于 : 2016-05-04 18:29
poloshiao
UUID=c7f6c751-5dde-4e6d-8eea-29ebc757895f /boot xfs defaults 0 0
CentOS硬盘下的
1. Grub 2 支援 XFS
http://mcs.une.edu.au/doc/grub2-tools/g ... l#Features
Support multiple filesystem types
Support multiple filesystem types transparently, plus a useful explicit blocklist notation. The currently supported filesystem types are Amiga Fast FileSystem (AFFS), AtheOS fs, BeFS, BtrFS (including raid0, raid1, raid10, gzip and lzo), cpio (little- and big-endian bin, odc and newc variants), Linux ext2/ext3/ext4, DOS FAT12/FAT16/FAT32, exFAT, HFS, HFS+, ISO9660 (including Joliet, Rock-ridge and multi-chunk files), JFS, Minix fs (versions 1, 2 and 3), nilfs2, NTFS (including compression), ReiserFS, ROMFS, Amiga Smart FileSystem (SFS), Squash4, tar, UDF, BSD UFS/UFS2, XFS, and ZFS (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM). See Filesystem, for more information.

2. 把下面指令 複製 貼進終端機 執行
2-1. sudo cat /boot/grub2/grub.cfg | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-2. sudo cat /boot/grub2/grub.cfg | grep "insmod xfs"
把結果直接 選取/複製 貼上來
sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
lrwxrwxrwx 1 root root 10 5月 4 08:38 c7f6c751-5dde-4e6d-8eea-29ebc757895f -> ../../sdb1

sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"
3. 這是 CentOS 下 執行的結果 ?
3-1. 如果是
表示識別 uuid c7f6c751-5dde-4e6d-8eea-29ebc757895f 沒問題

Re: 光驱位硬盘

发表于 : 2016-05-04 21:41
冰谛-王者法则
poloshiao 写了:
UUID=c7f6c751-5dde-4e6d-8eea-29ebc757895f /boot xfs defaults 0 0
CentOS硬盘下的
1. Grub 2 支援 XFS
http://mcs.une.edu.au/doc/grub2-tools/g ... l#Features
Support multiple filesystem types
Support multiple filesystem types transparently, plus a useful explicit blocklist notation. The currently supported filesystem types are Amiga Fast FileSystem (AFFS), AtheOS fs, BeFS, BtrFS (including raid0, raid1, raid10, gzip and lzo), cpio (little- and big-endian bin, odc and newc variants), Linux ext2/ext3/ext4, DOS FAT12/FAT16/FAT32, exFAT, HFS, HFS+, ISO9660 (including Joliet, Rock-ridge and multi-chunk files), JFS, Minix fs (versions 1, 2 and 3), nilfs2, NTFS (including compression), ReiserFS, ROMFS, Amiga Smart FileSystem (SFS), Squash4, tar, UDF, BSD UFS/UFS2, XFS, and ZFS (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM). See Filesystem, for more information.

2. 把下面指令 複製 貼進終端機 執行
2-1. sudo cat /boot/grub2/grub.cfg | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f
2-2. sudo cat /boot/grub2/grub.cfg | grep "insmod xfs"
把結果直接 選取/複製 貼上來
sudo ls -al /dev/disk/by-uuid/* | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
lrwxrwxrwx 1 root root 10 5月 4 08:38 c7f6c751-5dde-4e6d-8eea-29ebc757895f -> ../../sdb1

sudo blkid | grep c7f6c751-5dde-4e6d-8eea-29ebc757895f:
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"
3. 這是 CentOS 下 執行的結果 ?
3-1. 如果是
表示識別 uuid c7f6c751-5dde-4e6d-8eea-29ebc757895f 沒問題
是在ubuntu下