光驱位硬盘

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

光驱位硬盘

#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没问题
凡事都要认真对待,绝对不容许落败 !
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 光驱位硬盘

#2

帖子 poloshiao » 2016-05-04 7:40

我的笔记本BIOS启动选项
是 UEFI 還是 Legacy Bios ?
如果不確定 查閱 你的筆電或主板使用說明書
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

Re: 光驱位硬盘

#3

帖子 冰谛-王者法则 » 2016-05-04 8:40

poloshiao 写了:
我的笔记本BIOS启动选项
是 UEFI 還是 Legacy Bios ?
如果不確定 查閱 你的筆電或主板使用說明書
Legacy Bios
凡事都要认真对待,绝对不容许落败 !
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 光驱位硬盘

#4

帖子 poloshiao » 2016-05-04 10:09

如果我选择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 是哪一個 順便指名一下
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

Re: 光驱位硬盘

#5

帖子 冰谛-王者法则 » 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
}
凡事都要认真对待,绝对不容许落败 !
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 光驱位硬盘

#6

帖子 poloshiao » 2016-05-04 11:40

笔记本的光驱换成了硬盘,在上面安装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
把結果複製 貼上來
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

Re: 光驱位硬盘

#7

帖子 冰谛-王者法则 » 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"
凡事都要认真对待,绝对不容许落败 !
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 光驱位硬盘

#8

帖子 poloshiao » 2016-05-04 11:55

代码: 全选

c7f6c751-5dde-4e6d-8eea-29ebc757895f
/dev/sdb1: UUID="c7f6c751-5dde-4e6d-8eea-29ebc757895f" TYPE="xfs" PARTUUID="000a85bf-01"
請同時註明指令
請補齊其它指令及回應
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

Re: 光驱位硬盘

#9

帖子 冰谛-王者法则 » 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下为空)
凡事都要认真对待,绝对不容许落败 !
头像
qy117121
论坛版主
帖子: 50587
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

Re: 光驱位硬盘

#10

帖子 qy117121 » 2016-05-04 18:03

centos 7 用的是gub 还是grub2 ?
如果用的是grub的话,你可以用grub4dos 来引导启动centos 7
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

邮箱 chuan@ubuntu.org.cn
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 光驱位硬盘

#11

帖子 poloshiao » 2016-05-04 18:29

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 沒問題
冰谛-王者法则
帖子: 67
注册时间: 2014-10-19 10:52
系统: ubuntu 16.04

Re: 光驱位硬盘

#12

帖子 冰谛-王者法则 » 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下
凡事都要认真对待,绝对不容许落败 !
回复