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: Andrey Borzenkov
Subject: Re: grub2-mkconfig with root on rootfs
Date: Sat, 12 Oct 2013 08:58:23 +0400

В Thu, 10 Oct 2013 00:27:45 +0400
Peter Volkov <address@hidden> пишет:

> > > > 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'.
> 

OK, I see. Well, may be grub-mkconfig should support --boot-directory
option as well. I suggest you post it to grub-devel, where someone may
pick it up. If you could send patch, this would be even better :)

As for you case - why do not you simply mount /dev/sda1 on /boot? It
*is* your /boot after all, is not it?

> 32 1 8:1 / /mnt/root rw,noatime - ext4 /dev/sda1 rw,data=ordered
> 



reply via email to

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