WTH ... at the risk--again--of acting stupid, I just have to ask. About chroot. Yeah, I've googled and read, in jail, outa jail, many times through the years. But I'm not expert enough to really get this.
Yet, I find it useful And I've used it by monkey-see-&-monkey-do. For example, re-installing GRUB to your root Kubuntu partition when the booting breaks. You can do this without chrooting, by simply mounting the root partition from a live CD. But you can not then also generate a new GRUB configuration boot file. You must exit your chroot, exit the live CD, re-boot into your OS, and fix the configuration file from within the OS.
For re-installing GRUB from a Live Kubuntu DVD ... This is the part I'm asking about, typically worded:
Mount the critical virtual filesystems:
/dev
/dev/pts
/proc
/sys
/run
... and to mount them using the bind option -B.
Now--thinking at the not-too-deep level of a Kubuntu how-to--for the purpose of using your Live Kubuntu DVD to do repairs (like re-install GRUB to your Kubuntu root filesystem),
(1) are those five "virtual" filesystems the filesystems and the only filesystems you should mount before chrooting? -- including newer systemd systems?; must you mount them all?
and
(2) the bind option -B: man mount says " ... the same contents is accessible in two places..."
What exactly does this mean in the present context?
and, finally,
(3) to exit the chroot, type exit, correct? What about ctrl-D, same thing? so first exit the chroot and then do the unmounting of all mounted filesystems: the Kubuntu root partition and those 5 virtual filesystems?
Yet, I find it useful And I've used it by monkey-see-&-monkey-do. For example, re-installing GRUB to your root Kubuntu partition when the booting breaks. You can do this without chrooting, by simply mounting the root partition from a live CD. But you can not then also generate a new GRUB configuration boot file. You must exit your chroot, exit the live CD, re-boot into your OS, and fix the configuration file from within the OS.
For re-installing GRUB from a Live Kubuntu DVD ... This is the part I'm asking about, typically worded:
Mount the critical virtual filesystems:
/dev
/dev/pts
/proc
/sys
/run
... and to mount them using the bind option -B.
Now--thinking at the not-too-deep level of a Kubuntu how-to--for the purpose of using your Live Kubuntu DVD to do repairs (like re-install GRUB to your Kubuntu root filesystem),
(1) are those five "virtual" filesystems the filesystems and the only filesystems you should mount before chrooting? -- including newer systemd systems?; must you mount them all?
and
(2) the bind option -B: man mount says " ... the same contents is accessible in two places..."
What exactly does this mean in the present context?
and, finally,
(3) to exit the chroot, type exit, correct? What about ctrl-D, same thing? so first exit the chroot and then do the unmounting of all mounted filesystems: the Kubuntu root partition and those 5 virtual filesystems?
Comment