Jump to content











Photo
- - - - -

Chainloading Grub4dos & Syslinux between FAT32/NTFS partitons


  • Please log in to reply
15 replies to this topic

#1 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 02 July 2010 - 01:31 PM

Hi,

Just wondering if whats brewing in my mind is possible and hoping for some tips and advice.
(was going to post this in the sardu forum but felt it seemed more relative to generic syslinux question in the end, sorry if it's not)


Currently I have managed to compile a few different projects together, namely generic multiboot (with SARDU) mixed in and also multipartioned USB-HDD with multiple versions of windows installers etc.
So what started out as a little USB key with a few of my most utilities has turned into a MASSIVE USB-HDD with everything I could ever need in my IT job in one location. Awesome!

Now I just need to tweak it abit.........

Currently not happy having SARDU and my own Multiboot data all living together on one partition and chainloading between G4D & Syslinux. So I have a new plan. Since I discovered multipartioning I thought this could be the answer to what I want to achieve. here we go......

1. OBJECTIVE
On my USB-HDD have SARDU "contained" within it's own separate FAT32 partiton which can be chainloaded from the main grub4dos partition. And back again.

2. METHODOLOGY ( :cheers: )
-Create the "logical" fat32 partiton in some free space I have within an "extended" partition using a reputable partitioning tool (simple enough).

-Then run "geometry (hd0)" in the G4D command line to see what part number the new SARDU partiton has been given lets say for examples sake it 8 aka (hd0,8).

-Then get the sardu data ported across and sat in its own partition.

-Then set GRUB4DOS to chainload to SARDU within the new partition, with I'm hoping exactly this command

title SARDU
root (hd0,8)
chainloader (hd0,8)/boot/isolinux/isolinux.bin || chainloader +1


3. PROBLEMS & QUESTIONS
The main grub4dos booting partition is NTFS. Syslinux doesn't like NTFS as far I can gather (I know when I was experimenting with it wouldn't let me make an ntfs partiton bootable: "zero fat sectors")

So issue number one is getting syslinux to chainload back to G4D on a NTFS partition - can I infact do this?

Also would this new partition need to been set as syslinux bootable or could I just create a syslinux_bootsect.bin file and chainload to that instead so I dont mess the G4D data up. Or even worry about that at all?

Also if it is possible what would the syntax need to look like in the syslinux menu?
Chainloading between sys & g4d on the same partition worked well for me with the following

LABEL -
MENU LABEL Technotikas Multiboot
MENU INDENT 1
TEXT HELP
This entry will bring you to Technotikas Multiboot
ENDTEXT
BOOT /boot/grub/grldr

...what I need to add to get it to go back to (HD0,1) and then invoke the G4D menu again?

Thanks guys ! :cheers:

#2 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 02 July 2010 - 01:53 PM

-Then set GRUB4DOS to chainload to SARDU within the new partition, with I'm hoping exactly this command

title SARDU
root (hd0,8)
chainloader (hd0,8)/boot/isolinux/isolinux.bin || chainloader +1

When you don't use a CD, trying to chainload ISOLINUX is silly (read: will never succeed). Adapt to:
root (hd0,8)

chainloader ()+1

So issue number one is getting syslinux to chainload back to G4D on a NTFS partition - can I infact do this?

If you installed grub4dos to the partition itself (not the MBR), you can chainload the partition with chain.c32 of SYSLINUX.
LABEL boot_grub4dos_PBR

MENU LABEL Boot GRUB4DOS (PBR) on first primary partition

COM32 chain.c32

APPEND hd0,1
You also can copy the grldr file to the SYSLINUX partition and do:
LABEL boot_grub4dos_grldr

MENU LABEL Boot GRUB4DOS (grldr) on first primary partition

COM32 chain.c32

APPEND hd0,1 file=/grldr
Using chain.c32 to chainload grldr is better than using "BOOT /grldr".
When you use chain.c32 and specify a hard disk and partition number, it will force grub4dos (root partition is set to that partition) to search for its menu.lst file on that partition first. "BOOT /grldr" doesn't do that. It only passes the boot drive number to grub4dos.

If you use syslinux-4.00, use grldr=/grldr instead of file=/grldr.
See http://git.kernel.or...c405915afc5e64b why.

Also would this new partition need to been set as syslinux bootable or could I just create a syslinux_bootsect.bin file and chainload to that instead so I dont mess the G4D data up. Or even worry about that at all?

If you install SYSLINUX in a different partition than grub4dos, using a syslinux_bootsect.bin file is not needed. You need it in the case when you install SYSLINUX and GRUB4DOS to the same partition (= grub4dos not in the MBR but in the PBR).

#3 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 02 July 2010 - 02:06 PM

Great stuff, think I should just about nail it with all that info - I'll give it a shot this w/e

thanks you very much! :cheers:

#4 Technotika

Technotika

    Frequent Member

  • Advanced user
  • 419 posts
  • Location:United Kingdom
  •  
    United Kingdom

Posted 02 July 2010 - 06:28 PM

Worked perfect - thanks!

Used file method with grldr on syslinux partition!!!
:cheers:

#5 Killerdog

Killerdog
  • Members
  • 4 posts
  •  
    France

Posted 19 July 2011 - 07:20 PM

hi, everybody

i try to do something like this but with xboot (tools like saardu):

all my tools in a FAT32 partition with syslinux, and a second partition in NTFS for all my windows Disk for installation purpose, and a live windows 7 with some tools (in a VHD format).
i need it in NTFS because the size of the iso and VHD (4.5Go per windows disk and a 30Go VHD image for the live windows 7)

I can't find exactely how i need to do to make it works,

send a command (in syslinux.cfg) with syslinux to go to the second partition and launch grub4dos so i can launch win live/install, and go back to syslinux partition for the rest of the tools.

Can you help me please ?

Thanks in advance

#6 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 19 July 2011 - 07:48 PM

The grldr file needs to be on the Syslinux partition:
LABEL boot_grub4dos_grldr

MENU LABEL Boot GRUB4DOS (grldr) on second primary partition

COM32 chain.c32

APPEND hd0,2 file=/grldr

To go back to Syslinux from grub4dos on the second partition:
title Boot Syslinux on partition 1

root (hd0,0)

chainloader (hd0,0)+1


#7 Killerdog

Killerdog
  • Members
  • 4 posts
  •  
    France

Posted 19 July 2011 - 08:32 PM

Thanks for your answer

wen i chain grub in syslinux i've got the grub menu, but when i try to launch my win 7 vhd with this command :


title win 7 usb

map (hd0) (hd1)

map (hd1) (hd0)

map --hook

chainloader (hd0,0)+1

rootnoverify (hd0,0)


i've got this message :


Booting Win 7 USB



floppies_orig=0, hardrives_orig=1, floppies_curr=0, hardrives_curr=2

map (hd1) (hd0)



Error 21: selected disk does not exist



Press any key to continue...





when i try to go back to syslinux i've got this message

Booting Boot Syslinux on partition 1

Filesystem type is fat, partition type 0x0B

Parition table not recognized(boot_drive=0x80, err=1). boot



Error 43: The BPB hidden_sectors should not be zero for a harddisk partition boot sector



Press any key to continue...


have any ideas ?

if i understand the thing, i need to have on the FAT partition syslinux installed with in the root of the drive the grdlr file and a menu.lst, is this OK ?

It is possible to launch a command on this fat partition to launch a file (bootmgr for the win 7 vhd; *.iso to launch setup) that be on the ntfs partition ?

Thanks

Edited by Killerdog, 19 July 2011 - 08:34 PM.


#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 July 2011 - 08:50 AM

It's strange, from the reports you are using a boot device (USB stick?) improperly partitioned/formatted.
grub4dos detects only one hard disk and syslinux sees that the BPB has no "sectors before".
HOW (and with which tool) did you partition/format the USB stick (or whatever)?

:cheers:
Wonko

#9 Killerdog

Killerdog
  • Members
  • 4 posts
  •  
    France

Posted 20 July 2011 - 11:53 AM

i format the hdd with gparted.
it's a 150 Gb external disk.
make a first partition in fat and a second in ntfs, after that, going into windows and launch xboot tools to put all the command in syslinux into the fat partition.

Copy all the file for the win 7 live usb (vhd file and other) into the ntfs partition so this partition look like this:


M:\7USBEditionByiMortaluz.vhd

M:\CLONE Windows 7 USB Drive Edition.exe

M:\Boot\BCD

M:\Boot\cs-CZ

M:\Boot\da-DK

M:\Boot\de-DE

M:\Boot\el-GR

M:\Boot\en-US

M:\Boot\es-ES

M:\Boot\fi-FI

M:\Boot\Fonts

M:\Boot\fr-FR

M:\Boot\hu-HU

M:\Boot\it-IT

M:\Boot\ja-JP

M:\Boot\ko-KR

M:\Boot\memtest.exe

M:\Boot\nb-NO

M:\Boot\nl-NL

M:\Boot\pl-PL

M:\Boot\pt-BR

M:\Boot\pt-PT

M:\Boot\ru-RU

M:\Boot\sv-SE

M:\Boot\tr-TR

M:\Boot\zh-CN

M:\Boot\zh-HK

M:\Boot\zh-TW

M:\Boot\cs-CZ\bootmgr.exe.mui

M:\Boot\da-DK\bootmgr.exe.mui

