LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   lilo failed to boot after "slackpkg upgrade-all" Slackware64 14.0 (https://www.linuxquestions.org/questions/slackware-14/lilo-failed-to-boot-after-slackpkg-upgrade-all-slackware64-14-0-a-4175488415/)

rei_kuroki 12-18-2013 04:54 AM

lilo failed to boot after "slackpkg upgrade-all" Slackware64 14.0
 
hi everyone~

i'm kinda new to linux so please excuse my stupidity, and english is not my first language, please excuse my bad english (if any)

so i wanted to upgrade kernel to 3.2.45 by following this guide: http://www.ehow.com/how_8615290_upda...ux-kernel.html

but after that i reboot my machine and then when i boot linux appeared like this: L 9A 9A 9A 9A....

i've tried to boot from my Slackware disc then ran 'lilo -v' then reboot the error code changed to: L 99 99 99 99 99 99

i've tried googling, there are so many threads in forums and even in LQ about this error code but i think what i found aren't relevant with my situation,

i've tried: 'lilo -g', 'lilo -L' but they didn't solve the problem
oh yeah, i forgot to mention that i dual booted with windows 7 and lilo was not installed in MBR

edit: my /etc/lilo.conf
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda4

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Windows bootable partition config begins
other = /dev/sda1
  label = Windows
  table = /dev/sda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda4
  label = Linux
  read-only
# Linux bootable partition config ends

thanks in advance~

gegechris99 12-18-2013 06:22 AM

Hello and welcome to LQ,

To upgrade a Slackware installation, please read the UPGRADE.TXT instructions available in the root directory of the installation CD.

For Slackware 14.0 64-bit edition, the file can be found here.

In particular, after a kernel upgrade, you should pay attention to step 7 of the upgrade process:

Quote:

7. IMPORTANT! *Before* attempting to reboot your system, you will need
to make sure that the bootloader has been updated for the new kernel!
First, be sure your initrd is up to date (if you use one). You can
build a new initrd automatically by running the
mkinitrd_command_generator.sh script.

If you're running the 64-bit kernel, or the 32-bit single processor
kernel, this is the command to use:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.2.29 | bash

If you're using the 32-bit SMP kernel, use this command:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.2.29-smp | bash

If you use LILO, make sure the paths in /etc/lilo.conf point to a valid
kernel and then type 'lilo' to reinstall LILO. If you use a USB memory
stick to boot, copy the new kernel to it in place of the old one.
For more information about initrd, please refer to file README.initrd.

By the way, there is a lot of useful information in the text files available in the root directory of the installation CD. I would recommend that you take a look at them.

TobiSGD 12-18-2013 07:02 AM

Quote:

Originally Posted by rei_kuroki (Post 5083140)
Code:



boot = /dev/sda4



Is it intended that you install Lilo to your root partition, not the MBR?
Have a look here: http://wiki.linuxquestions.org/wiki/LILO_Error_Codes

rei_kuroki 12-18-2013 07:30 AM

Quote:

Originally Posted by gegechris99 (Post 5083189)
Hello and welcome to LQ,

To upgrade a Slackware installation, please read the UPGRADE.TXT instructions available in the root directory of the installation CD.

For Slackware 14.0 64-bit edition, the file can be found here.

In particular, after a kernel upgrade, you should pay attention to step 7 of the upgrade process:



For more information about initrd, please refer to file README.initrd.

By the way, there is a lot of useful information in the text files available in the root directory of the installation CD. I would recommend that you take a look at them.

thanks for your reply, but unfortunately for me, this doesn't work (i've added initrd = /boot/initrd.gz in lilo.conf)
apparently i've done mkinitrd but with another parameter before, it's: mkinitrd -c -k 3.2.45 -m ext4 , but it didn't work, is this why it didn't work when i used the parameter from the generator?

Quote:

Originally Posted by TobiSGD (Post 5083212)
Is it intended that you install Lilo to your root partition, not the MBR?
Have a look here: http://wiki.linuxquestions.org/wiki/LILO_Error_Codes

thanks for your reply~

