Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Restoring LILO

216 views
Skip to first unread message

Terrance N. Phillip

unread,
Nov 18, 2005, 7:48:50 PM11/18/05
to
Okay, suppose I have a dual boot machine, something like this:
hda1 - small, vendor proprietary partition
hda2 - windows 98
hda3 - linux swap
hda4 - linux (reiserfs)
And everything's working smoothly. Lilo was installed using MBR.
Someone, NOT SAYING WHO, does a fdisk /mbr from Windows, and now the
computer boots only to windows, never see the Lilo screen.

Is there a quick way to restore Lilo using the installation CD without
re-installing?

Nick.

No_One

unread,
Nov 18, 2005, 7:52:15 PM11/18/05
to

Maybe liloconfig is what your looking for.....

ken

Chris Willing

unread,
Nov 18, 2005, 7:54:57 PM11/18/05
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Start machine with Slackware installation disk. At the boot prompt are
instructions to do exactly what you want (boot to linux). You'll need
to specify booting to /dev/hda4 rather than whatever instructions say
(/dev/hda1, from memory).

When you're up & running, fix /etc/lilo.conf (if necessary), then run lilo


chris


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFDfnfHEi1IpCjOY3ERAnERAJsGtLIesSPhK3LS4K1tRNSlCBxRngCfWnuc
6MAqrH7Qo+OlbeOqxeZuaJU=
=9JiP
-----END PGP SIGNATURE-----

ray

unread,
Nov 18, 2005, 8:41:28 PM11/18/05
to

Chris gives you the proper outline. I'd also suggest, at some time, that
it would be good to move your swap and linux partitions to hda5 and hda6 -
the way it is, you can't make any more partitions, since all your primary
partitions are already used. This is not a major concern if all the
available space is used and you never want to install anything else, but
it would not hurt in any event.

Gerhard Wallraf

unread,
Nov 19, 2005, 1:03:09 AM11/19/05
to
Chris Willing wrote:

> Start machine with Slackware installation disk. At the boot prompt are
> instructions to do exactly what you want (boot to linux). You'll need
> to specify booting to /dev/hda4 rather than whatever instructions say
> (/dev/hda1, from memory).
>
> When you're up & running, fix /etc/lilo.conf (if necessary), then run lilo

it's even easier AFAIR. Boot the Slackware CD, mount your Linux drive to
wherever you want (let's say /mnt)
# mount /dev/hda4 /mnt
# lilo -C /mnt/etc/lilo.conf

This should work.

Greetings,

Gerhard

PS: If your name is really Terrance N. Phillip, your're a poor guy. If you
took it from the south park movie, please enter your realname :-)

--
1. Please remove the 'SPAMWEG' in my mail adress
if you want to write a mail to me. Thanks!
2. 'Ubuntu' is a (non-proven) african word for
"I can't figure out how to configure Slackware" ;-)

olive

