Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LILO install on disk for other computer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
anonybosh
Guru
Guru


Joined: 20 Nov 2005
Posts: 324

PostPosted: Tue Oct 26, 2010 5:39 pm    Post subject: LILO install on disk for other computer Reply with quote

Hi-
I'm needing to install a bootloader (I believe LILO is my best bet--I need a bootloader that doesn't require a special partition to load it's other stages like GRUB) on a disk with a duplicated Windows 98 installation (vfat).
The disk involved is a PATA disk connected to my linux box via a USB controller. The drive shows up as sdb.
Code:
# fdisk -l /dev/sdb

Disk /dev/sdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbb77bb77

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        4861    39045951    c  W95 FAT32 (LBA)

I've created a lilo.conf file with the assumption that it needed to point to hda when the disk was put back into the other computer:
Code:
# cat /home/ryan/lilo.conf
boot=/dev/sdb

disk=/dev/hda

other=/dev/hda1
label=windows
and executed
Code:
# lilo -v -C /home/ryan/lilo.conf
LILO version 22.8, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 19:40:25 on Oct 22 2010

Warning: /home/ryan/lilo.conf should be owned by root
Warning: LBA32 addressing assumed
Reading boot sector from /dev/sdb
Warning: /dev/sdb is not on the first disk
Using MENU secondary loader
Calling map_insert_data
Warning: The boot sector and map file are on different disks.

Boot other: /dev/hda1, on /dev/hda, loader CHAIN
Fatal: First sector of /dev/hda1 doesn't have a valid boot signature

I've also tried it with the current drive nomenclature in the lilo.conf:
Code:
# cat /home/ryan/lilo.conf
boot=/dev/sdb

disk=/dev/sdb

other=/dev/sdb1
label=windows
Code:
# lilo -v -C /home/ryan/lilo.conf
LILO version 22.8, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 19:40:25 on Oct 22 2010

Warning: /home/ryan/lilo.conf should be owned by root
Warning: LBA32 addressing assumed
Reading boot sector from /dev/sdb
Warning: /dev/sdb is not on the first disk
Using MENU secondary loader
Calling map_insert_data
Warning: The boot sector and map file are on different disks.

Boot other: /dev/sdb1, on /dev/sdb, loader CHAIN
Added windows *

Writing boot sector.
/boot/boot.0810 exists - no boot sector backup copy made.

Upon boot of the second shown config, I get the L 99 99 99 99... error, which apparently means "invalid second stage index sector (LILO)".
What am I missing? Do I need to put the image map (/boot/boot.0810) onto the windows vfat partition?

TIA,
-Ryan
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54553
Location: 56N 3W

PostPosted: Tue Oct 26, 2010 6:16 pm    Post subject: Reply with quote

anonybosh,

Neither Grub nor Lilo require a separate parttion for the startup files provided the BIOS can read the entire hard drive.
A small /boot partition at the start of the drive has been used down the years to overcome the problem of the boot drive being bigger than the space the BIOS can read.
It first became an issue at 528Mb and most recently at 137Gb.

Boot loaders must be very small, so they all make BIOS calls to read the files they need as they start.

All USB disks get SCSI names, thats normal.

IF you have built your kernel properly, the disk will have a SCSI name in its new home too. The old
Code:
< > ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->
has been abandoned by udev, so you do not get /dev/hd* names any more.
Use
Code:
  │ │        SCSI device support  --->                                    │ │ 
  │ │    <*> Serial ATA and Parallel ATA drivers  --->
now.

Anyway, thats for the future - you have to make the bootloader work before you experience the problem above.
I don't know how you solve this with lilo but for grub, you write it a device.map file and tell it to use it.
Having said that, its much simpler with either boot loaders to get the drive in the right place before you write the Master Boot Record.
If you disconnect the first drive in the PC, then boot the CD, both grub and lilo will be straight forward.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
anonybosh
Guru
Guru


Joined: 20 Nov 2005
Posts: 324

PostPosted: Tue Oct 26, 2010 6:29 pm    Post subject: Reply with quote

I was under the impression that grub HAD to have the (default) /boot/grub/ directory, where it has its' "stages" for higher level functionality.
At any rate, the hda/sda linux setup is a non-issue...I have my linux box setup with both the old (ATA) and new (SATA) drivers so I get both hda and sda designations.
However, that is not of great importance--the drive only has windows (98?) on it, and that is all that will be used on the separate computer.
I was specifying 'hda1' in the lilo.conf file because I assume that LILO uses the standard linux drive/partition naming scheme when accessing its' bootable partitions.
So are you basically suggesting that I just boot up a install CD and setup the bootloader that way? I would much rather use my system that already has things set up the way I want them, if at all possible.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54553
Location: 56N 3W

PostPosted: Tue Oct 26, 2010 6:47 pm    Post subject: Reply with quote

anonybosh,

Grub needs its /boot/grub folder but it does not require /boot to be a separate partition, any more than lilo does.
Grub and lilo work very differently. You can install grub on a fat32 as long as you are careful to avoid dependancies on any symlinks.

At install time the grub stage1 and stage1.5 are loaded to the MBR and the otherwise wasted sectors before the first partition. The stage1 and stage1.5 binaries are modified during this install, so they can find subsequent stages. When the stage2 file is loaded, it reads the filesystem to find out what to do.

For lilo, running /sbin/lilo writes block lists that are subsequently used at boot time. These block lists reflect the boot file, file locations in the filesystem.
At boot time lilo puts its hand over its eyes and blindly loads the contents of the block lists. When the block lists are written, lilo does indeed use kernel names, but it can't while its booting the kernel, as the kernel isn't there. The block lists contain the BIOS device numbers. Thats why it will fail if you move the disk and it changes its BIOS device number. Grub has the same device numbering problem but forcing its device.map is a way around that.

Installing the boot loader will not change the way other things work.

anonybosh wrote:
I have my linux box setup with both the old (ATA) and new (SATA) drivers so I get both hda and sda designations.

You might ... when you update udev, no /dev/hd* nodes will be created. With the drivers in the kernel, the devices will be present, but there will be no nodes created in /dev for you, so you will have no access.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum