Click to See Complete Forum and Search --> : General qn on linux installation


debianuser
04-27-2003, 03:44 PM
i have used mandrake, rh at various times. This qn is generally for any linux installation

I have Harddisk#1 as Primary Master (/hda1), and Harddisk#2 (/hdd1, /hdd2, /hdd3) on Secondary slave.
hda1 runs winxp. hdd1 is /boot, /hdd2 is swap and /hdd3 is root partition.

I installed LILO to hda1's MBR, and the on boot, it shows both WinXP, Linux, as well as floppy and other stuff

Problem: If i remove hdd1 (ie disconnect the HDD to bring to another comp), LILO does not showup anymore, instead a whole bunch of 1's and 0's filled the screen. Reconecting the HDD solved the problem, but how can i boot hda1 even if i take out the second harddisk?

I was wondering: How is installing LILO to hda1's (winxp) MBR different from installing it to root partition (ie. hdd3 in my case).

DMR
04-27-2003, 04:44 PM
Lilo is a 2-stage bootloader. When you install it on the MBR only stage 1 gets installed/copied there. Stage 2 (boot.b) is located in /boot, so if you remove the drive containing /boot lilo cannot complete its boot sequence. That's exactly what the 01 01 01... error is saying.

debianuser
04-29-2003, 01:45 AM
Hey thx for the response :)

So i guess the method to install LILO for my case (to enable either harddisk to be removed freely and yet able to boot properly, perhaps requiring pressing ESC during bootup to choose HDD0 or HDD1 to boot from), is to install LILO to /boot partition of the 2nd harddisk(running Linux). Am i correct to say this?

But LILO is meant to boot multiple OSes, now LILO seems to be "useless" as i am not using it to select which OS to boot...instead i am selecting which harddisk to boot from during startup, that means i dun need to install LILO perhaps during linux installation?

my point is i dun want to have a dependency on linux (harddisk 2) in order to boot XP properly, coz harddisk 2 gets hosed often with my linux experimentation. :P I still wan to be able to boot XP when linux gets hosed.

michaelk
04-29-2003, 02:28 AM
You could boot linux using the XP bootloader i.e. boot.ini file.

You will still need to install a bootloader to HDD but just for linux.

I have seen previous posts on the subject on this website.

debianuser
04-30-2003, 09:21 AM
i missed that post maybe...

i forgot that XP got its own bootloader
That's should be all that i need for my situation
thanks for the suggestion dude :)

debianuser
05-01-2003, 06:16 AM
i have this problem:

I did fresh installation of debian woody.
At the part where the installer asked me to install to /boot of the linux harddisk or MBR of the first harddisk (running XP), i chose the /boot option (the second option).

then in linux i created a debianboot.bin file (as seen somewhere on a website) using the "dd" command. then copied it to C: drive of XP. Then edited XP's boot.ini and added a line there pointing to the C:/debianboot.bin

The XP bootloader shows 2 options alright...but selecting the Debian option only showed:

MBR 0101010101010101011........all the way

anyone knows how can i boot properly using XP bootloader? Is it something i did wrong during debian installation? ...

Right now i am booting from a Boot floppy into Debian. It works but its slow

DMR
05-01-2003, 04:15 PM
Originally posted by debianuser
...selecting the Debian option only showed:

MBR 0101010101010101011The error message actually displayed the "MBR" part? I've never seen that before. Before reinstalling Debian, did you restore XP to the MBR to erase the info lilo original put there? If not, you still have a piece of lilo in the MBR.

I'm not sure which method XP uses to restore its MBR information, but one of the following should do it:

a) Boot into the Rescue Console from your XP install CD and run "FIXMBR"

b) Boot from a DOS rescue floppy and run "fdisk /MBR"

You might want to post your boot.ini and lilo.conf files as well.

debianuser
05-02-2003, 03:28 AM
Yes it shows: MBR followed by 01 01 01 01 ...
About restoring the XP's MBR to erase lilo info, is that necessary? how do i
check if there is lilo info in there anyway?


XP's boot.ini is very simple:
################################

[Operating Systems]
multi(0)disk(0)rdisk(0)partition(1)\ WinNT="Microsoft XP" /fastdetect
c:/debianboot.bin="Debian Woody"

where debianboot.bin (a 512byte file created in /tmp) was created in debian by:
dd if=/dev/hdd1 of=/tmp/debianboot.bin bs=512 count=1
and debianboot.bin placed in windows c: drive.


/etc/lilo.conf is as follows:
################################
lba32
boot=/dev/hdd1
root=/dev/hdd3

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
install=/boot/boot-menu.b

# Specifies the location of the map file
map=/boot/map

delay=20
prompt
timeout=150
vga=normal
default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.

other=/dev/hdd1
label="Linux(hdd1)"

other=/dev/hda1
label="WinNT(hda1)"

#########################################

i suspect something wrong in lilo.conf, but i am not familiar with lilo...
As mentioned in this thread above, lilo is 2-stage bootloader, if it cannot find some needed info in /boot (maybe boot-menu.b, not sure), then it complains with 01 01 01...

i did not modify this file at all after installing debian. i installed Debian to /boot
that is hdd1 (the 2nd harddisk) btw

i am hesistant to use fdisk /mbr or fixmbr till i am sure i understand what's
going on here. coz i have some nice movies on that disk :P

Anyway i reinstalled XP recently coz i did an "improper" shutdown (fed up, cut the
power coz xp shut down damn slow). Later XP couldn't boot due to something being corrupted. luckily the moviefiles remained intact. Debian kicks ***~

DMR
05-02-2003, 12:58 PM
As far as the MBR goes, you really should reinstall Win XP's boot information with "fixmbr" before doing anything else. Any information that lilo originally wrote there is invalid; XP's boot instructions are what should be living in the MBR now, not lilo's.

As for lilo, your guess is correct- boot-menu.b is the second stage.

The syntax of your lilo.conf doesn't exactly look like what I'm used to seeing, but that's probably due to the fact that I haven't used lilo in a while and your version is newer than the one I last worked with. However, there is at least one thing that isn't right: the last four lines (the other/label lines) shouldn't be there.

Also, the "root=" entry has traditionally appeared under each "image=" section instead of the global section (where your root= entry is). I'm not sure that it matters though, it might just be a difference in your version of lilo.

I'd suggest the following:

** You should have a working Linux boot disk before proceeding **

1. Rewrite the Win boot instructions to the MBR with fixmbr.

2. Make absolutely sure that you've got your drive and partition naming correct. That is, verify that the second drive really is hdd, /boot is hdd1, and /root is hdd3.

3. Delete the last four lines in lilo.conf

4. Re-run /sbin/lilo to make your changes take effect.

5. Because you have reinstalled (and modified lilo), you need to create a new, up to date boot sector image (the debianboot.bin file) and put that in place of the older one on C:\.

Try the above and let us know what happens.
If it still doesn't work, comment out the "lba32" entry in lio.conf (by putting a # at the beginning of the line) and repeat steps 4 and 5.

debianuser
05-03-2003, 02:52 AM
ok i have some results... i did not meddle with xp's mbr coz i want to boot xp even if i took out the 2nd harddisk.
instead ran liloconfig to reconfigure lilo again. installed lilo into boot sector of 2nd harddisk (running debian). Then in BIOS made Harddisk #2 the boot device.

This time i can boot directly (without using my trusty bootfloppy) into Debian, BUT i can't do so with the WINXP option (see lilo.conf below).

It will say this

boot:
Winxp starting.. (or some msg like that, cant rem the exact msg)

then nothing happens even after waiting some time


my /etc/lilo.conf is now:
####################
boot=/dev/hdd1
root=/dev/hdd3
compact
install=/boot/boot.b
map=/boot/map

delay=50
prompt
timeout=50
vga=normal

default=Linux

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

other=/dev/hda1
label="WINXP"
##########################


Another query: Sometimes i wan to get to command prompt$ immediately without starting X (it does so automatically start X). Is there a shortcut key i can use to not start X, or is there something i can type in boot: when lilo kicks in?

I ask this coz i have this weird problem: On 1st boot, when X starts, logging into KDE stalls at "Initializing system devices", the 2nd icon in the KDE startup screen. It just blinks continuously then the KDE startup screen disappears and nothing else happens.

Restarting X, loggin in as root gave the same results.

But on 2nd boot, everything is OK(logs into Debian fine).

I wonder what's is happening...

DMR
05-04-2003, 08:19 PM
Ok, look- you're making this much more convoluted than it needs to be, and digging a deeper hole for yourself in the process.

Originally posted by debianuser
ok i have some results... i did not meddle with xp's mbr coz i want to boot xp even if i took out the 2nd harddisk.Restoring XP's MBR information is what should allow you to do that; it's the old lilo info on the MBR which isn't going work if you remove the second drive. If you really insist on not fixing the MBR I can't guarantee that you won't have problems.

Originally posted by debianuser
installed lilo into boot sector of 2nd harddisk (running debian). Then in BIOS made Harddisk #2 the boot device. This time i can boot directly (without using my trusty bootfloppy) into Debian, BUT i can't do so with the WINXP optionExactly; this is the "hole" that I said you were digging yourself into. By reassigning the boot order of the drives in your BIOS you've changed the way that the BIOS identifies each drive to the OS. In other words, as far as the operating system is concerned XP is no longer on hda, so your entries in lilo.conf are out of sync.

You can get around this by a procedure called drive-mapping, but that just "fools" a bootloader into thinking that the drives are configured the way they were before you changed their assignments in your BIOS. It can certainly be done, but at that point you're just adding one more layer of complexity by applying the bootloader drive-mapping workaround to a correct a problem created by your original BIOS drive-mapping workaround. The word elegant definitely doesn't appy to this type of "solution".


Originally posted by debianuser
It will say this

boot:
Winxp starting.. (or some msg like that, cant rem the exact msg)The exact message is crucial, it lets us know if the error is coming from lilo or from the XP bootloader. In this case I would guess lilo, but I don't like guessing when I'm trying to help someone through a troubleshoot.

Originally posted by debianuser
Another query: Sometimes i wan to get to command prompt$ immediately without starting X (it does so automatically start X). Is there a shortcut key i can use to not start X, or is there something i can type in boot: when lilo kicks in? Yes, at the lilo "boot:" prompt, append "init 3" after whatever you type to start Linux.