Re: Mystery of chroot

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

 



Timothy Murphy wrote:
> This is a purely theoretical question.
> 
> Yesterday I re-installed Windows XP on /dev/sda1 on my laptop
> (I'd used dd to try to copy Windows from a smaller partition,
> and while this booted it had a number of bizarre error).
> 
> Anyway, this removed grub from the MBR,
If it replaced grub, then you probably also replaced the partition
table on the drive. Depending on the sizes of the drives involved,
the drive may also be reporting a different geometry then it should.
I don't remember if XP puts the file system size information at the
start of the partition, but at least some versions of Windows did,
requiring you to zero out the first sector of the partition, or
something like that. You are better off using something like parted
to copy a partition.

> so I used Knoppix to re-install grub,
> which I did without problem by running
>         grub-install --root-directory=/mnt/sda5 /dev/sda
> 
> I was surprised how long this took - over 10 minutes
> on a ThinkPad T43 (800MHz with 512MB RAM).
> Admittedly the new disk is quite large, 120GB,
> but what exactly is grub-install doing?
> 
It should not take this long - I think you had other problems -
possible because of the way you copied Widows to the drive.

> But that isn't my question.
> 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.


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.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux