Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: w32grub.exe question

  1. #1
    Junior Member registered user
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    23

    w32grub.exe question

    garyng has kindly contributed directions for using ntldr to dual boot into
    the poor man's HD Knoppix copy of the cd image using grub.

    The directions are at http://www.skyjammer.com/files/knoppix

    My question is what exactly does w32grub.exe do to "patch" the necessary files?

    Thanks!

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    A little background on how these loaders work(including LILO).

    1. BIOS load the first 512 byte of a boot DISK's MBR and jump to the code there
    2. The MBR code either find the active partition and load the first 512 byte and jump there(standard DOS MBR) or would execute its own code(LILO/GRUB).
    3. Because 512 byte is too small for any meaningful code, LILO/GRUB needs to find where the rest of the code is by reading the disk sector number(s) of the rest which is being 'stored' in the specific location in that 512 byte(this is what is done when you run lilo/GRUB on linux)

    w32grub does the last operation. It read the GRUB file (stage2, the guts is here) and create the sector number arrays and stored back to it(first sector of that file). It also stores the first sector number of stage2 into the specific location in stage1.

    The result :

    1. NT loader load stage1 and jump to it(stage1 code takes over)
    2. stage1 load the first sector of stage2(information provided by w32grub)
    3. using that information, load the rest of stage2 then jump to it(stage2 takes control which is what GRUB really is).

    LILO operates in a similar fashion but since LILO doesn't understand file system(yes the loader doesn't, only the installer does), it has everything(including menu info) stored in its 'stage2' equivalent.

    I switched to GRUB because it is more flexible as I only need to run it once and then can change my partition/configuration as many times as I like, which is not the case in LILO. But there is some nice feature in LILO that makes it better for servers stored in a locked room.

  3. #3
    Junior Member registered user
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    23
    I understand the basics of booting-
    BIOS loads the MBR which in turn, in my case, loads ntldr.

    ntldr gives a choice of boot sectors.

    However, following your clear and complete directions, the stage1,
    stage2 method does not bring up the grub promt. (Interestingly, before running w32grub, I got the grub prompt but it did nothing. After running w32grub, the system simply reboots itself completely. I assume it was supposed to offer the items in the menu.lst)

    Also, after booting KNOPPIX with a floppy to the hd-based installation I have on /dev/hdb3, I tried to install lilo. First I made /mnt/hdb3 writable. Then I edited the lilo.conf file to change the boot = /dev/hdb3. I also set root=/dev/hdb3. I then ran /sbin/lilo. But after warning that the boot sector was beyond the BPB (BIOS Parameter Block), it had a fatal error since it could not create /boot/map~. Just for fun I tried to dd the bootsector to a file but got the same bytes as I had before I tried the lilo install.

    I realize you say you are running the iso image from a hard drive and booting with ntldr. So if you can add any more info that would be great.

    I think Jorge has also done a lot of work here. Also, if anyone has successfully followed the directions in the HdBased HowTo section 1.1, I would appreciate hearing about it. It is one of the harder howtos to follow for a newbie such as myself.

    Thanks K-Team all around.

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    If you have installed GRUB before, you don't need w32grub at all as all you need to do is just grab that 512 byte from wherever you installed it.

    Back to w32grub, the problem you described seems to be a bug to me. Can I see the output of what w32grub produce ?

  5. #5
    Junior Member registered user
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    23
    I don't have grub installed. I don't want to put anything in my MBR. I am still basically an NT user and just learning Linux so Knoppix is like training wheels. I am learning a lot in the process of this effort so that makes it worthwhile, although a bit frustrating. I have heard too many sad stories about people who can't get back online after installing grub or lilo and I am going to be sure I understand what I am doing before I do anything major.

    I still want to try to install Lilo on my second drive, in the boot sector of the vfat partition, and get it to boot the HD image of Knoppix. If I could get the stage1, stage2 of grub to work, would I just have to add an entry in the menu.lst to point to the vmlinuz image in the vfat partition or would I still need to have Lilo installed?

    Anyway, I knew you would be interested in the output of w32grub so here it is:
    C:\boot\grub>w32grub
    stage1(28235679)
    version=3.2
    boot_drive=ff
    force_lba=0
    stage2_address=0x8000
    stage2_sector=28235679
    stage2_segment=0x800
    stage2(28235679+223)
    menu (hd0,0)/boot/grub/menu.lst

    Thanks for the help. I am going to do another post with the subject of the HdBasedInstall to see if any one else has tried this successfully.

    Thanks so much for the help.

  6. #6
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    The out indicates it is running fine and there shouldn't be any problem.

    Do you mean when you add c:\boot\stage1="GRUB" in BOOT.INI and select it in the boot loader, the machine immediately reboot ?

    If you don't have \boot\grub\menu.lst, the proper thing you see is the GRUB command prompt.

  7. #7
    Junior Member registered user
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    23
    Quote Originally Posted by garyng
    Do you mean when you add c:\boot\stage1="GRUB" in BOOT.INI and select it in the boot loader, the machine immediately reboot ?
    Initially, I just copied the boot folder to my C: drive and added
    c:\boot\stage1="GRUB" to the BOOT.INI file. I DID NOT run w32grub since I didn't know what that would do. Then, I rebooted, and
    selected the GRUB option. The grub command prompt displayed but
    did not respond to commands or carriage returns.

    After I read your reply about w32grub, I ran it and rebooted the machine.
    This time the grub prompt did not come up at all. The machine simply acted as if I had pressed the reset button and rebooted itself.

    Quote Originally Posted by garyng
    If you don't have \boot\grub\menu.lst, the proper thing you see is the GRUB command prompt.
    I have only the menu.lst that you included in your xip distribution.

    Any further ideas?

  8. #8
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    Quote Originally Posted by socalgail
    Quote Originally Posted by garyng
    Do you mean when you add c:\boot\stage1="GRUB" in BOOT.INI and select it in the boot loader, the machine immediately reboot ?
    Initially, I just copied the boot folder to my C: drive and added
    c:\boot\stage1="GRUB" to the BOOT.INI file. I DID NOT run w32grub since I didn't know what that would do. Then, I rebooted, and
    selected the GRUB option. The grub command prompt displayed but
    did not respond to commands or carriage returns.

    After I read your reply about w32grub, I ran it and rebooted the machine.
    This time the grub prompt did not come up at all. The machine simply acted as if I had pressed the reset button and rebooted itself.

    Quote Originally Posted by garyng
    If you don't have \boot\grub\menu.lst, the proper thing you see is the GRUB command prompt.
    I have only the menu.lst that you included in your xip distribution.

    Any further ideas?
    That is an miracle that you can see the prompt without patching it as it relies on specific sector numbers to find stage2

    After you run w32grub and boot, have you seen something like loading stage2 at the top of the screen ?

    Another thing is, try to delete the menu.lst and see if at least you see the prompt.

  9. #9
    Junior Member registered user
    Join Date
    Jul 2003
    Location
    San Diego
    Posts
    23
    No, it doesn't show any text on the monitor and starts to reboot after about 3 seconds. I am going to go back to the HdBasedHowTo and play
    around some more. I think there is a lot to be learned just from going
    through this process. I am interested in the ins and outs of booting.

    Once I have this working with Lilo, I will maybe try with grub once more.

    Thanks again.

  10. #10
    Junior Member
    Join Date
    May 2005
    Posts
    1
    wow, googled, searched, scoured, and this is where I ended up. I have this exact problem...

    I have had Knoppix, Auditor, Kanotix, XP, 2K, and Server 2003 all booted/loaded with GRUB, GRUB being in the MBR...
    Now I wish to boot XP, 2K, and Whoppix booted/loaded with GRUB, GRUB being on the first NTFS partition and loaded by NTLDR
    Code:
    My Setup:
    (primary) (ntfs) hda(0,1) - Windows XP Media Center 2005
    (primary) (ntfs) hda(0,2) - Windows 2000 Pro
    (primary) (ntfs) hda(0,3) - My Documents
    (logical) (ext3) hda (0,5) - Whoppix 2.7
    (logical) (swap) hda(0,6) - Linux Swap
    (logical) (ntfs) hda(0,7) - Downloads
    I multiboot using the default NTLDR, right now just XP and 2K

    I have installed Whoppix, but did not install lilo to the MBR.

    my boot.ini looked like
    Code:
    [boot loader]
    timeout=5
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Media Center Edition" /noexecute=optin /fastdetect
    multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows 2000 Professional" /fastdetect
    I downloaded w32grub and set it up
    • ran c:\boot\grub\w32grub.exe
      added "c:\boot\stage1="GRUB Stage 1"" to boot.ini
      configured c:\boot\grub\menu.lst
    my menu.lst:
    Code:
    # Boot automatically after a minute.
    timeout 60
    
    # By default, boot the second entry.
    default 1
    
    # Fallback to the first entry.
    fallback 0
    
    title Windows XP
    unhide (hd0,0)
    rootnoverify (hd0,0)
    chainloader +1
    
    title  Whoppix
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.11 append="ramdisk_size=100000 init=/etc/init lang=us apm=power-off nomce quiet"
    initrd /boot/initrd.img
    I rebooted and when the boot menu comes up, I select Whoppix...
    Goes to blank screen, and the computer restarts in 3 sec.

    I'm not sure if my menu.lst is configured corectly for my distro, but I thought grub would at least load up, anyone know whats wrong?

    ----------------

    [EDIT]
    Quote Originally Posted by xlinuxp
    then copy linux26 and miniroot.gz to c:\boot
    found at http://knoppix.tnc.edu.tw/modules/ne...d=1435&forum=3
    Might I try this?

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 07-09-2005, 04:40 PM
  2. Grub settings, quick question... really my last question :p
    By mark1221 in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 11-01-2003, 10:32 PM
  3. Failed poor man's install with w32grub on NTFS
    By baldyeti in forum Hdd Install / Debian / Apt
    Replies: 7
    Last Post: 08-14-2003, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Seagate ST1000VM002 1TB 5900RPM 3.5

