Skip to content

update-grub gets confused when other pools are created before rpool #20

Open

Description

@beren12

debian 7.8 stable
zfs & tools from debian repo

grub 2.01-22debian1+zfs3-0.6.3-2wheezy
zfs 0.6.3-1
wheezy

I created a zfs mirror pool, mounted on /home
I then partitioned a drive with 6gb swap and remaining space as zfs root pool, with a mount point at /
temp mounted under /mnt
copied root partition to zfs root, chrooted into it, and ran grub install & update-grub
update-grub ran but only found linux images on the /home zpool and current boot drive

exported both pools, then imported rpool, then home pool.
chroot into rpool and update-grub found the correct images.
lz4 was enabled at pool creation, grub booted into it without issue
bios mode used, not EFI

Activity

  1. beren12 commented on Mar 20, 2015

    @beren12
    Author

    The first time I did not enable the boot bit on /dev/sdc2 (the rpool) but enabled it the 2nd try.

  2. beren12 commented on Mar 21, 2015

    @beren12
    Author

    this is cirdan on irc, btw 👍

  3. FransUrbo commented on Mar 21, 2015

    @FransUrbo
    Contributor

    From earlier conversation on IRC:

    /dev/mapper/lothlorien-root on / type xfs (rw,relatime,attr2,delaylog,noquota)
    /dev/sdb1 on /boot type ext2 (rw,relatime,errors=continue)
    
    mir-300gb/ROOT/home-1 on /home type zfs (rw,relatime,xattr,noacl)
    mir-300gb on /mnt/mir-300gb type zfs (rw,relatime,xattr,noacl)
    mir-300gb/ROOT on /mnt/mir-300gb/ROOT type zfs (rw,relatime,xattr,noacl)
    
    lothlorien/ROOT/debian-1 on /mnt/lorien type zfs (rw,relatime,xattr,noacl)
    lothlorien on /mnt/lorien/lothlorien type zfs (rw,relatime,xattr,noacl)
    lothlorien/ROOT on /mnt/lorien/lothlorien/ROOT type zfs (rw,relatime,xattr,noacl)
    
    sudo zpool status
      pool: lothlorien
     state: ONLINE
      scan: none requested
    config:
    
            NAME                                    STATE     READ WRITE CKSUM
            lothlorien                              ONLINE       0     0     0
              scsi-SATA_ST3200827AS_5ND5LK04-part2  ONLINE       0     0     0
    
    errors: No known data errors
    
      pool: mir-300gb
     state: ONLINE
      scan: resilvered 160G in 0h54m with 0 errors on Wed Mar 18 22:13:54 2015
    config:
    
            NAME                                   STATE     READ WRITE CKSUM
            mir-300gb                              ONLINE       0     0     0
              mirror-0                             ONLINE       0     0     0
                scsi-SATA_Maxtor_7L300S0_L60BSESG  ONLINE       0     0     0
                scsi-SATA_Maxtor_7L300S0_L604H9XG  ONLINE       0     0     0
    
    errors: No known data errors
    
    linux   /ROOT/home-1@/boot/vmlinuz-3.2.0-4-amd64 root=ZFS=mir-300gb/ROOT/home-1 ro boot=zfs $bootfs   quiet
    
  4. beren12 commented on Mar 21, 2015

    @beren12
    Author

    Oh, it was recommended to rename mir-300gb/ROOT/home-1 to mir-300gb/home, so that was done just before the export

  5. FransUrbo commented on Mar 21, 2015

    @FransUrbo
    Contributor

    Note to self: The issue is most likely with the fact that the root pool needs to be first for grub-mkconfig to work correctly.

  6. beren12 commented on Mar 21, 2015

    @beren12
    Author

    this was the output of the first update-grub, when it was not finding the rpool. /home/rootfs had a backup of the boot drive and that was getting discovered:

    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-4-amd64
    Found initrd image: /boot/initrd.img-3.2.0-4-amd64
    Found memtest86 image: /ROOT/home-1@/boot/memtest86.bin
    Found memtest86+ image: /ROOT/home-1@/boot/memtest86+.bin
    Found memtest86+ multiboot image: /ROOT/home-1@/boot/memtest86+_multiboot.bin
    done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions