help, editing grub and graphics card not conf. in suse 10

Discussion in 'Open Source' started by Akhil Jain, Jul 29, 2006.

Tags:
Thread Status:
Not open for further replies.
  1. Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    i have win 98 , win 2000 & win xp on my pc and i recently install open suse 10

    the grub screen at starting shows these options

    suse 10
    windows
    failsafe
    ----------------------------

    and selecting windows will take u to the old known menu with 3 options
    win xp
    win 2000
    win 98
    ---------
    i do not want this second menu , instead i want all 3 on grub screen
    as shown below

    --------------------------------------------------------
    microsoft windows xp ( this one as default after 15 count on timer)
    win 2000
    win 98
    suse
    failsafe
    ------------------------------------------------------------
    also i want no other menu such as second window menu and i want my grub password protected...
    means if anyone touches my pc , he has to boot in xp and cannot boot in other operating systems....

    i have 2 harddisk 160 gb seagate as master and 40 gb samsung as slave
    on 40 gb slave i have 2 partitions
    fat 32 for win 98 --- 15 gb
    ntfs for xp--------rest space

    on 160 gb primary disk
    fat32 for win 2000 ---10 gb
    ntfs------------------20
    fat 32----------------20 (i will soon convert it in ntfs for storing dvd images)
    fat 32---------------25 (films)
    fat 32---------------25 (songs)
    fat 32---------------25( games)
    and the rest was utilised for suse 10

    the NTLDR and BOOT.INI file r on C drive which is the one having win 2000 on it....
    friends , i think i have made my point clear ,,,, please help me
     
  2. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    Here goes...

    You cannot have grub take you directly to windows. It can only pass the baton on to ntldr, which will then take you to windows. ergo, you must go through the ntldr black menu, if you have more than one windows. There is no way out.

    Although you cannot restrict someone to booting only XP (They will be able to access your other windows), you can stop them from accessing linux.

    For password protecting grub, listen carefully:

    You must be able to edit the file /etc/grub.conf . Open it up in an editor of your choice. You must have root privileges.

    At the same time, open up a terminal, and type the following:
    Code:
    $ /sbin/grub-md5-crypt
    
    It will give you a prompt for a password. Type whatever password you want, retype it, and keep the resulting MD5 checksum safe.

    Go back to your text editor with grub.conf. For each operating system that you want password protected, do this:

    below the title line, add the line "lock", followed by "password --md5 <password hash>" on the next line, so that your suse entry might look like this:

    Code:
    title SUSE Linux 10
          lock
          password --md5 <password-hash>
          ...
    
    Remember to replace <password-hash> with the hash you got before!

    There's one last thing you have to do. Just below the timeout line in grub.conf, enter "password --md5 <password-hash>" again. If you don't do this, someone might easily remove the lock statement in the grub command line.
     
    Last edited: Jul 29, 2006
  3. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    ok password section clear but can i donot link windows by chain loading.....i have heard that linux grub can chainload any operating system
     
  4. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    It can chainload the respective loader, not the OS itself. You can chainload only NTLDR, not windows itself (unless you have only one windows)
     
  5. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    but if i delete the NTLDR and then chainload 3 remaining os independentally???
     
  6. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    That won't work. Windows believes that it's the only OS on the computer. Thus, it takes some shortcuts. You need NTLDR if you want windows. Period.
     
  7. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    r u 100 % sure that there is no option left ?/, i mean not a single way
     
  8. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    It is impossible to be 100% sure. I've tried this for a long time, and have found that it is not possible. I cannot help you further.
     
  9. JGuru

    JGuru Well-Known Member

    Joined:
    Dec 25, 2005
    Messages:
    1,705
    Likes Received:
    32
    Trophy Points:
    48
    Location:
    Space-time continuum
    GRUB transfers the control to the Windows loader (ntldr). Which in turn brings
    you the menu to choose 'Windows 98, Windows 2000, Windows XP'. You can't
    load Windows 98 or XP straight away from GRUB!!@Sykora is absolutely right.
    You can't do that.
     
  10. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    Thank you for the confirmation JGuru. It has to do with the way Windows absolutely refuses to interface with anything other than ntldr.
     
  11. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    i was searching on net , when i found following tutorial but i can't make it to work as i can't make a grub bootable floopy... please help!!!!
    atleast now i am sure that ( by this way or that way) that can be done .......
    --------------------------------------------------------------------------2. Installation procedure
    2.1 Preparing boot floppies
    You will need 3 floppy disks. Make the first floppy a DOS bootable disk. Copy fdisk.exe and sys.exe onto this floppy disk.


    FORMAT /S A:
    COPY FDISK.EXE A:
    COPY SYS.EXE A:


    Use your second floppy disk to make a Windows 98 emergency disk. You will use the third floppy for GRUB shortly.


    2.2 Installing linux
    Install your favorite distribution of linux. You will need to use fdisk to partition your hard disk. Calculate ahead of time how much disk space each of your operating systems will take.


    Here is how I partitioned my hard disk:


    Device Boot Start End Blocks Id System
    /dev/hda1 1 6 48163+ 16 Hidden FAT16
    /dev/hda2 7 19 104422+ 16 Hidden FAT16
    /dev/hda3 20 593 4610655 1b Hidden Win95 FAT32
    /dev/hda4 594 3737 25254180 5 Extended
    /dev/hda5 594 848 2048256 6 FAT16
    /dev/hda6 849 2123 10241406 7 HPFS/NTFS
    /dev/hda7 2124 2140 136521 82 Linux swap
    /dev/hda8 2141 2523 3076416 83 Linux


    My first partition is for booting Windows 2000. 10MG should be plenty to do that. This partition will only contains the file necessary to boot NT such as boot.ini, ntldr, ntdetect.com, etc... NT will reside in partition 6 in my example. This partition is Hidden FAT16.


    The second partition is for DOS. I deemed 100M sufficient. This is FAT16 too


    The third partition is for Win9x. I gave it 5G and made it FAT32 for performance.


    Next create the extended partition for the remaining of your hard disk. This shows up as partition 4 on fdisk.


    Create a 2GB partition. This partitions is used to share data between all operating systems. Make sure that all the sum of all above partitions are less than 8GB. This is a DOS limitation.


    Next create your Windows 2000 partition. I gave it 10G since this breed of windows is a bloated pig. I made it a HPFS/NTFS partition for speed.


    Next add your swap partition and linux partition. Make sure you do not have a separate partition for /boot. Things look better in GRUB if you keep /boot in the root partition.


    After you have installed linux go ahead and format the fat16 partitions:

    mkdosfs /dev/hda1
    mkdosfs /dev/hda2
    mkdosfs /dev/hda6


    2.3 Installing GRUB
    Make sure you have the latest version of GRUB. I am using version 0.5.96.1. The version that came with my distribution was out of date and gave me a lot of grief. You can download the latest version at http://www.fsf.org.


    Now you'll want to install GRUB on the floppy disk. You don't want to install it on the hard disk yet because Windows 2000 will overwrite it.


    grub-install '(fd0)'


    Create the following menu.lst for GRUB. This file lives in /boot/grub.


    #
    # Sample boot menu configuration file
    #

    # Boot automatically after a minute.
    timeout 60

    # By default, boot the second entry.
    default 1

    # Fallback to the first entry.
    fallback 0

    title Windows 2000
    unhide (hd0,0)
    hide (hd0,1)
    hide (hd0,2)
    rootnoverify (hd0,0)
    chainloader +1
    makeactive

    # For booting Linux
    title Linux
    root (hd0,7)
    kernel /boot/vmlinuz-2.2.17 root=/dev/hda8 video=matrox:vesa:261

    title Windows 98
    hide (hd0,0)
    hide (hd0,1)
    unhide (hd0,2)
    rootnoverify (hd0,2)
    chainloader +1
    makeactive

    title DOS 6.22
    hide (hd0,0)
    unhide (hd0,1)
    hide (hd0,2)
    rootnoverify (hd0,1)
    chainloader +1
    makeactive

    # For booting Linux
    title Linux (single user)
    root (hd0,7)
    kernel /boot/vmlinuz-2.2.17 root=/dev/hda8 video=matrox:vesa:261 single

    title Partition 2 (floppy)
    hide (hd0,0)
    unhide (hd0,1)
    hide (hd0,2)
    chainloader (fd0)+1

    title Partition 3 (floppy)
    hide (hd0,0)
    hide (hd0,1)
    unhide (hd0,2)
    chainloader (fd0)+1



    Check that you can boot linux with the floppy disk. If you are having trouble you can drop in GRUB's command line and figure out what is going on. GRUB is very well documented, if you have any trouble please take a look at the documentation.


    2.4 Installing windows 2000:
    I had to initialize the first partition before installing windows 2000. Insert the DOS startup disk and reboot your computer. Once you get to the DOS prompt do the followings:


    FDISK /MBR
    SYS C:


    Now you can go ahead and install windows 2000. At some point Windows 2000 will prompt you for the partition on which you want to install. The partition you created with fdisk should show up as damaged or unformatted partition. Go ahead and select it.


    To hide the Windows 2000 menu edit a file called boot.ini that should be in the C: drive. Change the timeout value from 30 to 0.


    [boot loader]
    timeout=0
    default=multi(0)disk(0)rdisk(1)partition(1)\WINNT
    [operating systems]
    ...


    2.5 Installing DOS.
    Insert the GRUB disk. When you see the menu insert the DOS boot disk. Select partition 2 (floppy) from the menu.Hit enter. This will boot the floppy disk and hide partition 1 and 3.


    Run FDISK and check that the C: drive is partition 2. Next install DOS:


    SYS C:


    2.6 Installing Windows 98
    Insert the GRUB disk. When you see the menu insert the Windows 98 Emergency disk. Select partition 3 (floppy) from the menu.Hit enter. This will boot the floppy disk and hide partition 1 and 2.


    Run FDISK and check that the C: drive is partition 3. Next install Windows 98:


    SYS C:


    2.7 The final touch
    Test that everything is working from GRUB:


    You should be able to boot from all 4 operating systems from the GRUB floppy disk.


    If everything looks right you can go ahead and install GRUB on your hard disk. From linux type:


    grub-install /dev/hda


    You should now be able to boot all 4 operating systems from the GRUB menu. Enjoy!



    --------------------------------------------------------------------------------
     
  12. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    I see. It uses grub on a floppy. Either way, it is going to cause you a great deal of grief. You must answer the question of whether or not you are willing to wipe your whole hard disk and start again, or keep the inconvenience of the one extra menu.

    Even if you are willing, it is not certain that everything will work to plan.

    As I understand it, it installs grub on a floppy disk, and each time it installs a windows, it treats it like it's the only windows there. Finally it copies the grub on the floppy to your hard drive.

    My advice is that it is not worth it, unless you are seriously paranoid of someone booting into anything but windows XP. You have already blocked linux access, if you disable guest accounts, nobody will be able to access the other windows anyway.
     
  13. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    i have no data on my harddisk...i have installed windows and linux just 2 days ago...even i had not installed drivers except for my dsl modem...
    so i cud take risk
     
  14. Sykora

    Sykora I see right through you.

    Joined:
    Sep 10, 2005
    Messages:
    597
    Likes Received:
    4
    Trophy Points:
    0
    Location:
    Chennai
    I don't see how you can make it work without a grub bootable floppy. Let me think a bit.
     
  15. OP
    OP
    Akhil Jain

    Akhil Jain New Member

    Joined:
    May 13, 2005
    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rohtak
    yes, i have had to make a bootable grub floppy first...
     
Thread Status:
Not open for further replies.

Share This Page