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

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux