PDA

View Full Version : Lilo install to MBR fails



devilotx
02-03-2004, 06:17 PM
Don't know if I'm doing something wrong so here is my deal...

had a dual boot of Java Desktop and Xandros 2 on my pc, booting with the Xandros Lilo install

Formated the drive with Partition magic 8 and decided to install Knoppix 3.3 to the harddrive

Xandros Boot menu continued to show,

Installed Windows XP, Formated upon finished (to rewirte the MBR, I'm sure there was an easier way... but alas)

install Knoppix to HD, worked fine, however Lilo does not install to the MBR, have to boot from a floppy...

I am not experiance enough to get this to work, I've installed Knoppix like 5 times trying to get this to work... can anyone help me out?

I want to be able to boot from the HD instead of the floppy.

kiekerjan
02-03-2004, 06:28 PM
Boot your computer using the knoppix cd, then look at /etc/lilo.conf on the drive where you installed. You can find some explanation and an example here. (http://www.sonic.net/cgi-bin/man?lilo.conf) Check if the settings are correct, save the changed lilo.conf and quit you text editor. Then run lilo to install it.
If you can't figure it out, post the lilo.conf here.

devilotx
02-03-2004, 07:46 PM
I'll give it a try when I get home...

rickenbacherus
02-03-2004, 08:37 PM
Boot Knoppix
mount /dev/hdx? /mnt/hdx? (wherever you install Knoppix to)
Do not use the desktop icons to mount your hdd- do it by hand!!

chroot /mnt/hdx?

lilo.conf needs to say:

boot=/dev/hda
root=/dev/hdx? (wherever you installed knoppix to)

Then just rerun lilo:
lilo

If you see errors then reedit lilo.conf

devilotx
02-03-2004, 09:46 PM
Boot from the hd install or the CD?

rickenbacherus
02-03-2004, 11:13 PM
Boot from the hd install or the CD?

OK I can see how I may not have been too clear. Knoppix is a cd- nothing more nothing less. When you install it is Debian. Boot the cd. Conversely you can just boot your hdd install and rerun lilo after editing as well. Whatever works for you.

devilotx
02-04-2004, 03:43 AM
I get this error:
root@Knoppix:/etc# lilo
Warning: '/proc/partitions' does not exist, disk scan bypassed
Fatal: geo_query_dev HDIO_GETGEO (dev 0x0300): Invalid argument


root@Knoppix:/etc#

And this is my Lilo.conf file...



boot=/dev/hda
vga=791
prompt
timeout=50
append = "hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce"

image=/boot/vmlinuz-2.4.22-xfs
label=knoppix
root=/dev/hdb1
read-only
initrd=/boot/initrd.gz

## A Windows installation, example for partition 1 on first IDE harddisk
# other=/dev/hda1
# label=dos
# optional
# table=/dev/hda


__________________

rickenbacherus
02-04-2004, 10:19 AM
If your lilo.conf is to be beleived you have 2 hard drives and knoppix is installed to the primary slave. Is that correct?

Also you would normally have 2 other entries in lilo.conf:
install=/boot/boot-menu.b
map=/boot/map

rusty
02-04-2004, 02:33 PM
I think it's trying to boot from hda, which is bios. Try booting from cd , mounting the hard drive:

open a root shell

mount /dev/hdbx /mnt/hdbx
replacing x with the partition number of the linux partition.

Edit /etc/lilo.conf and change

boot=/dev/hda to
boot=/dev/hdb (no partition #)

save and exit from the editor then :

chroot /mnt/hdb2
lilo

logout, remove cd reboot.

Note: You will also have to change the lilo.conf references to the windblows partition to hdb1 rather than hda

HTH

devilotx
02-04-2004, 03:01 PM
One hard drive partitioned, 25 gigs for linux, 1.5 gigs for swap and about 28 gigs unpartitioned space.

Windows is not installed on this comptuer...

I will give your ideas a shot though, see what I can get dug up, Too bad I couldn't just load the boot floppy that I've been using to the MBR.. that would be nice...

RockMumbles
02-04-2004, 03:23 PM
So we can be sure how your hd is setup, boot into your system (from your floppy) and use the following command:

less /etc/fstab

you will see something like this:

# /etc/fstab: static file system information.
#
# <device> <mount point> <type> <options> <dump> <pass>
/dev/hde7 / ext3 defaults,errors=remount-ro 0 1
/dev/hde6 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto 0 0
/dev/cdrom /cdrom iso9660 defaults,user,exec,gid=cdrom,umask=002,noauto,ro 0 0
/dev/cdrw /cdrw iso9660 defaults,user,exec,gid=cdrom,umask=002,noauto,ro 0 0

Your system will be different, but notice from the info on my system that I would use the following in my /etc/lilo.conf file:
boot=/dev/hde #to write the boot sector to the mbr of my boot drive
root=/dev/hde7 #to tell lilo that the root partition (/) is at /dev/hde7

HTH

~rock

rickenbacherus
02-04-2004, 04:22 PM
One hard drive partitioned, 25 gigs for linux, 1.5 gigs for swap and about 28 gigs unpartitioned space.

Windows is not installed on this comptuer...

I will give your ideas a shot though, see what I can get dug up, Too bad I couldn't just load the boot floppy that I've been using to the MBR.. that would be nice...

Then your lilo is wrong. Change:

root=/dev/hdb1

to

root=/dev/hda1

OR

root=/dev/hda2

-whichever partition you installed Knoppix to