Seagate ST1000VM002 1TB 5900RPM 3.5" SATA 6GB/s HDD Video Hard Drive PC DVR

$24.99



Samsung T7 Shield 1TB Portable External SSD USB 3.2 Black MU-PE1T0S NEW SEALED picture

Samsung T7 Shield 1TB Portable External SSD USB 3.2 Black MU-PE1T0S NEW SEALED

$219.99



Samsung T9 1TB External Portable SSD MU-PG1T0B -2000MB/s - Black picture

Samsung T9 1TB External Portable SSD MU-PG1T0B -2000MB/s - Black

$179.00



Dell Latitude 14

Dell Latitude 14" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro

$375.05



Netac 1TB M.2 2280 Internal SSD PCIe Gen3.0x4 NVMe Solid State Drive PC Laptop picture

Netac 1TB M.2 2280 Internal SSD PCIe Gen3.0x4 NVMe Solid State Drive PC Laptop

$129.99



Acer Aspire 14

Acer Aspire 14" AI Copilot+PC Laptop Core Ultra 5 226V Gen 4 ARC 16GB 1TB Refurb

$438.51



1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive picture

1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive

$86.95



Acer Aspire 16 16

Acer Aspire 16 16" Laptop Core Ultra 5 226V S2 16GB RAM 1TB SSD Arc Refurbished

$533.51



Lenovo Thinkpad E15 15.6

Lenovo Thinkpad E15 15.6" Laptop i5/i3 8GB RAM Up to 1TB SSD HDD Tested Working

$136.55



Dell Latitude 14

Dell Latitude 14" Laptop Computer Intel i7 Up To 32GB RAM 1TB SSD Windows 11 Pro

$429.73