help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub2-mkconfig with root on rootfs


From: Peter Volkov
Subject: Re: grub2-mkconfig with root on rootfs
Date: Thu, 10 Oct 2013 00:27:45 +0400

Hi, Andrey, sorry for delay.

В Ср, 02/10/2013 в 06:38 +0400, Andrey Borzenkov пишет:
> В Wed, 02 Oct 2013 00:13:29 +0400
> Peter Volkov <address@hidden> пишет:
> > В Вт, 01/10/2013 в 17:18 +0400, Andrey Borzenkov пишет:
> > > On Tue, Oct 1, 2013 at 3:41 PM, Peter Volkov <address@hidden> wrote:
> > > > В Вт, 01/10/2013 в 10:59 +0400, Andrey Borzenkov пишет:
> > > >> On Tue, Oct 1, 2013 at 1:51 AM, Peter Volkov <address@hidden> wrote:
> > > >> > We are using may be strange but rather convenient scheme of booting
> > > >> > linux where real system root is all inside initramfs (/init is 
> > > >> > symlink
> > > >> > to /sbin/init). Everything works fine but grub2-mkconfig that ends 
> > > >> > out
> > > >> > the error:
> > > >> >
> > > >> > /usr/sbin/grub2-probe: error: failed to get canonical path of 
> > > >> > `rootfs'.
> > > >> >
> > > >> > Sure with root on rootfs this grub2-probe is not supposed to work.
> > > >> >
> > > >> > # mount | grep ' / '
> > > >> > rootfs on / type rootfs (rw)
> > > >>
> > > >> Could you show full /proc/mounts (or even better, 
> > > >> /proc/self/mountinfo)?
> > > >
> > > > Yup, here is /proc/self/mountinfo:
> > > > 1 1 0:1 / / rw - rootfs rootfs rw
> > > 
> > > OK so do I understand it correctly - you are running purely from
> > > initramfs and do not have any additional filesystems?
> > 
> > yup.
> > 
> > > On which device do you install grub? Where is your /boot/grub located?
> > > 
> > > Please show full command line and its output used to install grub.
> > 
> > I have single hard drive /dev/sdc with two partitions. First partition
> > is formatted with ext4 (second partition is unformatted yet). To install
> > grub I mount it to /mnt/root/ directory
> 
> This was not present in mntinfo output. How should others guess it?

Well, I thought that grub2-mkconfig should work even without "/boot" 
(in my case /mnt/root) mounted. So full output is at the end of this mail.


> >                                         and then I run:
> > 
> > grub2-install /dev/sdc --boot-directory=/mnt/root/
> > 
> > Then my "/boot/grub" is located at (hd0, msdos1)/grub.
> > 
> 
> You did not show any output from this command, so I assume this command
> completes without error?

Yes, without any errors.

# grub2-install /dev/sdc --boot-directory /mnt/root/
Installation finished. No error reported.

And even more, grub2 works correctly if I put grub.cfg into /mnt/root/grub/ and 
reboot.
The problem is that grub2-mkconfig fails at grub2-probe:

# /usr/sbin/grub2-probe --target=device /
/usr/sbin/grub2-probe: error: failed to get canonical path of `rootfs'.

And here is /proc/self/mountinfo with /mnt/root mounted.

1 1 0:1 / / rw - rootfs rootfs rw
14 1 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
15 1 0:13 / /run rw,nosuid,nodev,relatime - tmpfs tmpfs rw,mode=755
16 1 0:5 / /dev rw,nosuid,relatime - devtmpfs udev 
rw,size=10240k,nr_inodes=4081011,mode=755
17 16 0:10 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts 
rw,gid=5,mode=620,ptmxmode=000
18 16 0:14 / /dev/shm rw,nosuid,nodev,noexec,relatime - tmpfs shm rw
19 1 0:15 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
20 19 0:12 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime - securityfs 
securityfs rw
21 19 0:7 / /sys/kernel/debug rw,nosuid,nodev,noexec,relatime - debugfs debugfs 
rw
22 19 0:16 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - tmpfs cgroup_root 
rw,size=10240k,mode=755
23 22 0:17 / /sys/fs/cgroup/openrc rw,nosuid,nodev,noexec,relatime - cgroup 
openrc rw,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc
24 22 0:18 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime - cgroup 
cpuset rw,cpuset,clone_children
25 22 0:19 / /sys/fs/cgroup/cpu rw,nosuid,nodev,noexec,relatime - cgroup cpu 
rw,cpu
26 22 0:20 / /sys/fs/cgroup/cpuacct rw,nosuid,nodev,noexec,relatime - cgroup 
cpuacct rw,cpuacct
27 22 0:21 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime - cgroup 
memory rw,memory
28 22 0:22 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime - cgroup 
devices rw,devices
29 22 0:23 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime - cgroup 
freezer rw,freezer
30 22 0:24 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime - cgroup 
blkio rw,blkio
31 22 0:25 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime - cgroup 
perf_event rw,perf_event
32 1 8:1 / /mnt/root rw,noatime - ext4 /dev/sda1 rw,data=ordered

Thanks for you help anyway,
--
Peter.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]