unread,
Nov 19, 2005, 6:28:35 AM11/19/05
to
Gerhard Wallraf wrote:
> Chris Willing wrote:
>
>
>>Start machine with Slackware installation disk. At the boot prompt are
>>instructions to do exactly what you want (boot to linux). You'll need
>>to specify booting to /dev/hda4 rather than whatever instructions say
>>(/dev/hda1, from memory).
>>
>>When you're up & running, fix /etc/lilo.conf (if necessary), then run lilo
>
>
> it's even easier AFAIR. Boot the Slackware CD, mount your Linux drive to
> wherever you want (let's say /mnt)
> # mount /dev/hda4 /mnt

mkdir /mnt/part4
mount /dev/hda4 /mnt/part4

because it is better not to shadow what are in /mnt

> # lilo -C /mnt/etc/lilo.conf

lilo -r /mnt/part4

The -C option won't work because the files are refered as absolute file
if the partition is mounted on /. For example if your kernel is
/boot/vmlinuz; in our configuration it becomes /mnt/part4/boot/vmlinuz.

Olive

Terrance N. Phillip

unread,
Nov 19, 2005, 9:56:10 AM11/19/05
to
olive wrote:
> Gerhard Wallraf wrote:
>
>> Chris Willing wrote:
>>
>>
>>> Start machine with Slackware installation disk. At the boot prompt are
>>> instructions to do exactly what you want (boot to linux). You'll need
>>> to specify booting to /dev/hda4 rather than whatever instructions say
>>> (/dev/hda1, from memory).
>>>
>>> When you're up & running, fix /etc/lilo.conf (if necessary), then run
>>> lilo
>>
>>
>>
>> it's even easier AFAIR. Boot the Slackware CD, mount your Linux drive to
>> wherever you want (let's say /mnt)
>> # mount /dev/hda4 /mnt
>
>
> mkdir /mnt/part4
> mount /dev/hda4 /mnt/part4
>
> because it is better not to shadow what are in /mnt
>
>> # lilo -C /mnt/etc/lilo.conf
>
>
> lilo -r /mnt/part4
Ah... this looks like what I need. I will try it Monday morning. Thanks
all. FWIW, I was mounting the partition to /mnt/hd, and then just trying
to run lilo without any options. Obviously didn't work.

Nick

ray

unread,
Nov 19, 2005, 11:19:47 AM11/19/05
to

> Ah... this looks like what I need. I will try it Monday morning. Thanks
> all. FWIW, I was mounting the partition to /mnt/hd, and then just trying
> to run lilo without any options. Obviously didn't work.
>

It should, if you 'chroot /mnt/hd' first.

Terrance N. Phillip

unread,
Nov 19, 2005, 12:57:38 PM11/19/05
to
Right, right, RIGHT! chown, chmod, chroot...

ray

unread,
Nov 19, 2005, 6:38:42 PM11/19/05
to

chroot comes in useful every now and again. It basically lets you change
your root environment.

Ron Gibson

unread,
Nov 22, 2005, 9:41:04 PM11/22/05
to
On Sat, 19 Nov 2005 00:54:57 +0000, Chris Willing wrote:

>> Is there a quick way to restore Lilo using the installation CD
>> without re-installing?

> Start machine with Slackware installation disk. At the boot prompt are
> instructions to do exactly what you want (boot to linux). You'll need
> to specify booting to /dev/hda4 rather than whatever instructions say
> (/dev/hda1, from memory).

> When you're up & running, fix /etc/lilo.conf (if necessary), then run lilo

In general one can always use any bootable CD nearly

1. Boot CD
2. mkdir /mount
3. mount /dev/<your old root partition> /mount
4. chroot /mount
5. source /etc/profile
6. lilo -b /dev/<your old root partition> -v -t
7. If above reports no errors...

lilo -b /dev/<your old root partition> -v

Since your old lilo.conf is still intact and you had it in the MBR the
OP could simply do a...

lilo -v -t
lilo -v

However I would check /etc/lilo.conf first to be sure. One could use mc
for a fast check.

The above steps should cover most cases.

Dominik L. Borkowski

unread,
Nov 23, 2005, 10:14:45 AM11/23/05
to
Ron Gibson wrote:

> 1. Boot CD
> 2. mkdir /mount
> 3. mount /dev/<your old root partition> /mount
> 4. chroot /mount
> 5. source /etc/profile
> 6. lilo -b /dev/<your old root partition> -v -t
> 7. If above reports no errors...

here is a shortcut:

1) boot cd
2) mount /dev/yourootpartition /mnt
3) chroot /mnt lilo


ray

unread,
Nov 23, 2005, 10:14:49 AM11/23/05
to

last time I did that (or similar) I needed to remount /dev and /proc
because lilo needed them.
mount /dev/hda1 /mnt/hda1
mount --bind /dev /mnt/hda1/dev
mount -t proc proc /mnt/hda1/proc
lilo -r /mnt/hda1
(the -r does the chroot)

Ray

Grant

unread,
Nov 23, 2005, 4:59:28 PM11/23/05
to
On Wed, 23 Nov 2005 15:14:49 GMT, ray <rollingv...@domain.invalid.com> wrote:

>
>last time I did that (or similar) I needed to remount /dev and /proc
>because lilo needed them.

The warning message from lilo is harmless, I don't remember needing
to mount /dev + /proc for recovery, but the full procedure is often
documented and handy to know. ;) So many ways to perform recovery...

Grant.

Ron Gibson

unread,
Nov 24, 2005, 3:55:30 AM11/24/05
to
On Wed, 23 Nov 2005 15:14:49 +0000, ray wrote:

>> In general one can always use any bootable CD nearly

>> 1. Boot CD
>> 2. mkdir /mount
>> 3. mount /dev/<your old root partition> /mount
>> 4. chroot /mount
>> 5. source /etc/profile
>> 6. lilo -b /dev/<your old root partition> -v -t
>> 7. If above reports no errors...

> last time I did that (or similar) I needed to remount /dev and /proc
> because lilo needed them.
> mount /dev/hda1 /mnt/hda1
> mount --bind /dev /mnt/hda1/dev
> mount -t proc proc /mnt/hda1/proc
> lilo -r /mnt/hda1
> (the -r does the chroot)

Oh yeah that does happen sometimes. IIRC it can occur if you boot a 2.4
kernel and the mount is a 2.6 series.


Ron Gibson

unread,
Nov 24, 2005, 4:00:31 AM11/24/05
to
On Thu, 24 Nov 2005 08:59:28 +1100, Grant wrote:

>>last time I did that (or similar) I needed to remount /dev and /proc
>>because lilo needed them.

> The warning message from lilo is harmless, I don't remember needing
> to mount /dev + /proc for recovery, but the full procedure is often
> documented and handy to know. ;) So many ways to perform recovery...

Ah yes I recall that also. Actually Zipslack is a great tool. Since I
keep W98SE around for Dreamweaver and games I have fat. If youy lose
lilo just boot a DOS system disk and start Zipslack that way. It's very
a fast, method - Maybe 2-3 minutes.

Grant

unread,
Nov 24, 2005, 4:56:11 AM11/24/05
to

I avoid the problem on dual-boot machines by letting msft keep the MBR,
then all I need do is set slackware partition active, can do that from
win98 startup floppy, or winxp.

Never got around to trying ZipSlack, seems less likely as time passes.

OT:
I have three different zip100 drives doing very little, which strikes
me funny as what I paid for a Zip drive and three disks in '97 would
now buy a 20GB music thingy... iPod :)

Grant.

ray

unread,
Nov 24, 2005, 12:14:22 PM11/24/05
to
or the other way. I was using a Slax liveCD (2.6 kernel.)

Ron Gibson

unread,
Nov 24, 2005, 5:46:49 PM11/24/05
to
On Thu, 24 Nov 2005 20:56:11 +1100, Grant wrote:

> I avoid the problem on dual-boot machines by letting msft keep the
> MBR, then all I need do is set slackware partition active, can do
> that from win98 startup floppy, or winxp.

I use vpart (MBR) + OS/2 Bootmanager (takes a primary) my MBR. Vpart
is very similar to Smart Boot, another excellent product.

Then I always install lilo in the root of the distro.

I do this because lilo would be very lengthy (as in lots of stanzas)
since I have 10 bootable OS's, a mix of 'doze, OS/2 and several flavors
of linux. Vpart is very easy to use and can be installed from a floppy.
Smart Boot is likewise. And since I often change the partition scheme
the MBR gets nuked at least once, twice a week. I'm working on a
bootable CD to take care of all of these various nits for all three
types of OS's. I've had too many floppy drives go bad and eat my rescue
floppy.

> Never got around to trying ZipSlack, seems less likely as time passes.

> OT:
> I have three different zip100 drives doing very little, which strikes
> me funny as what I paid for a Zip drive and three disks in '97 would
> now buy a 20GB music thingy... iPod :)

Oh I don't use it on a Zip drive (Zipslack). I have it on a FAT
partition. It is very handy over my way.

I'll go one though regarding $$$ - I paid $400 for a 8MB 72 pin SIMMs
some time back <Groan>

Grant

unread,
Nov 24, 2005, 7:13:09 PM11/24/05
to
On Thu, 24 Nov 2005 22:46:49 GMT, Ron Gibson <rsgi...@verizon.net> wrote:

>I do this because lilo would be very lengthy (as in lots of stanzas)
>since I have 10 bootable OS's, a mix of 'doze, OS/2 and several flavors
>of linux. Vpart is very easy to use and can be installed from a floppy.

Whatever works for you, I'm too easily confused to install that many
OS on one box :o)


>Oh I don't use it on a Zip drive (Zipslack). I have it on a FAT
>partition. It is very handy over my way.

Hmm, slack install syslinux on its own partition is good enough
for recovery (like when I killed bash recently) on an old box here.


>
>I'll go one though regarding $$$ - I paid $400 for a 8MB 72 pin SIMMs
>some time back <Groan>

Game / story time: when os/2 2.0 came out I tried it, umpteen floppy
disk install then that swap storm on first boot --> $400 for 4 x 1MB
30pin sticks to go 4MB to 8MB the very next day.

Grant.

0 new messages