yeah, it's intended, i thought if something wrong with lilo or something i still can boot up windows (it's kinda silly though when i want to choose linux i have to choose twice, from windows loader and lilo, haven't configure it yet)

i've looked that url too, but 'lilo -g' gave me error, then i looked at the man page i saw "-L" parameter, i tried 'lilo -L' but it didn't solve the problem

angryfirelord 12-18-2013 09:21 AM

You only need to build an initrd image if you're using Slackware's generic kernel or one that you compiled yourself. If you're using the huge kernel, everything is already compiled into it.

The error code letter tell you where lilo gets stuck. The number is a hexadecimal number that tell you the disk error.

http://www.tldp.org/HOWTO/Bootdisk-HOWTO/a1483.html
http://wiki.wlug.org.nz/LiloErrorCodes

If re-running lilo under /dev/sda4 did not output any errors, then you might want to make sure the boot flag is set for /dev/sda4.

rei_kuroki 12-18-2013 10:07 AM

Quote:

Originally Posted by angryfirelord (Post 5083262)
You only need to build an initrd image if you're using Slackware's generic kernel or one that you compiled yourself. If you're using the huge kernel, everything is already compiled into it.

The error code letter tell you where lilo gets stuck. The number is a hexadecimal number that tell you the disk error.

http://www.tldp.org/HOWTO/Bootdisk-HOWTO/a1483.html
http://wiki.wlug.org.nz/LiloErrorCodes

If re-running lilo under /dev/sda4 did not output any errors, then you might want to make sure the boot flag is set for /dev/sda4.

thanks for replying

i'm using huge kernel apparently, so it isn't necessary to use mkinitrd right? i just realize that :D

oh yeah, just giving out some details hoping i can figure out what's wrong:
- before executing "slackpkg upgrade-all" everything working nicely
- i saw that slackpkg is not just upgrading kernel but some packages were upgraded, could some packages upgrade screwed up lilo?

well, those links gave me some idea, i think i need someone to post a working lilo.conf file just for me to compare?

thanks in advance

enorbet 12-18-2013 12:06 PM

Greetings
You may already know this but just in case.... Some of the many things I love about Slackware are the most basic, like that Patrick bothers to halt the Install DVD boot, to give you a hint that you can select a kernel (like huge) and boot a failed system. It amazes me how few distros provide this simple courtesy. It has saved my butt so many times I can't count, including booting some other distros!

I'm an oldtime Slackware user so I have a certain revulsion for auto-dependency resolving package managers. I'll just say no more about that except it is my opinion that doing a complete system upgrade is much like throwing yourself off a cliff and hoping the wind is strong enough and blows in a direction that will land you safely on your feet. Some things are just not best left to chance.

It is also my opinion that one should never have to apologize for redundant bootloading. What does it take? 2 seconds at most? It is still true that many bootloaders do not play nice. They are great on a standalone machine but the developers often act like nobody dual boots. I say redundancy is just smart and safe.

It used to be that I used 3rd party windows based mult-bootloaders, largely to keep windows safe as it used to have some really arrogant requirements (1st partition 1st drive pffff!). Installing Lilo to Root meant all I had to do was point to that partition to get back in. Over time I got better at Lilo, and now Slackware Lilo resides in MBR, but I still put each other distros bootloader on it's root, just to be safe.

If it works for you... no need to apologize. Welcome to Linux and especially Slackware Linux.

gegechris99 12-18-2013 05:03 PM

Quote:

Originally Posted by rei_kuroki (Post 5083224)

yeah, it's intended, i thought if something wrong with lilo or something i still can boot up windows (it's kinda silly though when i want to choose linux i have to choose twice, from windows loader and lilo, haven't configure it yet)

Does your system boot first the Windows 7 bootloader and then lilo? If so, then I would suppose that you would need to update the linux bootsector file into the C: drive of Windows 7.

I'm using dual boot with Windows Vista and Slackware using first the Windows Vista boot loader and then lilo. I've used the following tutorial to make it work: dual-boot-linux-and-windows-vista-windows-bootloader

I don't know if Windows 7 works the same way. Just try googling to find out how dual boot Windows 7/Linux works. But I find it surprising that you would forget such a thing if your system was working before the upgrade (except if someone else did the installation).

lukameen 12-19-2013 06:37 AM

Yes, gegechris99 is correct. I've dual booted slack and windows for years on my work computer. Any changes to lilo require an update to the bootsector file when lilo is installed to the linux root and you use the windows bootloader. I've gotten the 9999.... error everytime I made any changes to lilo without updating the bootsector file. And, it works the same for windows 7.

You can boot any linux live CD and grab the first 512 bytes of the bootsector using the dd command, make the file, and copy it to the root of your windows partition (C:\). Just follow all the steps in the link gegechris99 provided. In windows 7 you must follow the steps using bcdedit to configure the windows bootloader.

kfritz 12-19-2013 07:21 AM

+1 for gegechris99 and lukameen posts above. I run exactly this setup (Windows 7 bootloader chained to lilo), and you definitely need to update the file you put on your windows partition to make this work.
Quote:

Originally Posted by lukameen (Post 5083857)
In windows 7 you must follow the steps using bcdedit to configure the windows bootloader.

First time yes, but after that, you just need to replace the file.

rei_kuroki 12-19-2013 07:28 AM

Quote:

Originally Posted by enorbet (Post 5083361)
Greetings
You may already know this but just in case.... Some of the many things I love about Slackware are the most basic, like that Patrick bothers to halt the Install DVD boot, to give you a hint that you can select a kernel (like huge) and boot a failed system. It amazes me how few distros provide this simple courtesy. It has saved my butt so many times I can't count, including booting some other distros!

I'm an oldtime Slackware user so I have a certain revulsion for auto-dependency resolving package managers. I'll just say no more about that except it is my opinion that doing a complete system upgrade is much like throwing yourself off a cliff and hoping the wind is strong enough and blows in a direction that will land you safely on your feet. Some things are just not best left to chance.

It is also my opinion that one should never have to apologize for redundant bootloading. What does it take? 2 seconds at most? It is still true that many bootloaders do not play nice. They are great on a standalone machine but the developers often act like nobody dual boots. I say redundancy is just smart and safe.

It used to be that I used 3rd party windows based mult-bootloaders, largely to keep windows safe as it used to have some really arrogant requirements (1st partition 1st drive pffff!). Installing Lilo to Root meant all I had to do was point to that partition to get back in. Over time I got better at Lilo, and now Slackware Lilo resides in MBR, but I still put each other distros bootloader on it's root, just to be safe.

If it works for you... no need to apologize. Welcome to Linux and especially Slackware Linux.

thanks for reply~ haha well, by trying to solve this problem i got to know that i chose the right os for me, i think i should start to try everything manually...
and thanks for your welcome!

Quote:

Originally Posted by gegechris99 (Post 5083518)
Does your system boot first the Windows 7 bootloader and then lilo? If so, then I would suppose that you would need to update the linux bootsector file into the C: drive of Windows 7.

I'm using dual boot with Windows Vista and Slackware using first the Windows Vista boot loader and then lilo. I've used the following tutorial to make it work: dual-boot-linux-and-windows-vista-windows-bootloader

I don't know if Windows 7 works the same way. Just try googling to find out how dual boot Windows 7/Linux works. But I find it surprising that you would forget such a thing if your system was working before the upgrade (except if someone else did the installation).

Quote:

Originally Posted by lukameen (Post 5083857)
Yes, gegechris99 is correct. I've dual booted slack and windows for years on my work computer. Any changes to lilo require an update to the bootsector file when lilo is installed to the linux root and you use the windows bootloader. I've gotten the 9999.... error everytime I made any changes to lilo without updating the bootsector file. And, it works the same for windows 7.

You can boot any linux live CD and grab the first 512 bytes of the bootsector using the dd command, make the file, and copy it to the root of your windows partition (C:\). Just follow all the steps in the link gegechris99 provided. In windows 7 you must follow the steps using bcdedit to configure the windows bootloader.

at first i thought this wasn't necessary to do, but actually it solved my problem, thanks everyone!

i used this as a guide to update the bootsector file.

marked as solved!


All times are GMT -5. The time now is 04:22 AM.