Skip to contentSkip to conversation

SuSE/LVM boot problem

linux-lvm Marco Shaw 7 participants 8 messages May 2, 2000 – Nov 27, 2020

lore
Share & tools
lore

Marco Shaw

author
#0 lore raw

I lost my floppy with lilo on it. Now I have to reconstruct it. I've tried booting in rescue mode, but even the rescue SuSE CD doesn't appear to have LVM support.

What can I do at this point?

Thanks,
Marco

#1 lore raw
Quoted 6 lines

I lost my floppy with lilo on it. Now I have to reconstruct it. I've tried booting in rescue mode, but even the rescue SuSE CD doesn't appear to have LVM support.

What can I do at this point?

Use the installation disk - it has LVM support while the Rescue disk has not. You can boot from the 2nd CD-ROM into the old Yast, do a "expert install" and switch to a shell.

Hope this helps
Michael

--

Michael Marxmeier           Marxmeier Software AG
E-Mail: [email protected]      Besenbruchstrasse 9
Phone : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/
#2 lore raw
Quoted 11 lines · Michael Marxmeier
Quoted 6 lines

I lost my floppy with lilo on it. Now I have to reconstruct it. I've tried booting in rescue mode, but even the rescue SuSE CD doesn't appear to have LVM support.

What can I do at this point?

Use the installation disk - it has LVM support while the Rescue disk has not. You can boot from the 2nd CD-ROM into the old Yast, do a "expert install" and switch to a shell.

Be careful. I have found that the install disks are very happy to create systems that cannot be booted because lilo does not know about lvm.

On this topic, what is needed to make lvm work for both / and /boot with full lilo support? I think it somewhat limits the utility of lvm not to be able to make a fully lvm system, and might be tempted to do some of the heavy lifting if it is not too gruesome.

-dg

Signature · 2 lines
David Gould                                   [email protected]
If simplicity worked, the world would be overrun with insects.
#3 lore raw
Quoted 4 lines

On this topic, what is needed to make lvm work for both / and /boot with full lilo support? I think it somewhat limits the utility of lvm not to be able to make a fully lvm system, and might be tempted to do some of the heavy lifting if it is not too gruesome.

As lilo doesn't parse filesystems, it has to know the sector numbers of the disk blocks that contain the kernel (and the second stage boot loader).

I can imagine two ways to make lilo work with lvm:

1) at install time (when you run /sbin/lilo), lilo maps the logical (lvm) locations to physical locations and writes these to the boot block. The boot code doesn't need to be changed.

2) lilo writes logical locations to the boot block (trivial). The boot code needs to understand lvm.

Option 2 is probably very difficult to do, as it requires to implement lvm handling in 16 bit code. Only read-only access is needed, but still, it's probably a major project.

Option 1 is way easier to implement, but has one big disadvantage: Whenever you move physical extents, you have to re-run lilo.

Both ways, you may end up with the kernel (or parts of it) moved to a drive that's not accessible by lilo. (while the 1024-cylinder-limit is gone, there are still drives that are accessible by linux but not by the bios, for example scsi drives on a controller without bios)

So, while I think it's fairly easy to make booting from lvm possible, there are problems, and I don't know a solution for some of them.

Jan

#4 lore raw
Quoted 25 lines · Jan Niehusmann
Quoted 4 lines

On this topic, what is needed to make lvm work for both / and /boot with full lilo support? I think it somewhat limits the utility of lvm not to be able to make a fully lvm system, and might be tempted to do some of the heavy lifting if it is not too gruesome.

As lilo doesn't parse filesystems, it has to know the sector numbers of the disk blocks that contain the kernel (and the second stage boot loader).

I can imagine two ways to make lilo work with lvm:

1) at install time (when you run /sbin/lilo), lilo maps the logical (lvm) locations to physical locations and writes these to the boot block. The boot code doesn't need to be changed.

2) lilo writes logical locations to the boot block (trivial). The boot code needs to understand lvm.

Option 2 is probably very difficult to do, as it requires to implement lvm handling in 16 bit code. Only read-only access is needed, but still, it's probably a major project.

Option 1 is way easier to implement, but has one big disadvantage: Whenever you move physical extents, you have to re-run lilo.

Quoted 7 lines

Both ways, you may end up with the kernel (or parts of it) moved to a drive that's not accessible by lilo. (while the 1024-cylinder-limit is gone, there are still drives that are accessible by linux but not by the bios, for example scsi drives on a controller without bios)

