On Sunday 01 October 2017 01:37, Lew Pitcher conveyed the following to comp.os.linux.setup...
Earl Fryman wrote:
[...]
How do I get booted back into the Slackware 12.2 installation so I
can reload Lilo.
The quickest way I can think of is to boot from the slackware install
disk, and use it to access your Slackware installation directories.
Tip: from the install CD, you can use the commandline to mount your installation root filesystem
mount /dev/sda5 /mnt
then you can chroot and mount the rest of the system as per normal
cd /mnt
chroot . /bin/bash
swapon -a
mount /dev/sda6 /usr
mount /dev/sda7 /home
He'll probably need to bind-mount /dev into the target environment first
before actually chrooting.
Rationale:
I don't know whether Slackware maintains a static on-disk copy of the
/dev population, but if it does, then it would be the only recent
distribution to still be doing that. All other distributions have
/dev mounted as a devtmpfs and seeded with device special files by the
kernel itself, and then udev or eudev takes over the management of
/dev once userspace has been initialized.
Given that LILO needs to be told ─ whether by way of /etc/lilo.conf
or whether via the command line ─ where to write its boot sector and
that it commonly requires the name of a device special file, /dev
will need to be populated inside the chroot environment.
For good measure, he should probably also bind-mount /proc in the target environment prior to the chroot.
Mounting /home and activating swap aren't necessary for reinstalling the
boot loader, and strictly speaking, /usr doesn't need to be mounted
either ─ unless he needs to have access to an editor that lives there ─ because the lilo executable itself still lives in /sbin in Slackware.
;)
The OP doesn't mention a separate /boot filesystem, so I'm assuming that
the kernel image(s) and initrd(s) live on the root filesystem.
Setting up the chroot:
# mount /dev/sda5 /mnt
# for dir in /dev /proc; do mount --bind ${dir} /mnt/{dir}; done
# chroot /mnt /bin/bash
Optional:
# mount /dev/sda6 /usr
Continued:
# /sbin/lilo -v
# sync && reboot
--
With respect,
= Aragorn =
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)