Re: Manually mounting partitions in "linux rescue" mode

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



On 8/3/2010 2:27 PM, James Hogarth wrote:
> I normally use a live CD for this sort of thing... in that case you
> don't need to cheroot at all. Just make sure your
> <rootmountpoint>/boot/grub/device.map is correct and do grub-install
> --root-directory=<rootmountpoint> /dev/sda (assuming you want the mbr on
> sda)

I am booting from the installation DVD. Is that what you mean by a live 
CD ? When I boot from that, will it necessarily have a correct 
/boot/grub/device.map ?

If not, then mounting my boot and root partitions and doing a chroot was 
needed. If so, then I did too much work.

>
> James
>
> On 3 Aug 2010 18:21, <m.roth@xxxxxxxxx
> <mailto:m.roth@xxxxxxxxx>> wrote:
>  > Edward Diener wrote:
>  >> On 8/3/2010 11:13 AM, Les Mikesell wrote:
>  >>> On 8/3/2010 9:56 AM, Edward Diener wrote:
>  >>>>
>  >>>> I am at the shell prompt but in order to get grub to work, don't I
> need
>  >>>> to mount my actual boot and root partitions for grub to know that
>  >>>> (hd0,9) refers a valid boot partition when I tell grub:
>  >>>>
>  >>>> root (hd0,9)
>  >>>> setup (hd0,9)
>  >>>
>  >>> No, grub doesn't need to have anything mounted.
>  >>
>  >> OK, thanks for the info.
>  >>
>  >>> The sysimage mount and
>  >>> chroot is most useful to get access to your usual tools in their usual
>  >>> paths and to be able to edit the grub.conf file. I've never tried to
>  >>> boot from a partition that far into the disk, though. I had enough
>  >>> trouble back in the days when bios only knew 1024 cylinders that I've
>  >>> always put a small /boot partition as the first thing on the disk even
>  >>> though you shouldn't have to now.
>  >>
>  >> My problem was that once I did a chroot I did not have any /dev devices.
>  >> Evidently grub does use this. Once I did:
>  >>
>  >> mount --bind /dev /mnt/sysimage/dev
>  >>
>  >> before doing:
>  >>
>  >> chroot /mnt/sysimage
>  >>
>  >> when I executed 'grub' it found the (hd0,9) partition.
>  >
>  > "Executed grub"? Not chroot, then grub-install /dev/sda?
>  > <snip>
>  > mark
>  >
>  >
>  > _______________________________________________
>  > CentOS mailing list
>  > CentOS@xxxxxxxxxx
> <mailto:CentOS@xxxxxxxxxx>
>  > http://lists.centos.org/mailman/listinfo/centos
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux