[CentOS] Manually mounting partitions in "linux rescue" mode

Tue Aug 3 18:27:45 UTC 2010
James Hogarth <james.hogarth at gmail.com>

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


On 3 Aug 2010 18:21, <m.roth at 5-cent.us> 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 at centos.org
> http://lists.centos.org/mailman/listinfo/centos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20100803/d5f6c68b/attachment-0005.html>