M:\Boot\de-DE\bootmgr.exe.mui

M:\Boot\el-GR\bootmgr.exe.mui

M:\Boot\en-US\bootmgr.exe.mui

M:\Boot\en-US\memtest.exe.mui

M:\Boot\es-ES\bootmgr.exe.mui

M:\Boot\fi-FI\bootmgr.exe.mui

M:\Boot\Fonts\chs_boot.ttf

M:\Boot\Fonts\cht_boot.ttf

M:\Boot\Fonts\jpn_boot.ttf

M:\Boot\Fonts\kor_boot.ttf

M:\Boot\Fonts\wgl4_boot.ttf

M:\Boot\fr-FR\bootmgr.exe.mui

M:\Boot\hu-HU\bootmgr.exe.mui

M:\Boot\it-IT\bootmgr.exe.mui

M:\Boot\ja-JP\bootmgr.exe.mui

M:\Boot\ko-KR\bootmgr.exe.mui

M:\Boot\nb-NO\bootmgr.exe.mui

M:\Boot\nl-NL\bootmgr.exe.mui

M:\Boot\pl-PL\bootmgr.exe.mui

M:\Boot\pt-BR\bootmgr.exe.mui

M:\Boot\pt-PT\bootmgr.exe.mui

M:\Boot\ru-RU\bootmgr.exe.mui

M:\Boot\sv-SE\bootmgr.exe.mui

M:\Boot\tr-TR\bootmgr.exe.mui

M:\Boot\zh-CN\bootmgr.exe.mui

M:\Boot\zh-HK\bootmgr.exe.mui

M:\Boot\zh-TW\bootmgr.exe.mui

M:\iMortaluz\bcdedit.exe

M:\iMortaluz\bootsect.exe

M:\iMortaluz\bootsectx64.exe

M:\iMortaluz\by.iMortaluz

M:\iMortaluz\imgburn.exe

M:\iMortaluz\iMortaluz.iso

M:\iMortaluz\iMortaluz.mbr

M:\iMortaluz\mbrwiz.exe

M:\iMortaluz\mbrwiz64.exe

M:\iMortaluz\vhd.dll

M:\iMortaluz\VhdResizer.exe

M:\iMortaluz\wget.exe

M:\NST\AutoNeoGrub0.mbr

M:\NST\menu.lst

M:\NST\NeoGrub.mbr

M:\NST\plop.iso



#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 July 2011 - 12:04 PM

Well first thing you seem like using Neogrub and not grub4dos :cheers:, but in any case, either remove menu.lst or press "c" to get to command line, then issue these commands:
find (
press [TAB].
Which devices you see listed?
Like:

Possible disks are: fd0 hd0 hd1 rd cd


If you see both hd0 and hd1 type:
geometry (hd0)
[ENTER]
geometry (hd1)
[ENTER]
And post results.

WHICH one is the actual 150 Gb external disk?
Let's say it is (hd0).

Issue:
root (hd0,0)
[ENTER]
root (hd0,1)
[ENTER]
And post results.

It is possible that if you boot to syslinux and from it you chainload grub4dos somehow the USB disk is lost?

Try (temporarily) to install grub4dos (and NOT Neogrub) as "main" bootmanager and try again the above commands.

:cheers:
Wonko

#11 Killerdog

Killerdog
  • Members
  • 4 posts
  •  
    France

Posted 20 July 2011 - 06:50 PM

thanks for your help, i find my mistake

i have a old grub version with the latest one it's ok

i have the menu.lst on the fat partition, not in the ntfs one.
i change this code too

title win 7 usb

map --hook

chainloader (hd0,0)+1

rootnoverify (hd0,0)

so now it's working,

thanks again

P.S : the neogrub is not in use (it come with the win 7 usb package)

#12 ito pedalracer

ito pedalracer

    Member

  • Members
  • 35 posts
  •  
    Barbados

Posted 17 September 2011 - 10:33 AM

hi, everybody

i try to do something like this but with xboot (tools like saardu):

all my tools in a FAT32 partition with syslinux, and a second partition in NTFS for all my windows Disk for installation purpose, and a live windows 7 with some tools (in a VHD format).
i need it in NTFS because the size of the iso and VHD (4.5Go per windows disk and a 30Go VHD image for the live windows 7)

I can't find exactely how i need to do to make it works,

send a command (in syslinux.cfg) with syslinux to go to the second partition and launch grub4dos so i can launch win live/install, and go back to syslinux partition for the rest of the tools.

Can you help me please ?

Thanks in advance



Dear group members and Killerdog,


though this thread is a bit older I am deeply interested in your setup. Would be so great if you could write down again in a nut shell or a bit more detailed if you 'd
be so kind to describe what you did and excatly how.
You know, I am not so techie as most of the members here but I want to have some solutions for my PC stuff at home. Since I am interested in stuff and could make
use of it.

Yesterday I tried to boot my old PC -- Elitegroup K7S5A with AMIbios - by an old 1GB thumbdrive UFD....
Took me 2 hours to get it working!

The following format did finally work: FAT 16 and 'boot as ZIP' ... nothing else worked.
Posted Image

Eventually,
the PC recognized my UDF as floppy and booted it. Unluckily, I could not get Grub4dos working!
Missing boot helper ... error

No matter what I did. I uses the G4D installer in the tool above (which makes apropriate settings for UFD I assume) and grubinsallerGUI ... no luck

So,
I tried my luck with SYSLINUX. YES!
Worked!

Then I tool my multiboot ISO created with SARDU and copied syslinux settings to the UFD.
Got it! PC boots into syslinux menu :)

Now,
since I only no a bit about G4D I need to 'chainload' G4D and/or (since I could do from within grub ;) Plop.
G4D cause that is what I got on all my other UFD and external drives and boot drive and for me
GRUB4DOS is the greatest tool I ever stumbled upon except ZIP and NortonCommander :)


Ok,
back to the topic.
Merging your posts and ideas with my experience from yesterday I came to the point doing the same.
If I got it running I could image the boot partition. So I could always take any random UFD and perhaps HDD
and created at least two partitions on it. Onto the first goes the image and voila !

I assume since I got my stuff running yesterday with FAT 16 that this partition is highly compatible with other PCs too.
So I can take my UFD or external HDD and boot most PC.......



For this I need to know more detailed how you setup your solution.

As I understand you got a mini boot partition too. It is Fat 16 and uses Syslinux (mbr).
From within syslinux you can boot partiton 2 and partion 3 which are logical ones...
Your solution allows you to boot an Windows image. A virtual VHD. Great!!!!

moreover but here stops finally my understanding I think you said above indirectly or directly
that syslinux can this only together with g4d.
You put your VHD and other needed stuff (?) into e.g. extended logical partiton 2.
You installed Grub4dos there by installing it not into MBR (since there sits syslinux as I dig it) but
'into partiton 2'. This is what you are invoking with Syslinux and Grub4Dos takes over and boots VHD or
other more common stuff like a rescue.iso or W7_install.iso (bigger than 4 GB and therefore NTFS and no need
to split *.wim)...


All in all,
please take you a refreshing drink and explain me the way to go :)


sincerely
PR

#13 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 20 October 2011 - 01:06 PM

Icecube

Could you pls clean up your above posts code from RED staff, added by this forum soft? :) It sounds like a convenient way to boot Linux ISOs from the same USB Thumb with other ISO types bootable with Grub4DOS, but hard to figure out exact code right now.

#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 October 2011 - 01:09 PM

hard to figure out exact code right now.

Use the converter for botched html code when you find this kind of corruption in codeboxes:
http://reboot.pro/15275/

http://pastehtml.com.../b4t99xk89.html


:cheers:
Wonko

#15 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 20 October 2011 - 02:37 PM

Icecube

I wonder, whether combining Syslinux and Grub4DOS, and having 2 partitions (NTFS and FAT32) is the best way to be able to boot various ISOs, or there is a more optimal solution for that?

#16 mactepu

mactepu

    Newbie

  • Members
  • 25 posts
  •  
    Indonesia

Posted 15 November 2011 - 12:48 PM

hi...
I've using Mutlboot ISO which is use grub4dos and have manage to boot many ISO image from USB HDD (still have many errors of course)... I need some advices and also here to help...

I've put all ISO and grub.exe on partition 1 of USB HDD and and successfully boot to all installed OS...


title Boot 1st Hard Drive (/dev/sda1) <--- booting to my internal HDD (NTFS)

map (hd0) (hd1)

map (hd1) (hd0)

map --hook

chainloader (hd0)+1

rootnoverify (hd0)



title Boot 2nd Hard Drive (/dev/sdb5) <--- booting to USB HDD (NTFS)

root (hd0,4)

chainloader /bootmgr



title Boot 3rd Hard Drive (/dev/sdb6) <--- booting to USB HDD (ext4)

root (hd0,5)

kernel /boot/grub/core.img

boot

Hope my amateur code would help

Still I have unsolved problem myself... I can boot to Windows 7 ISO but when it reach the install menu, it asks for a hardware driver and cannot find any harddrives, also there are too many partition on my USB HDD, I want to reduce it...Can I install grub4dos on NTFS partition? Because if so, I can put my Windows 7 and Multiboot together on one NTFS partition or if I may doing it vice versa, installing Windows 7 on FAT32 where grub4dos installed :smiling9: :happy_dance:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users