You are not logged in.

#1 2004-10-26 22:27:22

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

kernel package - lilo update

i think the lilo update on kernel update should be done automatically, and grub users could safely ignore the status message. something like that should be used if possible (taken from debian script by Guy Maor <maor@debian.org>) :

# check whether LILO is installed
lilocheck () {
    echo -en "nChecking for LILO..."
    if [ $(whoami) != root ] ; then
        echo "Only root can check for LILO"
        return 1;
    fi
    if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ] ; then
        echo "No"
        return 1;
    fi
    bootpart=$(perl -ne 'print $1 if /^s*boots*=s*(S*)/' /etc/lilo.conf)
    if [ -z "$bootpart" ] ; then
        # lilo defaults to current root when 'boot=' is not present
        bootpart=$rootpart
    fi
    if ! dd if=$bootpart ibs=16 count=1 2>&- | grep -q LILO ; then
        echo -e "nYes, but I couldn't find a LILO signature on $bootpart"
        echo "Check your /etc/lilo.conf, or run /sbin/lilo by hand."
        return 1;
    fi
    echo "Updating lilo on $bootpart"
    lilo
    return 0;
}

Offline

#2 2004-10-26 22:42:53

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: kernel package - lilo update

although i use grub nowadays, i'd definately vote for this!  good call...

Offline

#3 2004-10-26 22:51:16

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

im a grub user myself tongue im just annoyed by this info message, but as a former lilo user and a n00b, i know this is priceless for beginners wink

Offline

#4 2004-10-27 08:34:58

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: kernel package - lilo update

it's one of those little things that i am surprised does not happen already - iin some ways i can see how it is against the arch ethos of not doing things for you - yet that's what all the blah.install scripts are for - seems reasonable to me!

just lilo won't cut it tho - what if you have changed your lilo config but not rerun lilo and seen that it has borked (pre installation of kernel?) - the users needs to be able to see the lilo output to confirm lilo has recreated the boot map correctly

Offline

#5 2004-10-27 10:24:16

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

thats not a problem. just change the script to suit those needs, and 'let my ppl go...' smile

Offline

#6 2004-10-27 16:36:38

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

Personally, I wouldn't want lilo to be run automatically, but I'm a bit of a control freak... in fact, I like to have control over what's in my kernel so I compile it myself... meaning it wouldn't affect me at all if this was included in kernel. However, it seems like it *could* cause problems, besides the ones phrakture mentioned...  I just can't think of any, so maybe I'm paranoid.

Dusty

Offline

#7 2004-10-27 16:50:48

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

cause problems? how come? we are talking running lilo here... just to update the lilo.conf, which ANY lilo user MUST do after the kernel update. i honestly think this should be a trival thing, and highly doubt any problem can arrise from such a minor issue (ie, executing lilo... unless lilo is some fricking monster i dont know about... wink)

Offline

#8 2004-10-27 19:10:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

One obvious problem, that your script seems to address is if the user has switched to grub and lilo is still installed.  I'd want to make sure that the script would work flawlessly here. Another is if the config file has changed since the last lilo update, it might run flawlessly and overwrite your mbr with a new lilo that won't boot your kernel for some reasons...

This could happed, for example, if pacman automatically included a new lilo.conf in an update.... but again, pacman is smart about updating config files, so I doubt it would cause a problem...

I honestly can't come up with any more serious problem, but if the lilo call doesn't work for some reason, your computer is unbootable, and that's serious... of course, if you don't call lilo after the kernel update, your computer is still unbootable.  I guess in the long run, its more likely to be bootable if lilo is called, eh?

Dusty

Offline

#9 2004-10-27 19:25:50

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

if i understand your last sentence correctly - u do agree lilo should be updated then? and about making sure if lilo is installed - as u can see from the script, it also checks using 'dd' for lilo signature :

    if ! dd if=$bootpart ibs=16 count=1 2>&- | grep -q LILO ; then 
        echo -e "nYes, but I couldn't find a LILO signature on $bootpart" 
        echo "Check your /etc/lilo.conf, or run /sbin/lilo by hand." 
        return 1; 
    fi 

so i assume you wont get more accurate than this... in anyway, even if u disagree about executing lilo update automatically after kernel update, at least consider displaying the message only for lilo users?...

and btw, i honestly didnt think about it - but u r 100% right that lilo MUST be executed after the kernel update, otherwise system wont be bootable... it would be nice if we were actually lilo users so we could justify this discussion tongue but i think most ppl here (like myself) are grub junkies...

Offline

#10 2004-10-27 20:29:54

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

Not me, I hate grub. Hate it. I like LiLo...

However, I don't use the stock kernel, so it won't affect me. I"m beginning to think that having it automatically run lilo would be a good idea though.  I think that its come up before and been refused, however.

Dusty

Offline

#11 2004-10-27 20:45:18

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: kernel package - lilo update

When you install arch the first time, you have both lilo and grub packages installed. if you're using grub, but still have the lilo package, then installing a kernel will overwrite your grub. that's bad. especially if you never configured lilo.

Offline

#12 2004-10-27 20:49:27

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

:shock: hate grub? how come? i think grub is a superior bootmanager, specially with its dynamic startup menu. i think lilo is old-fashioned bootmanager, something like i had written once - not highly sophisticated, just load-n-run... grub saves us from updating the bootmanager config - as a smart bootmanager should... smile

ps.
i always considered lilo to be a bootsector virus tongue hehe... it acts just the same tongue

Offline

#13 2004-10-27 20:54:21

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

paranoos wrote:

When you install arch the first time, you have both lilo and grub packages installed. if you're using grub, but still have the lilo package, then installing a kernel will overwrite your grub. that's bad. especially if you never configured lilo.

not at all. again, i should direct u to the previous answer - using 'dd' ensures existence of lilo in the bootsector, thus lilo will be executed ONLY if it is already installed.

Offline

#14 2004-10-27 22:46:22

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

z4ziggy wrote:

:shock: hate grub? how come? i think grub is a superior bootmanager

That's great for you, grub must work for you.

I've installed about a dozen different linux distros at one time or another, and the only one that ever set up grub in a way that actually worked for me was mandrake. I don't know why, but I cannot get the grub configuration files to work properly.  The really arse of it is that its *always* a different problem.

When installing a new distro (which will never happen again, now that I'm using Arch....), I choose grub first because its supposed to be better, then it breaks the bootloader, so I reinstall and choose lilo. Happens every time.

I think grub is probably a good bootloader or else nobody would use it.... the thing is, grub HATES me.  (programs have a tendency of doing that)

Dusty

Offline

#15 2004-10-27 23:13:55

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

rotfl... this piece and the previous one (official phrakture-bashing thread) just knocked me down man... u on a roll! wink

about hating us - i share that hatred  :twisted:

and regarding grub, could be your hardware is too much for grub to handle (though it handles just fine my 8 SATA partitons...), a problematic partition table or crazy existing MBR, or could be simply as you described it - pure hatred... but that doesnt suprise u, does it?...

i actually thought of making a patch to grub - password capabilities, and encrypt the partition table so the hd wont be accessed locally by usual means without permission. but now when u telling me YOU dont use it, i dont see what's the point tongue well, actually lack of time, thats the real reason... but i think that would be my 1st linux project (after i finish my gui_pacman project, my live-cd, and the amd64 toolchain...)

Offline

#16 2004-10-28 14:58:12

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: kernel package - lilo update

don't use lilo. don't mind it though. i am opposed to automagical running of lilo. BUT, if it was an optional feature it would be ok. that way control freaks can turn it off and people who have never learned to run lilo after kernel changes it would be good.


AKA uknowme

I am not your friend

Offline

#17 2004-10-28 15:10:13

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: kernel package - lilo update

Good idea:
something like a "KernelUpdateProg=lilo" to run when the kernel is updated (this could be useful with other programs too.. "KernelUpdateProg=aplay tada.wav")

Offline

#18 2004-10-28 15:28:04

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

It would work and solve all the problems save one:

It adds another config option to pacman.conf, in direct conflict with the KISS principle, and its an option that has a very very small application area...

Dusty

Offline

#19 2004-10-28 15:37:52

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: kernel package - lilo update

yeah well the kiss principle would eliminate auto run scripts too. that ain't simple imo. it is yet another extra process added onto the kernel install.

if one does a base instal without deselecting lilo from their option lilo would be run and you could run into problems (or not). so adding this script means adding the feature to the install to deselect one bootloader if the other is chosen. and so on and so forth.

it is better to leave it as a manually run process. it could be a process that many would not like to run so why force them to swallow it? if you cannot select not to run this script then it should not be included.


AKA uknowme

I am not your friend

Offline

#20 2004-10-28 15:43:21

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: kernel package - lilo update

perhaps there could be yet another pacman wrapper that calls pacman each time it is run and checks to see if the kernel package was installed. That would be entirely optional and could be done in a few lines of bash.

I know somebody was thinking of making a generic pacman wrapper module so people could write their own wrapper scripts, but I don't think it got past the "this is an idea I had" stage.

Dusty

Offline

#21 2004-10-29 13:30:54

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

all i actually wanted was to avoid that lilo message...  roll

Offline

#22 2004-10-29 14:26:18

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: kernel package - lilo update

lilo is evil!  :evil:

it killed my grub onetime and I didn't even know I got it installed,
I've never got grub to work as I wanted after that and ended up reinstall my arch system...


arch + gentoo + initng + python = enlisy

Offline

#23 2004-10-30 05:36:10

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

actually, lilo is responsible for my biggest nightmare in the linux world -
it was about 5 years ago while i was living in Amsterdam, working for the ABN-AMRO, and i got from a colleague of mine a RedHat CD which i hurried to install on my laptop. it then installed the lilo bootmanager which for some reason didnt like my partition table and that was the last time i saw that table... it was a sad farewell... many tears where dropped i should say :cry:

i didnt touch any unix/linux for 4 years since then. the bad experience left me with bad taste in my mouth - years of work went down the drain in a flash... but here i am, better and stronger than ever wink an no way im gonna let lilo get back in tongue (actually i did, for some reason 1st Arch install never let me use grub... but now i'm over it big_smile)

Offline

#24 2004-10-30 12:24:18

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: kernel package - lilo update

if you are using grub, don't forget to run "pacman -R lilo" just to make sure that nothing unexpected is going to happen  big_smile


arch + gentoo + initng + python = enlisy

Offline

#25 2004-10-30 12:58:16

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: kernel package - lilo update

i didnt stop with "pacman -R lilo" but continued and deleted /etc/lilo.conf.pacsave... dont want any traces for this curse on my system... :twisted:

Offline

Board footer

Powered by FluxBB