• Reinstall of Lilo boot of Slackware 12.2

    From Earl Fryman@21:1/5 to All on Sat Sep 30 18:15:38 2017
    I have a Dell Optiplex 745 computer that has both Windows XP and
    Slackware 12.2 installed on it. The Linux is installed as logical
    partitions. The hard disk started showing early signs of failure (it
    is 6 years old); so I replaced it. I restored the partitions using an
    Acronis backup (sector by sector) on the root partition.

    Upon trying to boot Lilo shows L 04 04 04 ... I could not get into
    either XP or Linux. I used a XP repair disk to fix the MBR so I can
    now get XP to boot.

    How do I get booted back into the Slackware 12.2 installation so I
    can reload Lilo. The partitions are root /dev/sda5, swap /dev/sda6,
    usr /dev/sda6 and home /dev/sda7. I booted the Slackware 12.2 install
    disk and all the files seem to be in the partitions.

    Earl Fryman

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Earl Fryman on Sat Sep 30 19:37:38 2017
    Earl Fryman wrote:

    I have a Dell Optiplex 745 computer that has both Windows XP and
    Slackware 12.2 installed on it. The Linux is installed as logical partitions. The hard disk started showing early signs of failure (it
    is 6 years old); so I replaced it. I restored the partitions using an Acronis backup (sector by sector) on the root partition.

    Upon trying to boot Lilo shows L 04 04 04 ...

    First stage loader is loaded ("L")
    Read error - sector not found ("04") while trying to load the second-stage loader.

    I could not get into
    either XP or Linux. I used a XP repair disk to fix the MBR so I can
    now get XP to boot.

    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

    You can then fix your LILO installation, rerun lilo, and (attempt to) reboot into Slackware Linux from your hd.


    The partitions are root /dev/sda5, swap /dev/sda6,
    usr /dev/sda6 and home /dev/sda7. I booted the Slackware 12.2 install
    disk and all the files seem to be in the partitions.

    Earl Fryman

    HTH
    --
    Lew Pitcher
    "In Skills, We Trust"
    PGP public key available upon request

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Earl Fryman@21:1/5 to lew.pitcher@digitalfreehold.ca on Sat Sep 30 22:04:29 2017
    On Sat, 30 Sep 2017 19:37:38 -0400, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:

    Earl Fryman wrote:

    I have a Dell Optiplex 745 computer that has both Windows XP and
    Slackware 12.2 installed on it. The Linux is installed as logical
    partitions. The hard disk started showing early signs of failure (it
    is 6 years old); so I replaced it. I restored the partitions using an
    Acronis backup (sector by sector) on the root partition.

    Upon trying to boot Lilo shows L 04 04 04 ...

    First stage loader is loaded ("L")
    Read error - sector not found ("04") while trying to load the second-stage >loader.

    I could not get into
    either XP or Linux. I used a XP repair disk to fix the MBR so I can
    now get XP to boot.

    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

    You can then fix your LILO installation, rerun lilo, and (attempt to) reboot >into Slackware Linux from your hd.

    I have access to my Linux install again. I created a new root and
    usr linux partitions; installed 12.2 in them and ran lilo to add the
    new partitions to the MBR. After booting the new partitions I mounted
    the original Linux and edited the /etc/lilo.conf to include it and ran
    lilo.


    The partitions are root /dev/sda5, swap /dev/sda6,
    usr /dev/sda6 and home /dev/sda7. I booted the Slackware 12.2 install
    disk and all the files seem to be in the partitions.

    Earl Fryman

    HTH

    Thanks for the help.
    Earl Fryman

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aragorn@21:1/5 to All on Sun Oct 1 03:56:24 2017
    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)
  • From Pascal Hambourg@21:1/5 to All on Sun Oct 1 14:35:41 2017
    Le 01/10/2017 à 01:15, Earl Fryman a écrit :
    I have a Dell Optiplex 745 computer that has both Windows XP and
    Slackware 12.2 installed on it. The Linux is installed as logical partitions. The hard disk started showing early signs of failure (it
    is 6 years old); so I replaced it. I restored the partitions using an Acronis backup (sector by sector) on the root partition.

    Upon trying to boot Lilo shows L 04 04 04
    LILO's first stage records the sector positions of the second stage.
    So copying the root partition sector by sector is useless if the new
    partition is not at the exact same position as the original one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)