[CentOS] Manually mounting partitions in "linux rescue" mode
Edward Diener
eldiener at tropicsoft.com
Tue Aug 3 16:47:20 UTC 2010
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.
From what you say above I did not even have to mount my system off of
/mnt/sysimage and changed my root there, but just could have executed
'grub' from the command prompt and re-initialized my boot partition.
More information about the CentOS
mailing list