LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-04-2004, 07:29 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Install W98 to drive 2 or a second or greater partition boot with GRUB


Not sure where to put this, I thought of success stories but as its limited to GRUB users and bios with a certain setting is not really a great success. Feel free to move it

Preamble
You have 2 drives and want Microsoft on the second drive. I am writing a tutorial on GRUB bootloader and in order to understand the map command I decided to install W98 on drive 2. b4 attempting this yourself, be aware you do so at your own risk. Linux is Trade Marks to Linus Torvalds and Microsoft or Windows is Trade Marks to Microsoft Corporation.

This is for GRUB users only.

If others know a smarter way please post a reply. If those attempt this post, fail to understand this post, feel free to post a reply. If you have an AWARD bios feel free to suggest changes. To all that I think I need to modify my post, I will edit and give you credit in the spirit of GPL.

I have one IDE drive jumpered as a master on controller 1 and one drive jumpered as a slave on controller 2. Yours may be different such as master and slave both on controller 1. I assume your preferred boot is /dev/hda partitions.

Be aware this technique may not work if you have both drives on the same controller. (I haven't figured that one out and so am waiting for gurus to post their suggestions)

Issue any commands in " " without typing " but press enter at end of command.

EDIT technique 2 works for everyone but as this is a rush job its at the end of the post

# step 1 research your BIOS
Find out how to get into and alter your BIOS. Write down all settings in case you have to reset to factory defaults and work back to your favourite settings. Hopefully you will only have to make my suggested changes. I have a Phoenix Bios. If you don't have a mobo cd or Bios manual you may need to go on the net and do some research. I have an intel mobo. To get into my bios I press F2 before the hard disk starts. I also have the Intel splash turned off so I can already see what the bios detects.

I have heard that some need to press the DELETE or DEL key to get into their bios.

# step 2 notice what your bios currently says about your 2 drives b4 changes are made
On boot the bios splash for my computer detects and names 2 drives.

# step 3 change bios setup
1) click on Advanced tab go to IDE config and in the section for controllers (I have 2). I note that b4 the change, it was set on "both". I use the F5 key to rotate thru the options until I have selected the secondary one.
I make no changes to the actual jumpers in the computer.

This step will fail for those who have both drives on the same controller.

2) I then go to the tab for boot and enter the option for hard drives. I note that b4 the change, I had 3 options and the order was drive 1 master then drive 2 slave and one more irrelevant option. I use F5 to move the order so its slave first.

# step 4 save the bios new settings
F10 gives option to save and quit so when I do so, I notice that the bios re-starts and without other tests, I can see that only one drive is detected and its the slave.

# step 5 paranoid --- test to be damn sure.
If you have one, let knoppix cd load. I am using v3.2. I use "knoppix lang=us desktop=icewm". Then click on a terminal and type "su" (no password is needed to change user to root) then type "partimage"

Because I am in partimage in root mode, I can see what Partition Image thinks of my setup. It detects only hdc1 hdc2 etc where as b4 the bios changes it also had hda1 hda2 etc showing up.

So I know that the only drive now visible to this bios is drive 2.

# step 6 insert w98 cd and reboot
This failed for me as it was already a non-bootable reiserfs linux format drive. But if you have a new drive you may not have to worry about step 7. I dunno but I am leaving this step in.

# step 7, if w98 can't handle the drive
If step 6 fails for you, as it did for me, I rebooted into knoppix cd similar to step 5 but instead of typing partimage afer su I typed "qtparted". This starts a graphical partition tool, I clicked on hdc1 and deleted it. I then clicked on the space for hdc1 and clicked on the create icon near the spanner icon and created a fat32 primary partition but made the size 250 Megs as I still wanted more space for linux.

# step 8 w98 cd should now boot & install sequence starts.
Lets not write what you do with w98.

# Once all reboot of w98 and configuring for setup are complete
As drive 1 (hd0) is invisible to bios, any reboot should take you now to w98 on your hard drive.

# step 9 regain drive 1
(A) go into bios setup and use step 3 (1) to F5 both controllers as preferred option
(B) F10 to save and as soon as bios starts go back into bios setup
###### We needed to save this change as step 3 (2) would not allow me to see my drive 1. The save and re-start did.
(C) So now go to step 3 (2) but re-order drive 1 then drive 2 then your other options
(D) F10 to save the bios settings

# reboot and watch
reboot should (fingers crossed) show 2 drives detected by bios and your first drives MBR starts and you go to your favourite Linux.

# GRUB USERS ONLY
Sorry I don't know anything about LILO SYSLINUX etc.

Its now time to edit your /boot/grub/menu.lst file

add some lines, copy and paste if you like

title windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

####### explain

W98 sits on /dev/hdc1 ( aka C drive) Grub says that is (hd1,0)
rootnoverify says don't try to mount this partition but execute the next command etc
map says what you think is drive 1 is now drive 2 and what was drive 2 is now 1
makeactive says if this was not yet bootable make it so
chainloader says don't try to boot this DEAR GRUB, but let whatever that partition has use its OWN bootloader to complete the boot.

PS I tried the rootnoverify with the option of using (hd0,0) thinking that the map command would mean I choose the VIRTUAL C drive and not the actual. But I got an error. You can have this command after the map but it makes sense to put it b4 so you know not to be tricked like me.


###########################################################
technique 2 for all users subject to testing

I will do a separate post and neaten them up after I come back on holidays.

For those desperate to try

1) Back up all linux partitions and I choose partimage
2) create a new w98 fat32 partition on drive 1 that must be (hd0,0)
3) I recommend you use knoppix and QTParted. No matter what always use the same partition tool
4) Allow W98 cd to boot and install to drive 1 partition 1.
5) Use partimage on knoppix to save an image of it.

FORK
################DRIVE 2 USERS JUMP TO step 12

##########drive 1 parttion users start here step 6
step 6 The goal is to have W98 on same drive (hd0) but on a partition not (hd0,0)
step 7 load knoppix and create your final partitions with (hd0,0) being linux and say (hd0,12) (dev/hda13) being W98.
step 8 Reload all linux images that will go into the same size or larger for partition .
There are posts on this error of trying to put an image on a smaller size but it can't be helped.

step 8A if you had no spare space, could not do without deleting other systems etc then you will need to reload linux.

step 9 load W98 image to (hd0,12)
step 10 edit your GRUB with hide command to hide or partitions up to but excluding (hd0,12) and use the map command to swap (hd0,12) to (hd0,0) and vice versa.
step 11 reload GRUB to MBR and cross your fingers.


####################drive 2 starts here
step 12 the goal is to put w98 on drive 2 partition 1
step 13 use knoppix to recreate your linux partitions on drive 1 and create (hd1,0) as a fat32 for C drive on drive 2.
step 14 If you can reload your linux images to drive 1 otherwise re-install
step 15 load W98 image to new (hd1,0) We don't need to care about MBR for drive 2.
step 16 reboot into linux and edit your GRUB with the title windows stuff above.
step 17 reboot and cross your fingers.


################sorry for the rush try at your risk etc
I will see if I am a guru after my holidays. And then post my apologies and edits when I have a chance.




Last edited by aus9; 05-05-2004 at 10:31 PM.
 
Old 05-06-2004, 07:57 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
amendment to same drive IMAGE technique

I changed target partition to (hd0,1) to save creating unnecessary partitiions and work for me cos I am lazy ok
I used the command
pause line b4 map command
and GRUB accepted map (hd0,0) (hd0,1)
But I re-read manual and its supposed to be only for drive swapping so I deleted it

heres a simple grub section after
1) qtparted made target partition a fat32 on (hd0,1) aka /dev/hda2
2) image put on using knoppix partimage
3) /boot/grub/menu.lst file amended as below with new entry

title hda2
hide (hd0,0)
unhide (hd0,1)
rootnoverify (hd0,1)
makeactive
chainloader +1

PS being lazy I just imaged the w98 I had recently put onto (hd1,0)

This is not an ad for knoppix, you can use sysrescd or toms root and boot disk etc
 
Old 05-07-2004, 07:31 PM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
heres my final edit on BIOS way, I won't be able to do the IMAGE way or any better way for some time. Not that many people have read this.

Preamble

Code name "The BIOS TECHNIQUE"

You have 2 drives and want Microsoft on the second drive. B4 attempting this yourself, be aware you do so at your own risk. Linux is Trade Marks to Linus Torvalds and Microsoft or Windows is Trade Marks to Microsoft Corporation. This is for GRUB users only.

If others know a smarter way please post a reply. If those attempt this post, fail to understand this post, feel free to post a reply. If your BIOS is not Phoenix feel free to make suggestions. To all that I think I need to modify my post, I will edit and give you credit in the spirit of GPL.

I have one IDE drive jumpered as a master on controller 1 and one drive jumpered as a slave on controller 2. I assume your preferred boot is /dev/hda partitions. Be aware this technique may not work if you have both drives on the same controller. If this fits your setup and you use GRUB I have will post alternatives, in the fullness of time.

Issue any commands in " " without typing " but press enter at end of command.

# step 1 research your BIOS
Find out how to get into and alter your BIOS. Write down all settings in case you have to reset to factory defaults and work back to your favourite settings. Hopefully you will only have to make my suggested changes. I have a Phoenix Bios. If you don't have a mobo cd or Bios manual you may need to go on the net and do some research. I have an intel mobo. To get into my bios I press F2 before the hard disk starts. I also have the Intel splash turned off so I can already see what the bios detects.

I have heard that some need to press the DELETE or DEL key to get into their bios.

# step 2 notice what your bios currently says about your 2 drives b4 changes are made
On boot the bios message detects and names 2 drives.

# step 3 change bios setup (Phoenix users)
1) click on Advanced tab go to IDE config and in the section for controllers (I have 2). I note that b4 the change, it was set on "both". I use the F5 key to rotate thru the options until I have selected the secondary one. I make no changes to the actual jumpers in the computer.

2) I then go to the tab for boot and enter the option for hard drives. I note that b4 the change, I had 3 options and the order was drive 1 master then drive 2 slave and one more irrelevant option. I use F5 to move the order so its slave first.

# step 4 save the bios new settings
F10 gives option to save and quit so do so, I notice that the bios re-starts and without other tests, I can see that only one drive is detected and its the slave.

# step 5 paranoid --- test to be darn sure.
If you have one, let Knoppix cd load. I am using v3.2. I press F2 to use command knoppix lang=us desktop=icewm (lower case). Then click on a terminal and issue command su (no password is needed to change user to root) then command partimage". Because I am in root mode, I can see what Partition Image thinks of my setup. It detects only hdc1 hdc2 etc where as b4 the bios changes it also had hda1 hda2 etc showing up.

So I have independently confirmed bios sees only drive 2.

# step 6 insert W98 cd and reboot
This failed for me as it was already a non-bootable reiserfs linux format drive. But if you have a new drive you may not have to worry about step 7.

# step 7, if W98 can't handle the drive
If step 6 fails for you, as it did for me, I rebooted into Knoppix cd similar to step 5 but instead of typing partimage afer su I typed qtparted. This starts a graphical partition tool, I clicked on hdc1 and deleted it. I then clicked on the space for hdc1 and clicked on the create icon near the spanner icon and created a fat32 primary partition. You can change the sizes in qtparted but thats another issue.

# step 8 W98 cd should now boot & install sequence starts.
Windows users know what happens next.

# step 9 regain drive 1
(A) go into bios setup and use step 3 (1) to F5 both controllers as preferred option
(B) F10 to save and as soon as bios starts go back into bios setup
###### We needed to save this change as step 3 (2) would not allow me to see my drive 1. The save and re-start did.
(C) So now go to step 3 (2) but re-order drive 1 then drive 2 then your other options, if any.
(D) F10 to save the bios settings

# step 10 reboot and watch
Reboot should show 2 drives detected by bios and your first drives MBR starts etc. (No W98 starts)

# step 11 edit your /boot/grub/menu.1st file

add some lines, copy and paste if you like

title windows
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

####### explaination

W98 sits on /dev/hdc1 ( aka C drive) Grub says that is (hd1,0)
rootnoverify says don't try to mount this partition but execute the next command etc
map says what you think is drive 1 is now drive 2 and what was drive 2 is now 1
makeactive says if this was not yet bootable make it so
chainloader says don't try to boot this DEAR GRUB, but let whatever that partition has use its OWN bootloader to complete the boot.

# step 12 Reboot and test each boot option.
Done.
 
  


Reply



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
GRUB Directives for Booting W98 Systems RJEmery Linux - Newbie 2 04-19-2005 08:29 AM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
boot after install with GRUB on boot drive EECGeek Linux - Newbie 1 03-17-2005 10:04 AM
Do I Install w95, w98,xp to the same drive letter or ... bluedevlx Linux - Newbie 15 10-06-2004 08:46 PM
FC2 install on 2nd drive, no dual-boot, will install modify 1st WinXP drive at all? Equisilus Fedora - Installation 14 06-27-2004 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:22 PM.

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
Open Source Consulting | Domain Registration