LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   incorrect LILO selection SLACK install - no boot from hda1 (https://www.linuxquestions.org/questions/linux-newbie-8/incorrect-lilo-selection-slack-install-no-boot-from-hda1-486462/)

studioq 09-24-2006 07:01 AM

incorrect LILO selection SLACK install - no boot from hda1
 
Hello...
During the Slack install process I was being walked through it over the phone by an experienced Slack user which really helped things move along.

The one thing we overlooked was the proper selection when it came time to install LILO.
I think I was given a choice as to whether or not to over write the MBR and my guide told me not to. I think he may have thought I was going to set up a dual boot device. I'm not. Slackware is the only OS.

Now the system needs a floppy at boot, which I'm not really comfortable with. I would like the system to boot normally like it should which leads me to this question:

I have read some methods for reinstalling and reconfiguring LILO in the Slack Book. All of it seems to make sense but it it one of those things I am not comfortable doing without some guidance. What I think I want to do is overwrite the MBR with LILO so it is the only resident boot loader on the system. People have said it can be done - but I really wouldn't know where or how to start.

Thanks,
Studioq

saikee 09-24-2006 07:40 AM

Boot up Slackware with the floppy
Click terminal mode, type "su", supply the password and become the super user witb the root privileage to amend the system file

The Lilo comman "lilo -b" allow you to put Lilo anywhere you wish to
Code:

lilo -b /dev/hda
put Lilo in the first IDE disk
Code:

lilo -b /dev/sda
put Lilo in the first Sata disk

Only you know which your book disk hda or sda boot first so choose the one that is at the top of the booting queue.

Code:

lilo -b /dev/fd0
puts Lilo in the floppy

Code:

lilo -b /dev/hda9
puts Lilo in the partition hda9 and so on

The last alternative is for the OS residing in hda9 to be booted by the boot loader controlling the MBR.

Lastly if you alter /etc/lilo.conf you must issue the "lilo" command in a terminal so that the bootloader is re-compiled, otherwise the changes will not be implemented.

studioq 09-24-2006 09:12 AM

The boot disk is an IDE. I followed the normal convention of formatting the drives hda1 - hda2 - hda3...
I haven't made any modifications to /etc/lilo.conf.. Will I have to make some changes after performing the above commands? Or does performing the above commands make alterations to the .conf file which in turn requires me to issue the lilo command at the end.. Just so I understand.. Thank you...

saikee 09-24-2006 12:16 PM

If you Lilo boots fine from the floppy then there is no need to change it. I just remind you of the characrteristic of Lilo.

Lilo, Grub and XP's NTLDR actually all keep the boot loader in the root partition of the hard disk. To boot it from the MBR a user must ask the boot loader to replicate its first 512 bytes there and burn the boot loader address into it too to form a link.

studioq 09-24-2006 12:27 PM

[QUOTE=saikee]If you Lilo boots fine from the floppy then there is no need to change it.[QUOTE]

In this case "it" would be the .conf file?
Dont change it and proceed with the above commands in order to get the system to boot correctly?

saikee 09-24-2006 12:45 PM

Yep.

If Lilo has a probelm to boot then you can only make it toe the line by amending /etc/lilo.conf. Right? After amendments you must issue "lilo" as a command in a Bash shell so that Lilo recompiles its boot loader.

If Lilo boots satisfactorily then its /etc/lilo.conf has no error and so you should leave it alone.

louieb 09-25-2006 09:58 PM

Thanks this thread fixed my problem. I installed slackware over a ubuntu install and used the same option as the origional post by studioq. But the mbr still had grub in it. and grub could not find stage1 so
Code:

lilo -b /dev/hda
replaced grub with lilo and now I don't need the floppy to boot.

studioq 09-26-2006 04:38 AM

I am glad this helped. I tried to make the title key word specific so that someone with the same issue could find it. I have yet to perform this operation.. Many fish to fry.. But I will report my results here..

studioq 09-26-2006 07:38 AM

It still didn't work. I am probably doing something wrong..
 
I tried to make the modifications to lilo by typing:
lilo -b /dev/hda
and got a response of "Ignoring entry 'boot' - Added Linux.

The system wont boot from disk...

When I type su nothing happens either. Should I be looged on as someone other than root when I ussue the 'su' command? Or could it be a problem that I never set an su password?
I only ask because I dont know..
Thank you..

saikee 09-26-2006 07:55 AM

Only a root user is allowed to touch the system files in Linux, so persevere with it.

When Lilo returns the message "added Linux" it means the compilation was successful and the distro was added without any error.

The above is Lilo's part in not finding any syntax error in the /ect/lilo.conf. The content inside has been found executable as Lilo check each entry during compilation. If one or two commands are rubbish then there is nothing Lilo can do as it just execute them one by one. No other boot loader bothers to check the correctness of the figuration entries, except Lilo.

If your system still refuses to boot can you paste the error message here? A complete printout of /etc/lilo.conf helps also.

Slackware is the easiest distro in the world to boot with only a standard kernal name as "vmlinuz" and no initrd file.

In fact if there is any distro that I have difficulty in booting 75% of them can be fired up by using Slackware's kernel.

studioq 09-26-2006 08:47 AM

The error I keep getting is:
Ignoring entry 'boot'
Added linux*

I have also gotten the error:
Warning! dev/hda is not set as active

and
Warning! dev.hda1 is not set as active

depending on if I tinkered with the number set in lilo.conf.

Also, when I login as root and type 'su' nothing happens.
Below is a copy of lilo.conf


# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# 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
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Linux
read-only
# Linux bootable partition config ends
~
~
~

saikee 09-26-2006 02:29 PM

If you log in as root the command "su" should cause no response.

A lot of your so call problems isn't real.

Ignoring entry 'boot' = Lilo doesn't make much use of your "boot = /dev/hda" statement.

Linux doesn't use active flag in a partition and so any complaint is irrelevant.

I couldn't fault your lilo.conf as you haven't pasted the error during booting. I would try to put a "#", thus disabling that line, in front all the lines except
Code:

timeout = 1200
 vga = 773
 image = /boot/vmlinuz
 root = /dev/hda1
 label = Linux
 read-only

Lilo may get into trouble to load "boot_message.txt" if it cannot be found from /boot directory.

Paste the content of the screen after you issue a Bash command
Code:

fdisk -l
so that we get a confirmation of your partition scheme.

studioq 09-26-2006 05:56 PM

One other thing someone mentioned today is that there may be some system bios issue that is hanging it up. That is one thing I dont know about though. I am going to try to cause the error. I also dont know where I can find an error log for the boot process. If I can find that I will paste it too.... Here we go..

saikee 09-26-2006 06:30 PM

You probably have to write the error down if Slackware fails to boot. It should be just a couple of lines.

studioq 09-26-2006 06:46 PM

When the system finishes POST - I get no boot error. It just sits there. Normally It would tell me if it couldn't find a boot device. But this one just sites there.

After perfoming the above commands this is the text that was output:

root@filebox:/etc# lilo
Warning: RAID1 install implied by omitted 'boot='
Warning: Partition 1 on /dev/hda is not marked Active.
Added Linux *
root@filebox:/etc#

root@filebox:~# fdisk -1
fdisk: invalid option -- 1

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

After entering th "-l" parameter I got this:

root@filebox:~# fdisk -l

Disk /dev/hda: 61.4 GB, 61471162368 bytes
255 heads, 63 sectors/track, 7473 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 3000 24097468+ 83 Linux
/dev/hda2 3001 6000 24097500 83 Linux
/dev/hda3 6001 7473 11831872+ 82 Linux swap
root@filebox:~#

saikee 09-26-2006 07:01 PM

You have one hard disk and it looks normal to me with 24Gb in hda1 and hda2. The swap is reported to be 11Gb large.

If the distro does nothing on a boot up and appears to hang then it could also means an incorrect video driver might have been selected. To find out if this is the case just press ctrl+alt+backspace. If you get a Bash shell then the booting works but the distro cannot communicate with you. In such case we switch our attention to the Xorg.

Keep us posted.

studioq 09-26-2006 07:59 PM

The control+alt+backspace garnered no results. I did notuice in the syslog that there are some issues with an unsupported VIA chipset. Also I doubt the bios on this board has been flashed in 1000 years.. That aside, Xorg?

Wim Sturkenboom 09-27-2006 12:10 AM

Your hda1 is not active; below the result of fdisk -l on my box (please note the asterisk under boot)
Code:

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1        1024    8225248+  83  Linux
/dev/hda2            1025        1090      530145  82  Linux swap
/dev/hda3            1091        4278    25607610  83  Linux
/dev/hda4            4279        4865    4715077+  5  Extended
/dev/hda5            4279        4865    4715046  83  Linux

Run fdisk /dev/hda and use menu option 'a' to toggle the bootable flag for hda1.

Just to make it complete, my lilo.conf
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
#compact        # faster, but won't work on all systems.
#prompt
#timeout = 5
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# 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
# ramdisk = 0    # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda1
  label = Slackware101
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends


aikempshall 09-27-2006 06:40 AM

I had a problem a few weeks ago when I added a new hard drive to my system and fouled up the master/slave settings on the machine afterwhich I couldn't boot other than through a floppy.

I eventually tracked it down to a bios issue whereby the bios was trying to boot from a different drive/partition. I'm not at my desktop now but I suggest you thoroughly check ALL your bios settings. The setting was NOT the usual boot from floppy/CD/harddrive it was more obscure than that.

When i get to my desktop I will update this thread.

Regards

saikee 09-27-2006 11:31 AM

As far as I am aware Linux does not need the boot flag made active.

Linux can reside in a logical partition and normal PC standard does not support active logical partitions. So active flag has no use to a Linux.

MS systems use a common MBR that doesn't know which of the 4 primary partitions to be booted. The MBR code is wasted mainly to search like a blind man to examine which of the 4 primaries has the booting flag switched on and boot it according.

Linux boot loaders are always told the partition to be booted up front.

In Grub it is done by the "root" command

In Lilo it is done by the "root=" or "image=" command.

Therefore whether a partition is active or not Linux still has to boot the one specified. It has no choice.

Personally I have never made any of my 100+ Linux systems in box active when booting it.

studioq 09-27-2006 12:26 PM

I am ready to conceed and just continue booting from floppy. There doesn't seem to be an easy answer.
I checked out the VIA chipset issue which doent seem to have much to do with it. There are linux drivers for the via, but I have no way of telling how they are installed or how to install them if I did know. I am setting up another box right now to see if I can get things to work differently..

Are there any logs that are generated that might lead me to a solution?

studioq 09-27-2006 02:43 PM

I am writing to you from the new box. I set up Slack on an ASUS a7v-133 with an Athlon 1.3g processor. 1g of ram and an 80g drive. This time around when I was given the option of where to install LILO I chose to install it to the MBR.. It worked like a charm. On the first try the box loaded from disk.. So I guess my question is now: Is there a way to go back and reinstall lilo to the MBR on the other box Or do I have to wipe it?

saikee 09-28-2006 04:18 AM

The commands I gave in Post #2 contains Lilo installation into the MBR after the Slackware has been installed but does not boot.


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