So, while I think it's fairly easy to make booting from lvm possible, there are problems, and I don't know a solution for some of them.

Actually some of them are not solvable at all :-{( LVM actually could try to deal with BIOS constraints but this would be a real mess regarding multiple platforms.

IMHO it's not worth to put root on a logical volume because of the above mentioned problems and because of the fact, that a root filesystem of 300MB is only a fraction of a typical disks size of today and that it is big enough
and therefore never has to be resized.

BTW: all of the commercial solutions i'm aware of just 'fake' root in a logical

volume to eanble mirroring. This can be done in Linux with MD
anyway.

Heinz

#5 lore raw
In reply to Jan Niehusmann
Quoted 8 lines · Jan Niehusmann

I can imagine two ways to make lilo work with lvm:

1) at install time (when you run /sbin/lilo), lilo maps the logical (lvm) locations to physical locations and writes these to the boot block. The boot code doesn't need to be changed.

2) lilo writes logical locations to the boot block (trivial). The boot code needs to understand lvm.

While waiting for either 1 or 2 you could use 3:

3) Make /boot and / contiguous and remember not to move them until lvm has a non-moveable flag. Calculate the physical start and the length in sectors of /boot and /, fake them into your partition table and use these "partition aliases" to boot and use these filesystems... ...and don�t forget to give lilo an append="..." line defining the real geometry of your drive as linux�s geometry guessing will give strange results with such aliases not starting on cylinder boundaries... This hack works fine for me since end of november 1999. Better explanations are at http://www.freenet.de/y.e.t.i./

#6 lore raw
In reply to Jan Niehusmann
Quoted 5 lines · Jan Niehusmann
Quoted 4 lines

On this topic, what is needed to make lvm work for both / and /boot with full lilo support? I think it somewhat limits the utility of lvm not to be able to make a fully lvm system, and might be tempted to do some of the heavy lifting if it is not too gruesome.

Quoted 8 lines

As lilo doesn't parse filesystems, it has to know the sector numbers of the disk blocks that contain the kernel (and the second stage boot loader).

I can imagine two ways to make lilo work with lvm:

1) at install time (when you run /sbin/lilo), lilo maps the logical (lvm) locations to physical locations and writes these to the boot block. The boot code doesn't need to be changed.

That's not very hard to do. You just need a FIPHYSBMAP ioctl.

Quoted 8 lines

2) lilo writes logical locations to the boot block (trivial). The boot code needs to understand lvm.

Option 2 is probably very difficult to do, as it requires to implement lvm handling in 16 bit code. Only read-only access is needed, but still, it's probably a major project.

Quoted 8 lines

Option 1 is way easier to implement, but has one big disadvantage: Whenever you move physical extents, you have to re-run lilo.

Both ways, you may end up with the kernel (or parts of it) moved to a drive that's not accessible by lilo. (while the 1024-cylinder-limit is gone, there are still drives that are accessible by linux but not by the bios, for example scsi drives on a controller without bios)

I would just add a ``bootable''/``non bootable'' attribute to a PV and a LV. When lilo runs it sets a ``bootable'' attribute on the LV, and when you try to move a bootable LV onto a non bootable PV it complains. Not 100% bulletproof, because it requires some user action to tag the PVs correctly, but better than nothing.

-Andi

author
#7 lore raw
In reply to [email protected]

On Tue, 2 May 2000 [email protected] wrote:

Well I just have the eval version so no 2nd CD. I tried creating a lilo disk with another system, but I guess lilo needs the same boot.b/system.map files to create a lilo disk?

So now I'm left with creating lilo on a disk somehow with another system... How could I create it? Otherwise, I could always install a copy of SuSE 6.3 in a VMWare VM and create a disk there...

Marco

Quoted 24 lines · Michael Marxmeier
Quoted 11 lines
Quoted 6 lines

I lost my floppy with lilo on it. Now I have to reconstruct it. I've tried booting in rescue mode, but even the rescue SuSE CD doesn't appear to have LVM support.

What can I do at this point?

Use the installation disk - it has LVM support while the Rescue disk has not. You can boot from the 2nd CD-ROM into the old Yast, do a "expert install" and switch to a shell.

Be careful. I have found that the install disks are very happy to create systems that cannot be booted because lilo does not know about lvm.

On this topic, what is needed to make lvm work for both / and /boot with full lilo support? I think it somewhat limits the utility of lvm not to be able to make a fully lvm system, and might be tempted to do some of the heavy lifting if it is not too gruesome.

-dg