LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Creating the ultimate Grub2 setup: Windows installer + Live, Linux installer + live + (https://www.linuxquestions.org/questions/linux-general-1/creating-the-ultimate-grub2-setup-windows-installer-live-linux-installer-live-813544/)

todda7 06-13-2010 11:47 AM

Yes I'm looking forward to receiving my jump drive so I can get cracking.

saikee 06-13-2010 07:08 PM

OK I have managed to put a Vista installer into the USB jump drive but that take up almost 3 Gb and the installer only works with primary partition so far.

I am working on putting the second Windows installer which is a Win7-32bit. In theory we should be able to put 3 MS installers in as long as they support the USB.

Grub is easy as I put it in a logical partition sda6.

todda7 06-14-2010 02:58 AM

How do you plan to load Grub? Is in in the MBR which chainloads each bootmgr installer?

saikee 06-14-2010 03:19 AM

One can put Grub inside any partition of the Pen drive. Also Grub can be fired up from a floppy, CD, DVD or a partition from any hard disk.

todda7 06-14-2010 06:58 AM

Yes even though you can put Grub anywhere, I guess you have to have it in the active primary partition for it to load (first) on boot?

saikee 06-14-2010 08:03 AM

No

I can boot up Grub from a floppy and go from there.

saikee 06-14-2010 05:16 PM

Managed to put Vista-32, Win7-32, Vista-64 and Win7-64 installation DVD copied onto logical partitions sda5, sda6, sda7 and sda8 of a USB disk.

Only Vista-32 boots but by Grub which fires up the installer.

The other 3 complained with an error message of

"Reboot and select proper boot device or insert Boot Media in selected Boot device and press a key"

It sounds the later bootmgr does not like to find itself in a logical partition.

AFAIK bootmgr always resides in an active primary partition.

saikee 06-15-2010 02:41 AM

After all these years I now discover MS Xp to Win7 do not support multi partitions in a USB flash drive. The partitions can be created in Linux but the MS systems only mount the first one.

Any Vista and Win7 installation DVD can be copied onto a flash drive. By doing a "bootsect.exe /nt60 f:" will make the f: drive, with the installation files inside, "chainloadable" by Grub. There is nothing to it except all these installers work only with the first partition in the USB flash drive.

Grub1 and Grub2 can boot up these installer fine.

Actually Grub only boot up the bootsector code of that partition. The boot sector code then load boomgr. It appears if bootmgr does not find a BCD to boot an installed system it fires up the installer automatically. It is also possible the installations files has a BCD pointing to the installer.

The only way to get over to multiple partitions for MS Windows installers is to use a USB hard disk which is not looked upon as movable disk by the MS systems.

todda7 06-15-2010 04:13 AM

If I understand you correctly: You was able to load only the bootmgr on the first partition, and therefore only 1 instalation DVD, or could you have 1 Win installation DVD on each primary partition and chainload each one with Grub?

Would it be possible to have several Windows installation DVDs copied into subfolders, and configure bootmgr to load the Windows installers from subfolders?

THank you for your time, your insight is very valuable.

EDIT: Since Grub loads first loads the bootsector which loads the bootmgr, would it be possible to create a command or something to trick the bootsector so that for example sdb2 (3rd active partition) actually was sdb0 (1st active partition)? E.g make the partition you boot appear as the first one on the drive.

EDIT2: This topic is getting more and more interesting!
There seems so be workaround for making Windows think that the jump drive is a USB hard drive.
The question remains - even though you IN Windows can't detect multiple USB jump drive partitions - is bootmgr able to do so? I know that Windows 98 is able to detect multiple partitions on USB jump drives.
Interesting links:
http://www.damnsmalllinux.org/f/topic-3-37-18335-0.html
http://channel9.msdn.com/forums/Coff...B-Flash-drive/
THIS SEEMS TO BE A WORKAROUND:
http://anhblog.net/pc-place/multi-pa...ve-in-windows/

saikee 06-15-2010 04:27 AM

A USB flash is looked upon as a "Super floppy" that can only have one partition according to MS web sites. The information in the Internet confirmed none of the MS Windows can pass this point or rather none of them has been engineered to read beyond more than one partition.

You can copy several MS Windows installers into different partition in the USB by Linux. However when the USB flash drive is presented to a MS Windows or installer it sees only the first one!

I am checking the possibility of tricking the installer to ignore the 1st and mount the 2nd partition.

Like I mentioned earlier MS Windows do not see a USB external hard disk the same way as a movable flash drive. May be there is life in it for your project.

todda7 06-15-2010 04:34 AM

Yes, it seems like "hard modding" the jump drive into thinking it's a Hard drive is the best way to go, or to do some hacking with GRUB. If this http://anhblog.net/pc-place/multi-pa...ve-in-windows/ trick works (with bootmgr also) it would be the best as 1) I can copy the Win installers not just from Linux but also from Win and 2) the partitions will be recognized on all Win computers, not just 1.

saikee 06-15-2010 06:35 AM

Well you can do it from the hardware side by flipping the RMB.

With the software approach I have discovered that the MS Windows only loads the "first" partition of the USB it recognises. That first partition can be any of primaries as I have the 3rd partition mounted when I hide the first two. So may be there is opportunity to accomplish your tasks after all.

Looks like this is one of those

"If it is technically possible then there will be ways in Linux"

todda7 06-15-2010 06:54 AM

How do you get Grub to hide the other primary partitions on boot?

If there's a will - there's a way.

saikee 06-15-2010 08:04 AM

Grub1 has a command called "hide" and another one called "unhide".

If you want to hide the 1st partition and unhide the 2nd partition of the 1st disk it is just
Code:

hide (hd0,0)
unhide (hd0,1)

The hiding only change the partition number to fool the MS operating systems that the partition is foreign so it would be mounted. Linux work with hidden partitions because in Linux a user can decide which partition to mount or unmount.

Partition Tupe 6, c and 7 are for Fat16, fat32 and NTFS filing systems

When hidden the Tpe numbers become 16, 1c and 17. Nothing is altered in the partition. The type number is a byte inside the 16-byte partition table describing each partition.

todda7 06-15-2010 08:32 AM

Is it possible to have these commands automaticly "lauched" when booting a certain option in the Grub menu?
And have you found out if it's possible to boot Windows installers from subfolders (e.g many in each primary partition)?
EDIT: And I guess this eliminates the need for making the jump drive look like a harddrive?


All times are GMT -5. The time now is 09:33 AM.