Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.slackware    |    I think its the one without Selinux crap    |    87,272 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 86,540 of 87,272    |
|    Grant Taylor to Lew Pitcher    |
|    Re: When your boot sector has been wiped    |
|    16 Dec 23 13:42:56    |
      From: gtaylor@tnetconsulting.net              On 12/15/23 08:22, Lew Pitcher wrote:       > Long ago, I settled on a system recovery process that involved booting       > from a Slackware "live" install disk, and using chroot to gain root fs       > access to my hard disks.              N.B. chroot isn't required to access the files on the system being       rescued from the rescue media.              Simply mounting the file system somewhere and then `cd`ing to it is       sufficient to access the files.              `chroot`ing gives a different type of access that seems much more like       the system being recovered normally has. At least from a file path       perspective.              > I've used this on and off over the last 20 years. It never occurred to       > me that such a chroot()ed environment might also require bind mounts       > to fix up /proc, /sys, and especially /dev. In my experience, I've       > never needed to do so.                     It's not that chroot needs the bind mount. It is that things used       inside the chroot (and maybe the chroot process itself) need access to       specific files inside of /dev in the chroot.              Those files can easily be provided by static files or even another devfs       (like) mount.              It's just that it's often viewed as easiest to inherit the files from       the real /dev inside of the chroot via a bind mount.              > /proc and /sys are simple: for most things, you don't need them in the       > chrooted environment. Or, perhaps, you only need them when something       > /explicitly/ references /proc or /sys; implicit references, such as       > mount() calls, work because the overall system still supplies a       > referencible source, under the covers.              Yep.              I've gotten away with `chroot`ing many times without anything in /proc       or /sys in the chroot. It is highly dependent on what you are wanting       to do inside of the chroot.              > But /dev is a different kettle of fish. You need the files in /dev       > in your chroot()ed environment in order to run lilo (or any other       > boot-loader setup tool).              Yep. You need the contents. How the contents get there / are created       doesn't matter as long as things can find needed files at the dev |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca