Mystery of chroot

Timothy Murphy tim at birdsnest.maths.tcd.ie
Sun Jul 22 20:38:28 UTC 2007


Mikkel L. Ellertson wrote:

>> My first attempt to re-install grub
>> was to mount /dev/sda5 as /mnt/sda5
>> and then run "chroot /mnt/sda5".
>> What puzzled me is that after this /dev/sda was not found.
>> Why is this?
>> Does one have to run something like udevd after chroot now?
>> 
> What does your partition table look like? Is sda5 your root
> partition, or your boot partition? If it is your root partition, it
> would be interesting to see what is in the /dev directory after you
> run chroot.

/dev/sda5 is my root partition;
/dev/sda2 is my boot partition,
but I had mounted this as /mnt/sda5/boot .

The /dev directory was empty, IIRC .
I'm sure I should have carried out something like the
        mount --bind /dev /tmp/local/dev
before running chroot, as suggested.
        
> One other thing to keep in mind is that it is better to create the
> first partition using Windows. Windows and Linux do not always agree
> on the geometry of the drive. If you create a partition using
> Windows, then Linux fdisk will see the geometry that Windows is
> using and use it.

I've always found it difficult to tell Windows what size partition
I want to give it.
It seems to want to decide for itself.
[I hasten to add that I am not a Windows expert;
I never (or very rarely) use it,
but my grand-daughter uses Windows to play Sims-2.]

In this case, Windows seemed perfectly happy
with the 40GB NTFS partition created by Linux fdisk.


-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland




More information about the fedora-list mailing list