Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 and LUKS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
stunirvana21
n00b
n00b


Joined: 24 May 2011
Posts: 41

PostPosted: Sat Aug 02, 2014 1:44 pm    Post subject: Grub2 and LUKS? Reply with quote

Hello,

I'm trying to install grub2 on a new install which uses luks to encrypt the root filesystem. However I am hitting a snag:

Code:

livecd ~ # grub2-install /dev/sda
Installation finished. No error reported.
livecd ~ # grub2-mkconfig -o /boot/grub/grub.cfg
/usr/sbin/grub2-probe: error: failed to get canonical path of `/dev/mapper/root'.
livecd ~ #

Where /dev/mapper/root is decrypted /dev/sda4

The problem basically boils down to:
Code:

livecd / # grub2-probe --target=fs /
grub2-probe: error: failed to get canonical path of `/dev/mapper/root'.


Environment outside of chroot:
Code:

livecd gentoo # mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=1008470,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmpfs (rw,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime)
/dev/loop0 on /mnt/livecd type squashfs (ro,relatime)
/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,size=807488k,mode=755)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /mnt/livecd/usr/portage type tmpfs (rw)
/dev/mapper/root on /mnt/gentoo type ext4 (rw)
/dev/sda2 on /mnt/gentoo/boot type ext2 (rw)
proc on /mnt/gentoo/proc type proc (rw)
/sys on /mnt/gentoo/sys type none (rw,bind,rbind)
/mnt/gentoo/dev on /mnt/gentoo/dev type none (rw,bind,rbind)
livecd gentoo #


View from inside the chroot:
Code:

livecd / # mount
/dev/mapper/root on / type ext4 (rw,relatime,data=ordered)
/dev/sda2 on /boot type ext2 (rw,relatime,errors=continue,user_xattr,acl)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/root on /dev type ext4 (rw,relatime,data=ordered)
livecd / #


Output of parted
Code:

livecd / # parted /dev/sda print
Model: ATA TOSHIBA MK7575GS (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  3146kB  2097kB                  grub    bios_grub
 2      3146kB  137MB   134MB   ext2            boot
 3      137MB   4432MB  4295MB  linux-swap(v1)  swap
 4      4432MB  750GB   746GB                   rootfs

livecd / #


Does this mean I have to edit /etc/default/grub in some way in order to make grub2 understand what is going on? Thanks in advance.
Back to top
View user's profile Send private message
wraeth
Developer
Developer


Joined: 08 May 2007
Posts: 71
Location: Australia

PostPosted: Tue Aug 05, 2014 6:28 am    Post subject: Reply with quote

Just to clarify, were you running grub2-install and grub2-mkconfig from within the chroot? Your prompt doesn't have the normal "(chroot)" we normally like to remind us where we are...

Can you also paste the contents of your /etc/fstab (the one on your install root, not the livecd environment) and the output from just `grub2-mkconfig` (without the '-o' option)?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum