LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Re-installing LILO (https://www.linuxquestions.org/questions/slackware-14/re-installing-lilo-4175531929/)

jefsa 01-23-2015 09:06 AM

Re-installing LILO
 
Hello All,

For some unknown reason LILO dose not complete the boot. I found a process to reinstall it using the following commands:
mkdir /foo

mount /dev/hda3 /foo ; this is where Slackware is mounted
mount --bind /proc /foo/proc
mount --bind /sys /foo/sys
mount --bind /dev /foo/dev

chroot foo

vi /etc/lolo.conf
lilo
exit
reboot

I was able to only get to: mount --bind /dev /foo/dev where I get the following error message:

mount: wrong fs type, bad option, bad superblock on /dev, missing codepage or helper program, or other error.
In some cases useful info is found in syslog - try dmesg | tail or so.

Now I am really stuck, what do I do now?

Thanks for any help!!

Regards,

Jeff

willysr 01-23-2015 09:11 AM

Check if it really hda3 and not sda3

jefsa 01-23-2015 09:24 AM

Hello willysr,

It's a older machine with a older version of slackware installed, hda3 is correct.

Thanks.

Regards,

Jeff

bassmadrigal 01-23-2015 12:34 PM

If lilo doesn't complete booting, how are you able to get where you are? And how old is the system? What version of Slackware are you running?

jefsa 01-23-2015 01:49 PM

Hi bassmadrigal,

This computer is probably pre 2010 (I did not purchase this). It has Slackware 12.2/Windows XP installed (of course we do not use XP).
When I restared the computer I selected from LILO to boot up Linux. During the boot process the screen froze. After reseaching I found
a procedutre to re-install LILO using a CD copy of 12.2 that we have. Using the instructions as stated from my original thread, I am unable to mount the device and complete the steps. I know this is old but it is important that I get this working. This is the only backup (12.2) that we have. This is what I have to deal with at this time.

Thanks for any help!

Regards,

Jeff

Richard Twat 01-23-2015 02:06 PM

What happens if you just skip this step ?

Otherwise perhaps you need to create these devices:
Code:

cd /foo/dev
mknod -m 600 console c 5 1
mknod -m 666 null c 1 3
mknod -m 666 zero c 1 5

But 12.2 is a long time ago :)

bassmadrigal 01-23-2015 02:11 PM

I'm prefacing this that this is just attempting to figure out why /dev won't do a bind mount, at the bottom, I question the reason your computer failed to boot.

After booting up the disk, check mount to see what is mounted, I believe the directories that need the mount --bind done are already mounted by Slackware (or maybe that is after the installer completes?). I know after I complete setup, I've always just cd'd into /mnt (where Slackware mounts your harddrive to install everything to) and then run chroot /mnt and then update my lilo.conf file (I add compact so it boots faster). No bind commands needed.

But I wonder if your order has anything to do with it? All guides I have looked at said to mount /dev first, then /proc and /sys after (although, the latter two varied in what order). I doubt this is the issue, because it just doesn't make sense, but I'm throwing it out there anyway.

Last option I found on this site is to copy the contents of /dev into /foo/dev-temp, then do a bind mount of /foo/dev-temp to /foo/dev. It may be worth a shot.

Now, the computer not completing a boot could be indicative of something other than a lilo issue. If after you selected to boot linux, the system boots a bit, it may not be related to lilo at all and if so, reinstalling lilo may not lead to a fix. When the screen froze, did it retain the text or did you see the text before it disappeared? If so, what was it working on when it froze? Was Slackware 12.2 working before you restarted the computer? What did you do prior to the restart? Have you tried booting off the disc to your installation, not the setup disc? You can do that by reading the text at the prompt and typing the suggested line to boot a broken system? You would type the following after you boot off the cd when it shows boot: after a bunch of text (normally, if you want to start the install process, you'd just press enter). You'd just need to replace /dev/sda1 with your drive that Slackware is installed to. Doing this should get you to a working system if lilo or the kernel is the culprit.

Code:

huge.s root=/dev/sda1 rdinit= ro

Didier Spaier 01-23-2015 03:34 PM

Hi Jeff,

it's possible that the "mount" command in Slackware 12.2 installer was buggy, or feature incomplete if a link to Busybox (I couldn't check as for some reason I can't unpack the initrd).

To rule out that (or not) you can boot an installer for Slackware 14.1, then run the commands you mentioned.

The installer don't have to be at the same version as the installed system as long as both have the same Architecture (x86 32-bit in your case). And as long as you don't install in Slackware 12.2 packages intended for Slackware 14.1, of course (maybe you could just choose a SOURCE of packages for 12.2 when asked, but that would be another topic).

Also, if all you need is backup files, you don't have to chroot, you can do that directly from the installer, e.g. copying the files to an USB stick.

saulgoode 01-23-2015 04:31 PM

If you are booting from a Slackware install CD, you should be able to reconfigure your lilo with:
Code:

mount /dev/hda3 /mnt
liloconfig /mnt


Didier Spaier 01-23-2015 05:34 PM

@saulgoode: if you are as lazy as me, no need to provide a $1 to liloconfig as if $1 is null it will set /mnt as target anyway, if /usr/lib/setup/SeTpartitions is readable (and it is if we are in the installer).

By the way (that's my turn to be slightly off-topic), Pat kept in liloconfig (commented out) code to handle OS2, "in case it makes a comeback". :cool:


All times are GMT -5. The time now is 02:34 PM.