LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-30-2004, 08:32 AM   #1
RohanRNS
LQ Newbie
 
Registered: Dec 2003
Location: USA - CA - LA
Posts: 7

Rep: Reputation: 0
What to do when you forgot to 'lilo'...(my little guide)


Recently I went crazy because I upgraded the kernel, didn't make a backup kernel, and forgot to lilo....then I went and rebooted my box....

So here is my little guide to help if you ever end up in this situation

First, go make sure that linux will not boot...reboot your machine, at lilo boot screen, press enter, and the computer should more or less just hang up. At least this is what happened to me.

Next, find you slackware install cds, yea they are actually useful AFTER the install

Load up the slackware cd, when it asks what kinda kernel to boot, just do that standard (bare.i) by hitting enter.

When your all ready to go, login as root, and mount your hard drive.

Its usually something like:
Code:
mount /dev/hda3 /mnt
hda3 would be your root partition....change it to meet your setup.

next, you gotta 'lilo'...so:

Code:
/mnt/sbin/lilo -C /mnt/etc/lilo.conf
of course make sure that lilo.conf is edited up to whatever you like...

IF by chance you get something like: This will overwrite/destroy - something something
Then DO:

Code:
/mnt/sbin/lilo -F -C /mnt/etc/lilo.conf
after this it should say the beloved:
Quote:
Added Linux *
or something along the lines of that...

Now reboot, and you should be all ready to go
 
Old 04-30-2004, 12:35 PM   #2
Duffy
Member
 
Registered: Aug 2003
Posts: 54

Rep: Reputation: 15
I also have used Knoppix to chroot into my Slackware 9.1, recomplied my kernel and edited lilo and fixed my messed up Slackware kernel

 
Old 04-30-2004, 01:30 PM   #3
Muzzy
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo, Slackware
Posts: 333

Rep: Reputation: 30
I always keep some known working kernels and keep a choice in my boot menu, then if I mess something up with a new kernel (like making my root filesystem a module - d'oh!), one of the older kernels will still boot. It doesn't take up that much hard disk space and there is no performance penalty.
 
Old 04-30-2004, 02:54 PM   #4
little_ball
Member
 
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176

Rep: Reputation: 30
it happend to me once, what i did was use the first install CD push enter, login as root and then, mount my root partition to mnt, and then:

chroot /mnt /sbin/lilo

and get the message:
Added Linux*

another way is to in the first boot prompt do mount root=/dev/hdax and enter, login as root, and then just type /sbin/lilo.

it's not hard but could get anyone go crazy if don't know what to do.

Last edited by little_ball; 04-30-2004 at 02:56 PM.
 
Old 04-30-2004, 09:32 PM   #5
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
I *rarely* remove a working kernel.

I just add the kernels to boot and lilo.conf like so

Code:
/boot/vmlinuz-2.6.5
/boot/vmlinuz-2.6.3
/boot/vmlinuz-2.4.22-ide
And skip the whole forgetfulness thing by not using a symlink with vmlinuz or replacing it.

--Shade
 
Old 05-01-2004, 06:16 AM   #6
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
would this method work for re-installing lilo.

Cuase my win2k install is being an arsehat and I need to format it. Doing so will override the LILO boot manager, thus loosing access to slackware.

so after I re-installed windows, would I be able to just boot witht he slackware CD and follow the same steps to get lilo installed again?

or would there be a better preferance of steps for my situation? (I don't have an emergency floppy boot disk cause I didn't have a floppy drive installed at the time)

sorry for the hijack. oh and thanks for the tip anyways Shade. it'll come in handy one day
 
Old 05-01-2004, 12:36 PM   #7
Duffy
Member
 
Registered: Aug 2003
Posts: 54

Rep: Reputation: 15
You guys need to learn about bootpart

I installed Slackware 9.1, Lilo to my / partition, just added Slackware 9.1 to Lilo and finished the installation of Slackware 9.1 and restarted back into windows.

Ran bootpart as per instructions above ( skiped down to Create dual-booting in NT/2000 ), and it worked


Last edited by Duffy; 05-01-2004 at 12:37 PM.
 
Old 05-01-2004, 02:28 PM   #8
little_ball
Member
 
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176

Rep: Reputation: 30
Yes Schrambo when a new windows installation delete lilo of any linux from MBR you don't loose your linux, you just have to reinstall lilo whit the installation CD in the case of slack, just enter CD1 boot it up, push enter to use the default kernel image, login whit a user name you know root, and then instead of go to cfdisk make partitions bla bla, just run setup and select the part of install lilo. =P
 
Old 05-01-2004, 10:11 PM   #9
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
thanks little_ball, thought it would be as simple as something like that, like most things in slackware. .
 
Old 05-01-2004, 10:11 PM   #10
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
thanks little_ball, thought it would be as simple as something like that, like most things in slackware. .

I might formatt and re-install windows maybe later on today. I'll report on my sucess.
 
Old 05-02-2004, 12:41 PM   #11
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
For my part, i never delete the last working kernel...
 
Old 05-03-2004, 11:16 AM   #12
little_ball
Member
 
Registered: Oct 2003
Location: teddy bears Land
Distribution: Slackware 10
Posts: 176

Rep: Reputation: 30
Schrambo i'm so so, sorry. i thought that slackware Setup bring how to reinstall lilo which it not. yesterday someone install windows under my box, and i lost slackware lilo of course, i try to reinstall lilo whit the CD1 and setup, didn't find it, in fact i did found lilo setup installation when i prompt the command liloconfig if you loose your lilo, please do the command liloconfig and not setup. sorry for that mistake.
 
Old 05-03-2004, 09:22 PM   #13
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
no problems little_ball I havent gotten round to formatting windows just yet so no harm done.

So just boot the CD1, go default kernel, slackware login as root, then at the command go liloconfig. too easy
thanks again for the help.
 
Old 05-05-2004, 12:38 AM   #14
Schrambo
Member
 
Registered: Mar 2004
Location: Western Australia
Distribution: Debian Slackware CentOS
Posts: 102

Rep: Reputation: 15
little_ball. I just tried to give this a little shot on my spare boxen which i use for testing and whatnot. Anyways it doesn't have slackware installed and I just tired booting with the CD and going "liloconfig" but it says command cannot be found". So obvioulsy I have to boot into slackware first in order to do the liloconfig. how do you do this from the CD. do i just go /mount /dev/hda2 then run the liloconfig from there or what?

or should i just make a new boot floppy and use that?

thanks.
 
Old 05-05-2004, 07:45 AM   #15
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
Re: What to do when you forgot to 'lilo'...(my little guide)

Quote:
Originally posted by RohanRNS
/mnt/sbin/lilo -C /mnt/etc/lilo.conf
Another thing you can do is booting of that cd and when you come at the prompt type
Code:
 bare.i root=/dev/hdxx ro
this way you just boot into your existing system with the kernel from CD. Then you just log on as root and type lilo. I think this way is somewhat easier, but just chose what you like best .

Greetingz,
elluva
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
-=-I forgot-=- Tsukasa7 Linux - Newbie 1 04-13-2005 12:32 PM
I Forgot!! :@ brazilgurl69 Linux - General 4 09-19-2004 07:39 PM
forgot password =( ?!?! j_miguel_y Linux - General 1 08-31-2004 11:58 AM
Forgot to run /sbin/lilo justin_p Slackware 3 08-26-2004 06:53 AM
Forgot what I did machiner Linux - Newbie 2 07-22-2004 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration