deepin的grub2怎么引导另一块硬盘的openSUSE
Tofloor
poster avatar
sysop
deepin
2016-05-05 23:36
Author
或者能不能用deepin的grub2引导另一块硬盘上的grub2菜单
我试了下别的linux都能引导
唯独openSUSE启动不了
sudo update-grub不自动添加openSUSE启动项
手动添加
载入mlinuz-4.1.12-1-default、initrd-4.1.12-1-default失败
menuentry 'openSUSE Leap 42.1'  --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-****' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod btrfs
        set root='hd0,msdos8'
        if [ x$feature_platform_search_hint = xy ]; then           search --no-floppy --fs-uuid --set=root ****'
        fi
        echo        '载入 Linux 4.1.12-1-default ...'
        linux        /boot/vmlinuz-4.1.12-1-default root=UUID=****'  ${extra_cmdline} resume=/dev/sda7 splash=silent quiet showopts
        echo        '载入初始化内存盘...'
        initrd        /boot/initrd-4.1.12-1-default
}

启动硬盘为sdb
deepin在sdb1

openSUSE在sda8

Reply Favorite View the author
All Replies
avatar
MattD
deepin
2016-05-05 23:51
#1
不能引导的报错信息是什么?另外,不建议把/boot也放在btrfs上,btrfs的文件系统模块比较大,有时候无法嵌入保留扇区。
我个人的做法是/boot单独分区,多个Linux可以共用/boot,同时把btrfs作为rootfs,在上面建立subvol,每个发行版安装于独立的subvol里面。既可以避免乱七八糟的一大堆分区,又可以相互隔离。
Reply View the author
avatar
sysop
deepin
2016-05-06 00:50
#2
https://bbs.deepin.org/post/39265
不能引导的报错信息是什么?另外,不建议把/boot也放在btrfs上,btrfs的文件系统模块比较大,有时候无法嵌 ...

错误:file ‘/boot/vmlinuz-4.1.12-1-default’ not found
错误:you need to load the kernel firs
t


Reply View the author
avatar
MattD
deepin
2016-05-06 01:07
#3
https://bbs.deepin.org/post/39265
错误:file ‘/boot/vmlinuz-4.1.12-1-default’ not found
错误:you need to load the kernel firs
t

大致明白了。
你先把这个分区挂载到其他Linux下,如挂载到/mnt,然后用
  1. # btrfs subvol list /mnt
Copy the Code

查看下OpenSuSE默认分了几个subvolume。没记错的话,和Ubuntu一样,默认分为@和@home两个。假设就是这两个,那么你grub配置的内核和initrd那两行需要改为这样:
  1.     linux        /@/boot/vmlinuz-4.1.12-1-default root=UUID=****'  rootflags=subvol=@ ${extra_cmdline} resume=/dev/sda7 splash=silent quiet showopts
  2.     initrd        /@/boot/initrd-4.1.12-1-default
Copy the Code

Reply View the author
avatar
sysop
deepin
2016-05-06 01:54
#4
https://bbs.deepin.org/post/39265
大致明白了。
你先把这个分区挂载到其他Linux下,如挂载到/mnt,然后用

是好多个
不过加上@还是提示文件未找到





Reply View the author
avatar
MattD
deepin
2016-05-06 02:18
#5
https://bbs.deepin.org/post/39265
是好多个
不过加上@还是提示文件未找到

路径都和我给的一样改了?
这样还提示not found的话,我只能怀疑你指定的root不正确了。
或者你可以看看sda8下面的grub配置是怎么写的,照着改。
Reply View the author
avatar
sysop
deepin
2016-05-06 02:36
#6
https://bbs.deepin.org/post/39265
路径都和我给的一样改了?
这样还提示not found的话,我只能怀疑你指定的root不正确了。
或者你可以看看s ...

root没有问题
我就是复制的sda8的grub.cfg
里面没有@
而且启动的时F12选择sda8的grub.cfg启动可以正常引导
我deepin里btrfs 命令用不了 需要装包
莫非是deepin的grub2不支持subvol的缘故







    神奇的小尾巴:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36  (zh-CN)
    ——2016/5/5 下午6:36:12
             
    Reply View the author
    avatar
    MattD
    deepin
    2016-05-06 02:58
    #7
    https://bbs.deepin.org/post/39265
    root没有问题
    我就是复制的sda8的grub.cfg
    里面没有@

    我突然想到个可能性,你试试把下面这段的hd0改为hd1:
    1. --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8
    Copy the Code

    或者手动进入grub shell,按顺序执行几条几条命令:
    1. indmod part_msdos
    2. insmod btrfs
    3. insmod gzip
    4. set root=(hd1,msdos8)
    5. linux /@/boot/vmlinuz-4.1.12-1-default root=UUID=****'  rootflags=subvol=@
    6. initrd /@/boot/initrd-4.1.12-1-default
    Copy the Code

    多余的内核参数都不要,只留这几个应该足够。
    因为我印象里面,跨硬盘做引导时,grub2始终会把它自身启动的那个硬盘识别为hd0,另一个识别为hd1,而无视物理接口顺序。
    Reply View the author
    avatar
    sysop
    deepin
    2016-05-06 03:41
    #8
    https://bbs.deepin.org/post/39265
    我突然想到个可能性,你试试把下面这段的hd0改为hd1:

    或者手动进入grub shell,按顺序执行几条几条命令 ...

    还是不行的O(∩_∩)O~
    我感觉问题还是在多subvolume
    hd1 hd0我都试过了
    我在deepin执行sudo update-grub之前 sdb的root都是hd0 但是能启动
    执行sudo update-grub后变成hd1了 也能启动 ⊙﹏⊙b汗
    可能跟grub.cfg前面的配置有关







      神奇的小尾巴:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36  (zh-CN)
      ——2016/5/5 下午7:41:34
               
      Reply View the author
      avatar
      sysop
      deepin
      2016-05-13 18:00
      #9
      试过几个linux只有ubuntu能识别openSUSE并添加启动项 但是也不能启动 其余根本不能添加启动项
      看来还是openSUSE自己的问题  Leap 42 呀
      错误:file ‘/boot/vmlinuz-4.1.12-1-default’ not found
      错误:you need to load the kernel firs






      神奇的小尾巴:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36  (zh-CN)
      ——2016/5/13 上午10:00:56
               
      Reply View the author
      avatar
      152******25
      deepin
      2016-05-14 00:10
      #10
      我是用opensuse(本来是clover引导,后来也不怎么用hackintosh就换回来了)引导deepin和win10,deepin自从上次升级后引导就坏掉了,opensuse的引导还好好的,我也懒去弄了
      Reply View the author
      avatar
      王国和圣殿
      deepin
      2023-11-21 11:32
      #11
      MattD:
      不能引导的报错信息是什么?另外,不建议把/boot也放在btrfs上,btrfs的文件系统模块比较大,有时候无法嵌入保留扇区。
      我个人的做法是/boot单独分区,多个Linux可以共用/boot,同时把btrfs作为rootfs,在上面建立subvol,每个发行版安装于独立的subvol里面。既可以避免乱七八糟的一大堆分区,又可以相互隔离。

      大神,我有个问题。这样做的话,是不是只能手动添加grub?我现在就在烦恼:用btrfs安装了两个系统,但是os-prober扫描不了另一个系统。每次更新内核后都要手动添加grub

      Reply View the author