LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2004, 01:40 AM   #1
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Rep: Reputation: 30
how to bypass dual booting check on bios ?


I have the following setting:

Harddisk C - for Windows 2000
Harddisk D (removable/portable) - for Linux red hat 9
Harddisk E (removable/portable) - for Databack for Window's files (non-linux disk)

it works fine when I have Linux and Windows hard disks, when booting up, the system will display there are 2 OS and default to Windows after couple of seconds.

but when I remove the Linux harddisk and put back the Windows backup disk in the same slot (only got one portable slot on my PC) on booting, the PC will still try to detect the 2 systems, becuase the linux H/D is not there anymore, so it hangs (start Grun mode, just before screen shows 2 OS in the PC). and stop in there.

is there a way I can modify the bios , so the system will not trying to check the Linux, in stead it will start Windows directly?

I tried to modify the boot sequence on the bios setting it's not working.
I think the problem is the bios setting on the PC has been modified in such that it will try to detect 2 system and t he Grun message
 
Old 04-12-2004, 01:53 AM   #2
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
also I have tried to set the bios to the default setting on the bios , it didn't work..

urgent help needed !!
 
Old 04-12-2004, 02:12 AM   #3
smartfüd
LQ Newbie
 
Registered: Apr 2004
Location: Burlington, VT USA
Distribution: MDK 10.0, Fedora Core 1
Posts: 22

Rep: Reputation: 15
What is controlling the boot loading process? Is it Windows or the Linux install? Presumably Grun is loaded off the Linux drive and when the system looks for that during boot and can't find it, it's hanging because it doesn't know to look for the Windows partition yet. If Grun is feeding info about where to find OSes then you can't take the Linux drive out or you lose everything.
 
Old 04-12-2004, 02:33 AM   #4
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
I think during the installation of the Linux, somehow the bios been overwritten so that after checking all the harddrives available in the PC (the first booting screen), then it's try to start Grun which controlling the boot loading process... but hangs without detecting the Linux OS. (becuase Grun is not there anymore).

so you saying I can not remove the Unix H/D? and the only solution is to
have another portable chassis (for my backup disk) or fix it inside of the PC case?

I was wondering if you can mainipulating the bios setup so it's does try to start Grun for detection of the OS, instead it go directly to Windows boot.

would Fdisk / mbr work? if I issue the command from a Floopy disk, would it cause any damage to my Window OS (i.e.) so it won't work at all ?

Thanks
 
Old 04-12-2004, 02:39 AM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Chances are GRUB was installed in the MBR of C: drive, because it needs to read some files in your Linux drive it wont work if the drive is removed.
Yea fdisk /mbr should be able to get you back into Windows without doing any harm, are you planning to put the Linux back?
 
Old 04-12-2004, 02:47 AM   #6
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
yes, I will be mainly using Linux and Window. but want to able to backup my file to the backup disk from time to time.
 
Old 04-12-2004, 02:51 AM   #7
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
but after clear the mbr, what do I need to do to revert it back so the PC can still recognize Linux and windows? does that mean I have to go through the installation of the Linux process to rewrite the GRUB info into bios ?
 
Old 04-12-2004, 03:28 AM   #8
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Set the Linux drive as the first boot device in bios, then install grub into its MBR (leave the windows mbr on the windows drive) this way next time you remove the Linux drive you only need to set the first boot device to windows drive and it'll load Windows.

Or, this is propably preferable if you're not going to move the Windows drive around: leave the bios to boot from it and install grub into the partition bootsector on the Linux drive, extract the boot sector then use the windows bootloader to load it. This way when you remove the Linux drive everything still works like before(besides Linux), and you don't need to do anything in bios.

Last edited by Demonbane; 04-12-2004 at 03:30 AM.
 
Old 04-13-2004, 12:18 AM   #9
JrLz
Member
 
Registered: Mar 2004
Location: Jakarta
Posts: 164

Rep: Reputation: 30
you can't do or modify anything in bios by installing an OS right???
BIOS is untouchable(without flashing), has nothing to do with OS selection , right????
OS will always look for MBR first right??
 
Old 04-13-2004, 01:18 AM   #10
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
thanks for Demonbane's advice,

yes, fdisk /mbr did clear the booting sequence . This allowing the PC to
boot from Window harddisk directly (after removing the Linux).

could "Demonbane" please elebroate a bit more about the steps I need to do to revert
back to the Linux setting so that when I put the Linux harddisk in, the PC will still
be able to regonize Linux and Windows

your comment: Set the Linux drive as the first boot device in bios, then install grub into its MBR.

how do I install the grub into its MBR? I am new in Linux, not sure how to do it, do I just run the
installation CD again and somewhere in the process will allow me to do this?


your comment: install grub into the partition bootsector
on the Linux drive, extract the boot sector then use the windows bootloader to load it.

how do I do this, could you briefly descible the steps ?


much appreciate for your help !!
 
Old 04-13-2004, 01:54 AM   #11
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
urgent help needed !

please help !
 
Old 04-13-2004, 02:58 AM   #12
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
GRUB is devided into two parts: one is placed on the mbr wich only boots the second part, wich resides on the linux disk. so without the linux disk, there's no boot loader. you may solve this by installing LILO, wich installes itself completely on the bootloader. if you install this on the windows disk MBR, all problems should be solved.

greetingz,
-= iluvatar =-
 
Old 04-13-2004, 03:31 AM   #13
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Quote:

your comment: install grub into the partition bootsector
on the Linux drive, extract the boot sector then use the windows bootloader to load it.

how do I do this, could you briefly descible the steps ?

This second method using the partition bootsector is probably more convienient for you so I'll just explain that.
You need either a grub bootdisk, a linux bootdisk you created during installation, or rescue mode from your distro CD.
For a grub bootdisk I have created one you can get here:
http://demonbane.org/grubdisk.img
Set the bios to boot from the floppy (or cdrom if you're using rescue mode), make sure the second boot device is your Windows drive.
Then you need to get into the grub prompt, if you used the bootdisk I provided above it takes you to the prompt directly after booting, for other methods just type "grub" in the shell (for the rescue mode you may need to chroot to your root partition)
Once in the grub prompt you first need to set the root device to your /boot partition (or just / if you don't have one), then for example if your /boot is in the first partition of the Linux drive type in:
Code:
GRUB> root (hd1,0)
The first digit after "hd" is the disk, second is the partition, and both starts from 0.
It'll then give you a message telling you the partition type, if it looks ok you do
Code:
GRUB> setup (hd1,0)
Which will install GRUB into the first partition of the Linux drive (substitute the numbers to reflect your setup if necessary of course)

If everything goes well and GRUB is installed successfully, now load your Linux installation by entering
Code:
GRUB> chainloader +1
GRUB> boot
Once you're in, login as root, mount the floppy disk
Code:
mount /dev/fd0 /mnt/floppy
Change the /mnt/floppy to wheever your mount point is if necessary
then extract the bootsector which now contains grub
Code:
dd if=/dev/hdc1 of=/mnt/floppy/linux.bin bs=512 count=1
Substitute /dev/hdc1 with your actual /boot (or /), or if you're able to write to your winxp partition you can just put linux.bin there.

reboot, set the bios to boot from the Windows drive, boot into windows and copy linux.bin to your C:\ and add these lines to C:\boot.ini (hidden by default)
Code:
C:\linux.bin="Linux"
Next time you boot the boot menu should come up allowing you to select Windows and Linux.

Last edited by Demonbane; 04-13-2004 at 03:33 AM.
 
Old 04-13-2004, 03:38 AM   #14
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Quote:

ou can't do or modify anything in bios by installing an OS right???
BIOS is untouchable(without flashing), has nothing to do with OS selection , right????
OS will always look for MBR first right??

Yeah, but the boot order in bios is relevent when you install grub, for example if you have one disk on primary master and one on secondary master and bios is set to boot from secondary master, grub will recognise secondary master as hd0, primary master as hd1.
 
Old 04-26-2004, 10:54 AM   #15
guest
Member
 
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Original Poster
Rep: Reputation: 30
question to Demonbane

Frist of all, thanks for your detailed advice, Demonbane!
I tried it at my pc, it's generally working, only when I try to
following your step as below, I didn't get the Linux starting...
here is what I did:


after I mount the floppy disk, I try to copy the bootsector to
the floppy disk, with the folloing command

-----------------------------------------------------------
dd if=/dev/hdd3 of=/mnt/floppy/linux.bin bs=512 count=1
---------------------------------------------------------------------

the hdd3 is what I found when I run the rescue mode, the system regonised. (I tried other such as if=/dev/hdc1 & /dev/hdc2 /dev/hdd2, command only worked when using hdd3 anyway)

a file is copied onto the floppy disk (a binary file as specified), and I copied into the Window's C:\ and modified "boot.ini" file.

when boot up it will allow me to select which system to boot, but
nothing happens after I select "Linux". (just a blank window).
the H/D contain Linux doesn't shown any activity.

so I am think I didn't copy the right file.
so I created a bootup disk and boot the Linux from the bootup disk successfully, and dd "boot.bi" from /boot directory and tried again.
still the same.

where is the bootsector file (which contain Grub) specificly?
there is also a grub.cnfg file under the /boot directory, do I have to
copy that file?

I think somehow I didn't copied the correct file and hence it's didn't know where to look for to start the linux.

what did I do wrong ?

(I can boot my linux with floppy disk now, but I really want to implement your method.)

Thanks again !


your previous comments as below:
##################################

Change the /mnt/floppy to wheever your mount point is if necessary
then extract the bootsector which now contains grub

code:--------------------------------------------------------------------------------
dd if=/dev/hdc1 of=/mnt/floppy/linux.bin bs=512 count=1
--------------------------------------------------------------------------------

Substitute /dev/hdc1 with your actual /boot (or /), or if you're able to write to your winxp partition you can just put linux.bin there.

reboot, set the bios to boot from the Windows drive, boot into windows and copy linux.bin to your C:\ and add these lines to C:\boot.ini (hidden by default)

code:--------------------------------------------------------------------------------
C:\linux.bin="Linux"
--------------------------------------------------------------------------------

Next time you boot the boot menu should come up allowing you to select Windows and Linux.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO BIOS Check darkarcon2015 Linux - Laptop and Netbook 10 02-18-2010 01:28 PM
LILO and BIOS Data Check jrdioko Linux - Software 1 05-03-2009 06:28 PM
lockup after bios check fincher69 Linux - General 2 02-11-2005 04:31 AM
Can't get past bios check NonSumPisces Linux - General 1 06-18-2004 05:35 AM
Bios Lockout Bypass Stephanie Linux - General 5 07-08-2002 05:25 PM


All times are GMT -5. The time now is 01:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration