<div dir="ltr"><div class="gmail_extra"><div class="gmail_extra">On Mon, Aug 11, 2014 at 3:10 PM, Kevin O'Gorman <<a href="mailto:kogorman@gmail.com">kogorman@gmail.com</a>> wrote:</div><div class="gmail_extra"><br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">> 1, Boot a live Linux disk. The desktop install from any recent *Ubuntu should do nicely.</div><div class="gmail_extra">> 2. Open a terminal. The rest is all shell commands.</div>
<div class="gmail_extra">> 2. sudo -i # All the rest needs to be root, and this saves some typing</div><div class="gmail_extra">> 3. mount /dev/sd?? /mnt # where the ?? stands for the partition you want to boot to by default.</div>
<div class="gmail_extra">> 4. mount --bind /dev /mnt/dev</div><div class="gmail_extra"><br></div><div class="gmail_extra">"mount --rbind ..." is better in order to have "/dev/pts" in the chroot. I don't know whether it still matters, but in the past you'd have errors without it.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">> 5. mount --bind /proc /mnt/proc</div><div class="gmail_extra">> 6. mount --bind /sys /mnt/sys</div><div class="gmail_extra">
<br></div><div class="gmail_extra">It's probably better to us "mount --rbind ..." because there are now many subdirectories of "/sys" that are special mounts. I don't know whether they're needed in a chroot but this is what Gentoo advises for its chroots.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">> 7. mount --bind /srv /mnt/srv # You're now ready to chroot</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Why "/srv"? You might or might not need it on your system but it's definitely not needed on a default install.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">
> 8. chroot /mnt /bin/bash - # or accept the default shell</div><div class="gmail_extra"><br></div><div class="gmail_extra">root's default shell.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br>
</div><div class="gmail_extra">> 9. update-grub # verify that it finds the stuff you want to boot</div><div class="gmail_extra">> 10. grub-install /dev/sd? # where the ? names the disk your system boots from. May not be sda, depending. For me it was /dev/sdb</div>
<div class="gmail_extra">> 11. /sbin/shutdown -r now</div><div><br></div></div></div>