VectorLinux
April 24, 2014, 09:07:47 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: oddball install uses Bios select drive to boot from  (Read 3349 times)
bad_gui
Member
*
Posts: 61


« on: February 01, 2008, 07:33:41 pm »

Hi,

I was a longtime Vector 4.0 user but I wanted to transition from kernel 2.4 to 2.6 for new
drivers and devices.  Great job with Vector 5.9: it looks great.

My Dell desktop gives me a window at boot to select primary drive (WinXP) or secondary drive
(linux) to boot from.
This allowed me to avoid modifying the primary MBR so XP is unaware of linux on the secondary drive.
These are SATA drives so to install Vector4.0 I had to add a temporary IDE drive, patch the 2.4.28 kernel
and install the modified Vector4.0 onto the second SATA drive.  It took a while to get all the issues
sorted out but this worked!

I unplugged the power to the windows drive and proceded with a normal install of Vector5.9. Vector5.9
boots fine when this is the only powered drive in my computer.   I modified lilo.conf so that all references
to /dev/sda are changed to /dev/sdb

In my Vector4.0 install that had a lilo version <22.5 I had to use
disk = /dev/sdb
bios = 0x81

But Vector 5.9 uses a more recent lilo and this syntax is not allowed.

I tried boot-as = 0x81 but I get the L 99 99 99 99 99 error when I try to boot from the
secondary drive.  This is the same error as when I forget to load the CD and try to
boot from the CD drive.

When I boot off the Vector5.9 CD and give boot: root=/dev/sdb2 ro , everything seems to
proceed but at the Coldplugging stage I get an e2fsck error about /dev/sda having a
corrupt superblock and I don't know what to do.  Is this an /etc/fstab issue?

How do I get the lilo.conf modified so that I can boot from sdb?  The MBR on the second
drive should be okay, no?

The partitions are /dev/sdb1 swap 512 MB    /dev/sdb2 ext2 69.5 GB  (/root)  /dev/sdb3 ext2 10GB (/home)
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2503



« Reply #1 on: February 01, 2008, 08:03:35 pm »

you will need to change fstab so it uses sdb instead of sda
then boot the drive as sdb and just run vliloconf to setup lilo
Logged
bad_gui
Member
*
Posts: 61


« Reply #2 on: February 02, 2008, 08:14:52 am »

Yes, changing the fstab entry allows me to boot linux from the CD.

I still can't boot from the secondary drive because of the L 99 99 99 error.

When I installed VL5.9 with the primary drive unplugged, I used the option
to write to the MBR (in this case the secondary drive).  My lilo.conf has an
option "boot-as" to tell it to pretend it is the primary drive despite what the
bios tells it.  I get the error with or without this line.

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sdb
boot-as = 0x80
default = linux
compact
prompt
timeout = 100
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
bitmap = /boot/bitmap/boot.bmp
# VESA framebuffer console @ bootsplash-high
vga = 791
# 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
# Partition 1: Linux GUI mode
image = /boot/vmlinuz
    root = /dev/sdb2
    label = linux
    append = "splash=silent "
    read-only
    initrd = /boot/initrd
# Partition 2: Linux TUI mode
image = /boot/vmlinuz
    root = /dev/sdb2
    label = linux-tui
    append = "2 splash=silent "
    read-only
    initrd = /boot/initrd
# Partition 3: Linux GUI mode
image = /boot/vmlinuz
    root = /dev/sdb2
    label = linux-gui
    append = "4 splash=silent "
    read-only
    initrd = /boot/initrd
Logged
bad_gui
Member
*
Posts: 61


« Reply #3 on: February 02, 2008, 09:45:21 am »

While reading on the web I came across a potential cause of my problem.

Quote
    LILO can be made use of in the following instances.

1. Writing to the boot sector of the first hard disk.
2. Boot Sector of a floppy disk.
3. Boot sector of a primary Linux file system partition on the first hard disk.

LILO can't be made use of in the following instances.

1. Writing it to a SWAP partition.
2. Boot sector of a LOGICAL partition in an extended partition.

/dev/sdb is formatted as
/sdb1  swap 512MB
/sdb2 ext2 69.5 GB bootable
/sdb3 ext2 10GB

Is it a problem to have the swap partition at the begining?  Is the MBR part of /sdb1
or separate from it?

See :
http://www.freeos.com/articles/3397/

Anyone know where I can read about lilo 22.5?  Most of the information on the web is
for previous versions and some commands no longer work.
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2503



« Reply #4 on: February 02, 2008, 10:56:18 am »

lilo works fine for me with swap on the first partition.
I think the problem is that you are using your bios to switch sdb with sda and then lilo is looking for code on sdb.
if you cant boot from sdb without switching it to sda then you either have to write the mbr of the windows drive, boot from cd, or use the windows boot manager to boot lilo.
Logged
bad_gui
Member
*
Posts: 61


« Reply #5 on: February 02, 2008, 12:41:57 pm »

So I have two (three) options:

primary disk winXP MBR is modified by lilo to give me option to boot XP or VL5.9
    when I tried this with VL4.0, XP choked on the MBR and it was a pain to restore
    supposedly windows thinks any non windows MBR is a boot-sector-virus

swap disks so that VL5.9 is primary and its MBR lilo gives me the option to boot XP
     on the secondary disk. This will allow XP to be unaware of linux but I worry that
     somewhere down the road this will cause problems.

 I found some more information on tweaking lilo:

http://sman.informatik.htw-dresden.de:6711/man?=lilo.conf&=5

Maybe this option will give me the configuration I had with VL4.0
Quote
static-BIOS-codes
Causes the operation of the boot installer and boot loader to bypass the use of Volume-ID information, and to revert to a mode of operation of versions of LILO from 22.4 backward. With Volume-ID booting (22.5 and later), the BIOS codes of disks are determined at boot time, not install time; hence they may be switched around, either by adding or removing disk(s) from the hardware configuration, or by using a BIOS menu to select the boot device.


With the use of this option, BIOS codes of disks MUST be correctly specified at install time; either guessed correctly by LILO (which often fails on mixed IDE/SCSI systems), or explicitly specified with ‘disk=/dev/XXX bios=0xYY’ statements. The use of this option precludes any activity which may switch around the BIOS codes assigned to particular disk devices, as noted above.


In general, this option should never be used, except as a bug workaround.

Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #6 on: February 02, 2008, 11:33:09 pm »

bad-gui,

Run, don't walk, to the HowTo section and see my directions for using the XP boot loader to boot VectorLinux. It's here:
http://www.vectorlinux.com/forum2/index.php?topic=1073.msg6559#msg6559

I think this is absolutely the best way to dual boot XP (or W2k) and Linux. It doesn't touch your Master Boot Record. You can add any desired boot options to LILO. It works reliably and is easy to set up.

Forget about switching boot drives in BIOS. That confuses things. Just use the XP boot loader and all will be well.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
tomh38
Vectorian
****
Posts: 912



« Reply #7 on: February 08, 2008, 01:58:39 pm »

I now have this problem, or something similar.

I can't use GrannyGeek's method, since I have no Windows on my system (I don't even have a copy of Windows XP, so I can't install it to solve this problem).

Here's what happened.  I had two PATA drives on my machine, one of which had my root partition.  My motherboard supports SATA for two drives, so when they became less expensive I bought two and installed them.  I had VL 5.8 on hda (my first PATA drive), and then I installed 5.9 on the second SATA (sdb).  I used 5.8 to add 5.9 to Lilo.  Then, hda died.  I removed the drive, and set things up so that the former second PATA became the only one.  Naturally there was no more Lilo, so I booted from the install disk.

I don't know where to install Lilo.  None of my hard drives will accept it (hda, sda, nor sdb) ... I get that error message where it's a bunch of zeroes (I think that's the one, but I can find out for sure if it's important).  If I try to install Lilo to a floppy, I get a similar or the same error message, even when VASM tells me it has installed successfully.

I can't find anything in my BIOS about setting one of the drives as the first.

This isn't a serious problem, since I can always boot from the install disk.  But I would like to have Lilo back.

If anybody has any ideas, I would greatly appreciate it.

Tom
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #8 on: February 09, 2008, 09:36:30 pm »

These are pure guesses, but what the heck? You have to try *something*.

Are you sure you have identified the partition correctly? I recently discovered my 5.9 Standard Deluxe that I thought was on /dev/hdb7 was actually on /dev/hdb9. The thing was, it booted fine with a floppy disk on which I installed LILO. Well, I had made that floppy *before* I changed LILO and put it in the boot sector of the Linux partition. This was so I could create and copy bootsect.lnx to my Windows Drive C and boot through the XP boot menu. The floppy wasn't affected because I removed it from the floppy drive before I changed LILO. When I did df -h, it identified the Linux partition as /dev/hdd7. That's also what I had in fstab, but I later realized I had copied that fstab from my RC3 installation, which actually is in /dev/hdd7. df -h probably got its information from fstab or mtab.

I would never have discovered this had not my efforts to boot from the NT boot loader taken me to RC3 on /dev/hdd7. When that kept happening, I did some further investigation with cfdisk and fdisk -l along with mounting /dev/hdd9 to take a look at what was there. I couldn't believe that I had forgotten that VL5.9 Deluxe was on /dev/hdd9 because when I booted with the floppy, that's where it took me (although I thought it took me to hdd7) and I got the desktop for VL Deluxe.

So I booted with the CD and entered the correct location on /dev/hdd9. Sure enough--that worked. I fixed up LILO, putting it in /dev/hdd9's boot sector, and did my dd for the NT loader. Tried booting from XP's boot menu and I got into my 5.9 Deluxe.

My point in all this is that you need to make sure you're in the right partition and you need to know how VL identifies it and be sure that's the correct identification. The least little thing off and it won't work.

Did you try editing /etc/lilo.conf as root? That often works better than using VASM if you're having a problem. Be sure to run
lilo -v
as root after you save your edited lilo.conf.
--GrannyGeek
« Last Edit: February 10, 2008, 09:54:37 pm by GrannyGeek » Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
tomh38
Vectorian
****
Posts: 912



« Reply #9 on: February 10, 2008, 05:56:48 am »

Thanks GrannyGeek.  I'll look into it and see what I find.  It didn't occur to me that what you suggested might be the problem.    The truth is, I haven't had bootloader trouble in a long time, so I've forgotten every trick I used to know. Cheesy

I'll post again once I find something out.
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
tomh38
Vectorian
****
Posts: 912



« Reply #10 on: February 10, 2008, 09:25:32 am »

GrannyGeek:

Thanks again.  I looked into what you suggested, and that's not it (as far as I can tell).

When I get around to it, I'm going to try some other things.

Thanks for the help,

Tom
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
tomh38
Vectorian
****
Posts: 912



« Reply #11 on: February 10, 2008, 09:56:43 am »

Problem solved.  I'm not exactly sure why this would affect things, but I had a PCI card for adding extra ATA drives.  Until recently it had a hard drive attached to it, but that drive died (different drive death, the old drives are going to live in the great computer land in the sky lately).  In the course of cleaning things out, I just removed that card this morning since it wasn't doing anything.  After removing it, I forgot that I had the BIOS set to boot from the floppy (I had been trying to install Lilo on a floppy disk again) ... and, suddenly I got Lilo from the floppy.  Apparently the PCI card with no drive attached had been causing the problem.

Weird.

Thanks again GrannyGeek.
Logged

"I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones." - Linus Torvalds, April 1991
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #12 on: February 10, 2008, 09:56:15 pm »

Weird is right!

It's fortunate you found the problem and the solution in fairly short order. Good troubleshooting!
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!