PDA

View Full Version : Knoppix3.8 Windows dual boot from HDD. To have a boot menu?



deepak_abc
06-21-2007, 07:33 PM
Hi,

I am looking for installing Knoppix 3.8 and Windows 2000 on a single disk and have a boot menu as I boot from the hdd.
Can anybody suggest what needs to be done for this?

What I did

I installed Windows on the machine. I used FAT 32 for windows. Left some space unclaimed by Windows. Created Linux,FAT32 and swap partitions in ths unclaimed space.
Booted the knoppix cd. I have installed knoppix from the cd.

The partitions created are:-
Windows FAT32
Linux ext3
Swap 1 gb
FAT32 blank partition created through Knoppix cd size 1 gb.

Windows is the active partition. I have installed the MBR in Linux partition.
When I boot the machine without cd Windows boots.
When I boot with Knoppix cd, I cant mount the Linux partition and the Windows partition and am able to see the Knoppix and Windows files.

JohnnyH
06-22-2007, 09:10 AM
... I have installed the MBR in Linux partition...
It looks as if what you may actually have done was to choose installation of the Boot Loader into the Partition instead of into the MBR.
This would work if you have an independent boot manager to put in the MBR e.g. SmartBootManager or GAG Boot Manager (you could find these free downloads on the Web ;) ).

However if all you are going to put on the machine is the Knoppix and Windows it would probably be most convenient to re-install Knoppix, this time choosing to install the Boot Loader into the MBR. The installer should detect your Windows and put it in the boot-up menu for you :)

deepak_abc
06-22-2007, 10:41 AM
I have installed the MBR in Linux partition...
It looks as if what you may actually have done was to choose installation of the Boot Loader into the Partition instead of into the MBR.
This would work if you have an independent boot manager to put in the MBR e.g. SmartBootManager or GAG Boot Manager (you could find these free downloads on the Web ;) ).

[quote]


Thanks Johnny. But I read many posts that if I chose to install the Boot Loader in the MBR then my system will become unbootable. Neither Windows nor Knoppix will boot. Have you tried your solution out and does it work?

Rather than reinstalling I should be able to mount the partition, copy the boot loader with dd and copy it on to the MBR.
As a precaution I have to save a copy of the MBR before I overwrite the MBR and restore this copy if something is messed up. Any idea how to do the above things? I am not new to Unix and have tinkered with unix for many years.

Other posts were to use and configure GRUB. But I didnt find any readymade solution with GRUB with my scenerio. If things go wrong then the only way out is to reinstall Windows and Knoppix. I am not looking at poor man's installtion of Knoppix but a proper installation with boot options.

JohnnyH
06-22-2007, 12:42 PM
... But I read many posts that if I chose to install the Boot Loader in the MBR then my system will become unbootable. Neither Windows nor Knoppix will boot. Have you tried your solution out and does it work? ...
I have never had any trouble doing this using Knoppix or DamnSmallLinux for example.
If you did have a problem you can always restore the Windows MBR operation by fdisk /mbr from your Windows disk or e.g. a DOS boot disk.


...Rather than reinstalling I should be able to mount the partition, copy the boot loader with dd and copy it on to the MBR.
As a precaution I have to save a copy of the MBR before I overwrite the MBR and restore this copy if something is messed up. Any idea how to do the above things? I am not new to Unix and have tinkered with unix for many years...
I think that you will find you get into much greater complications if you try to do it this way ;) there is more than just copying involved...
If you have a strong reason for keeping your original Knoppix installation on the partition, it would be simpler and more 'future-proof' to use a dedicated Boot Manager.

kirol
06-22-2007, 01:32 PM
Windows is the active partition. I have installed the MBR in Linux partition.
If the linux partition is a primary one, you should only need to mark it as active (instead of the windows one). I can't remember for sure if 3.8 installed grub or lilo, but you should see startup entries for both OSs.

deepak_abc
06-28-2007, 08:12 PM
I made the linux partition active but still I dont get the boot menu. When I made the partition active it does not boot eveen from Linx.

kirol
06-30-2007, 08:04 PM
Please post the output of "sfdisk -l /dev/hda" so we can see your partition table. This assumes an IDE primary master disk, adapt if needed (e.g. I think it would be sda for STAT...)

deepak_abc
07-02-2007, 12:53 PM
Please post the output of "sfdisk -l /dev/hda


We have hdc instead of hda. Here is the output:-
root@ttyp0[knoppix]# sfdisk -l /dev/hdc

Disk /dev/hdc: 4870 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdc1 * 0+ 3441 3442- 27647833+ c W95 FAT32 (LBA)
/dev/hdc2 3850 4869 1020 8193150 83 Linux
/dev/hdc3 3723 3849 127 1020127+ 82 Linux swap
/dev/hdc4 3596 3722 127 1020127+ b W95 FAT32

deepak_abc
07-02-2007, 03:44 PM
At present if I boot frm Knoppix 3.8 cd and mount the Linux and Windows hdd partitions I can see the files in these partitions. I am unable to boot from Knoppix Linux even after making the Linux partition active.
I am able to boot Windows from the HDD at present. First I should be able to boot knoppix from hdd.


I feel that I have to learn and configure grub for the boot menu which will prompt me for WIndows or Knoppix option.

TopFarmer
07-02-2007, 08:41 PM
IF you want a GRUB boot menu, you must install it in the MBR not the linux partition.
As 'JohnnyH' posted, I use a third party boot loader.


I am unable to boot from Knoppix Linux even after making the Linux partition active More info. , any error codes or just what happens?

deepak_abc
07-03-2007, 06:43 AM
More info. , any error codes or just what happens?

When I make the linux partition active it gives only 4 4 4 on screen when I try to boot from Knoppix 3.8. There is no other error message.Then I make the Windows partitin active and it boots from Windows.

So should I reinstall Knoppix and write the boot information in MBR instead of the Linux cd?

kirol
07-03-2007, 08:41 AM
So should I reinstall Knoppix and write the boot information in MBR instead of the Linux cd?
Your partition list shows that linux is installed to a primary partition (hdc2). Te default (MS) MBR branches to the 1st primary partition marked active, just like it does for windows. Since this is not working, I suspect grub has not been properly installed. The knoppix installer is sadly only half-heartedly supported. OTOH, I once had 3.8 installed to HD and working. Anyway, you don't have to re-install the whole OS, just the boot loader(grub). I suggest you boot to command-line mode (knoppix 2), then:
# mount /dev/hdc2 /media/hdc2
# grub-install --root-directory=/media/hdc2/boot /dev/hdc2
This will install grub to your linux partition. (You may have to use /mnt instead of /media, I can't remember for sure with 3.8). There should now be a non-empty /media/hdc2/boot/grub/menu.lst file or something's wrong. You need to mark hdc2 as the unique active primary partition (e.g. with cfdisk), then you can reboot. If it still doesn't work, you may want to install to the MBR: simply use hdc instead of hdc2 at the end of the grub-install line above.

deepak_abc
07-03-2007, 11:39 AM
This will install grub to your linux partition

The machine is at home and I have to try it at home whereas I am in office now. I feel grub may be installed on the Linux partition. I will mount it ans use the find command. I am a unix admin so am familiar with this stuff.

I will also have to configure grub by knowing where the kernel and the init files are located. e.g. If the location is as follows then the grub commands would be as shown in the quotes.



The partition containing the kernel = /dev/hda1, or (hd0,0) in grub-speak

Within that partition, the directory path and filename of the kernel = /vmlinuz-i686-up-4GB
(Remember, /dev/hda1 is mounted directly to /boot, so it contains the kernel directly)

The partition containing /sbin/init is /dev/hda9

In that case, here are the grub commands you would input to boot that system:


grub> root (hd0,0)
grub> kernel /vmlinuz-i686-up-4GB root=/dev/hda9
grub> boot


So I feel that I have to locate the relevant informationm like the kernel name, location of /sbin/init and the name of the root . Root name would be root (hd0,1) I guess.

deepak_abc
07-04-2007, 12:14 PM
#mount /dev/hdc2 /mnt/hdc2
# grub-install --root-directory=/mnt/hdc2/boot /dev/hdc2

I ran the above commands and the result is as follows:-

I installed Grub on Knoppix 3.6. I got the following output.(took almost 20 mins to get this error)
grub-install --root-directory=/mnt/hdc2/boot /dev/hdc2Probing devices to guess BIOS drives. This may take along time.The file /mnt/hdc2/boot/boot/grub/stage1 not read correctly.

The file /mnt/hdc2/boot/boot/grub/stage1 exists. I checked it

Then I ran find command from /dev/hdc2 to search for grub. This is what I got. So I feel that grub is installed. But what next now?


root@ttyp0[hdc2]# find . -name "grub*" -print


./boot/boot/grub
./lib/grub
./sbin/grub
./sbin/grub-floppy
./sbin/grub-install
./sbin/grub-md5-crypt
./sbin/grub-reboot
./sbin/grub-terminfo
./usr/share/doc/grub
./usr/share/man/man8/grub.8.gz
./usr/share/man/man8/grub-floppy.8.gz
./usr/share/man/man8/grub-install.8.gz
./usr/share/man/man8/grub-md5-crypt.8.gz
./usr/share/man/man8/grub-reboot.8.gz
./usr/share/man/man8/grub-terminfo.8.gz
./usr/share/vim/vim63/syntax/grub.vim
./var/lib/dpkg/info/grub.list
./var/lib/dpkg/info/grub.md5sums

kirol
07-04-2007, 01:57 PM
The file /mnt/hdc2/boot/boot/grub/stage1 exists. I checked it

Then I ran find command from /dev/hdc2 to search for grub. This is what I got. So I feel that grub is installed.
Yet it doesn't boot yet, does it? This is not a riddle, see, we can only help on the basis of information you provide.

Something's fishy if it took grub so much time to install - I've never seen this. Also, you should have /boot/grub, not/boot/boot/grub. Perhaps that's my fault and a result of the --root-directory argument; try omitting the "boot" suffix from it (just using the mount point) - or omit the argument entirely and pay attention to possible error messages. Review the /boot/grub/menu.lst file to see if it contains entries for windows and linux.

BTW, this shouldn't be a factor, but why is your disk connected to the secondary controller?

deepak_abc
07-05-2007, 11:11 AM
Yet it doesn't boot yet, does it? This is not a riddle, see, we can only help on the basis of information you provide.



I am sorry that I didnt say that Knoppix did not boot. But there was no change and I again got a screen of 4 4 4 4 ....for half a screen. There was no change after installing grub. I have downloaded Knoppix 5.0 and will be formatting the present Knoppix partition and install 5.0 on th HDD. I shall also try with the following command as per kirol's suggestion.

# grub-install --root-directory=/mnt/hdc2/ /dev/hdc2

deepak_abc
07-13-2007, 05:08 AM
I changed the configuration of the system.

My configuration is as follows:-
/dev/hda1 Windows xp
hda7 Knoppix version 5.0 partition 8 gb
hda8 swap 600 mb
hda9 fat32 600 mb so that it will be accsible both from Knoppix and Windows.

I installed boot loader in hda7 and not in mbr. I did not install grub in the mbr because windows also may stop booting if something goes wrong.knoppix-installer ran successfully. I saw a dialogue grub is being installed.
After installing I made hda7 active but knoppix does not boot.

I tried to install Knoppix 5.1 on the hdd but the knoppix-installer script did not run susccessfully. It gave error "can not mount /mnt/hdinstall" read only file system.

I feel the problem is this:-
First I need to make Knoppix bootable from hdd without bothering about boot menu for XP and Knoppix.

I have to configure grub so that it gives me a menu to boot Windows from hda1 or knoppix from hda7.
If I install boot loader in mbr, will there be any problems in booting xp? How to restore boot partition of xp in case something goes wrong and I need to revert back?[/b]

TopFarmer
07-14-2007, 02:52 AM
I have to configure grub so that it gives me a menu to boot Windows from hda1 or knoppix from hda7 That can only be done if GRUB is installed into the MBR.


After installing I made hda7 active but knoppix does not boot hda7 is an extended volume and is not bootable from the bios. To boot to an extended volume one must have a specially written MBR, GRUB's MBR boot code will along with some other third party boot managers, but Microsofts MBR code will not do so.


If I install boot loader in mbr, will there be any problems in booting xp? if it is installed correct there will be no problems. (I can not tell you how, limited knowlege)

You can use a third party boot manager as posted by JohnnyH .


How to restore boot partition of xp in case something goes wrong and I need to revert back? IF you have a MS XP cd (not a recovery cd) , you would boot into the Recovery Console and run FIXBOOT. FIXBOOT rewrites the MBR's boot code. Or if you have a floppy drive you can use MBRWORK and make a backup of MBR before installing GRUB, then restore the saved file. You can also use linux's DD command to do the same.

deepak_abc
07-14-2007, 08:18 AM
What I did was simple just reinstalled Knoppix and let it write the boot record in the MBR. It didnt disturb the Windows booting and I am getting a boot menu as desired. I did not install boot record as per Johnny's advice and hence spent many hours at the screen with wife shouting . But the + point is I read all about grub, made my own menu, studied recovery process in case Windows MBR is disturbed. Really no gains withiut any pains.

Thanks to JohnnyH, topfarmer, kirol it is working. Thanks to all the Guys. :D

deepak_abc
07-14-2007, 09:35 AM
The Kdm desktop does not come up when I boot from the disk. It says starting kdm and then the screen blinks and I get a login prompt. The m,essage is xdm is not default.


The Graphical desktop was coming up. But then I tried to lock the computer and the screen just went blank. Not knowing how
to come out, I switched off the machine. Since this time the above problem has started.

deepak_abc
08-08-2007, 03:05 AM
Grub Gurus,

I had xp and knoppix 5.0 set up as a dual boot from a single hard disk. Then I tried to install knoppix games cd in another partition. While setting this up I overwrote the grub partition and was left with error 17 while booting. Neither knoppix or Windows would boot. So I recovered the windows mbr and windows comes up fine now.

My Knoppix partition is intact with all files in place.Now how do I install the grub in MBR?

I had deleted a partition and made an ext3 partition when I boot from the knoppix games cd and run knoppix-installer I do not get this as the choice to install the OS. It offers to install the OS in my Knoppix 5.0 partition, so if I go ahead the 5.0 partition would be overwritten with Games partition whereas I want games as another bootable partition. Or does it mean that I cant have 2 Knoppix bootable partition in the same disk drive?