Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
beren12 opened this issue Mar 20, 2015 · 6 comments
Open

Comments

@beren12
Copy link

beren12 commented Mar 20, 2015

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

@beren12
Copy link
Author

beren12 commented Mar 20, 2015

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

@beren12
Copy link
Author

beren12 commented Mar 21, 2015

this is cirdan on irc, btw 👍

@FransUrbo
Copy link
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

@beren12
Copy link
Author

beren12 commented Mar 21, 2015

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

@FransUrbo
Copy link
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.

@beren12
Copy link
Author

beren12 commented Mar 21, 2015

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants