LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Dual Boot USB Thumb drive? (https://www.linuxquestions.org/questions/linux-general-1/dual-boot-usb-thumb-drive-943075/)

SeRi@lDiE 05-03-2012 06:41 AM

Dual Boot USB Thumb drive?
 
I am trying to make a usb thumbdrive have two partitions and be able to boot out of both of them for installs.

For example I need to be able to kickstart machines for RHEL installs and to be able to install Windows Vista as well. On the linux side all is fine. I make a small 512MB Fat32 partition install grub and I am able to kick start just fine. But how do I make the second partition for the vista install bootable? No matter what I do grub fails to chain to the second partition so I can start the install.... Any ideas?

TIA!

mdlinuxwolf 05-03-2012 04:03 PM

Generally M$ installs from a DVD. Get an external DVD drive if you don't have one. Windows has an attitude like "my way or the highway". According to the fair use Eula you can make one backup disc. Besides, you need the activation code from the DVD box for Vista anyway.

jefro 05-03-2012 05:28 PM

This should work.

There is a Microsoft web page on making a bootable usb, perfectly legal and very useful to use as a way to repair or install. http://technet.microsoft.com/en-us/e...ng-a-usb-stick

My guess is that the first install of windows would still have a bcd. Try to edit that later to add in linux.

Otherwise might have to try stuff like grub4dos or grub to boot to an iso image.

TobiSGD 05-03-2012 05:31 PM

Quote:

Generally M$ installs from a DVD.
All Windows version from XP upwards (OK, for XP you have to modify the bootloader, which can be done with a Microsoft tool, AFAIK) can install from USB. DVD only is simply wrong.

@SeRi@lDiE: How exactly are you putting the Vista-installer to DVD? what exactly are the problems with grub?

mdlinuxwolf 05-04-2012 02:39 AM

Windows can work with USB drives, but they aren't as reliable. K.I.S.S.

I have heard that they are buggy and not reliable. Ask yourself why a thumb drive and not a disk? Heck, unetbootin won't even make PC-BSD or Solaris boot.

Just use the Windows DVD or CD to install windows. If you are setting up a netbook, use an external DVD drive. Chances are you will use it again with a netbook anyway.

TobiSGD 05-04-2012 04:28 AM

Quote:

Originally Posted by mdlinuxwolf (Post 4670035)
Chances are you will use it again with a netbook anyway.

I can't remember since when USB drives are one time solutions. The OP specifically says that he want it on USB for convenience to do more of one install.

mdlinuxwolf 05-04-2012 05:50 AM

You can ghost DVDs or even entire hard drives to do many installs at once. Discs cost a LOT less then thumb drives too. I did this at a previous job. I easily rolled out 50 to 100 machines per day. Of course I had access to a ghost server as well. If a machine gave us trouble with that, out came the DVDs.

TobiSGD 05-04-2012 06:10 AM

Quote:

Originally Posted by mdlinuxwolf (Post 4670170)
You can ghost DVDs or even entire hard drives to do many installs at once. Discs cost a LOT less then thumb drives too. I did this at a previous job. I easily rolled out 50 to 100 machines per day. Of course I had access to a ghost server as well. If a machine gave us trouble with that, out came the DVDs.

In which way is that related to the OP's question?

SeRi@lDiE 05-04-2012 07:52 AM

Thank you all for the response, ideas, and help. This for work. The Windows install are custom roll outs of the customer.
Here is what I do....

Partition the thumb drive, format to Fat32, install grub in one partition, copy our custom windows install to the second partition, edit grub to point to the install partition.

When I try to boot to the install partition grub complaints that the partition is not a bootable partition which is right is not.

How can I make the windows install bootable? I was told that in order for me to do this I have to make the windows partition first boot and than make the second partition linux.

Thoughts?

TobiSGD 05-04-2012 07:55 AM

Is on the second partition a custom Windows installation or a copy of the install DVD?

SeRi@lDiE 05-04-2012 08:03 AM

Quote:

Originally Posted by jefro (Post 4669770)
This should work.

There is a Microsoft web page on making a bootable usb, perfectly legal and very useful to use as a way to repair or install. http://technet.microsoft.com/en-us/e...ng-a-usb-stick

My guess is that the first install of windows would still have a bcd. Try to edit that later to add in linux.

Otherwise might have to try stuff like grub4dos or grub to boot to an iso image.

Thanks for the link. The only thing I am doing different from this video is that I am doing all the partitioning on linux and it shouldn't be any different.

SeRi@lDiE 05-04-2012 08:05 AM

Quote:

Originally Posted by TobiSGD (Post 4670271)
Is on the second partition a custom Windows installation or a copy of the install DVD?

TobiSGD,

Is a custom windows install that I have load it on an external usb HDD which works ok from there. I copied the content of that external hdd and copied it to the usb thumb drive.

TobiSGD 05-04-2012 08:36 AM

Bootmgr, the bootloader for Vista and newer Microsoft operating systems is a multi-stage bootloader.
It is separated in three stages:
Stage 1: The part in the MBR, that can easily be replaced with Grub. This stage loads the first sectors of the system partition, which contain stage 2 and execute them.
Stage 2: The part in the first sectors of the system partition. This part of the bootloader has file-system drivers for NTFS and searches for a file called bootmgr and runs it.
Stage 3:Bootmgr. This program reads \Boot\BCD, displays the menu and checks the disk for their ID (bytes 440-443 of the MBR). If the ID is not the ID of the disk with the original install bootmgr throws a "winload error" and stops booting.

So you have two problems:
1. If you have only copied the files to USB then you are missing stage 2.
2. Most likely the USB will not have the same ID as the original disk.

To fix 1. you can try to run the rescue console from the Vista DVD, log in to the installation on USB and launch
Code:

bootrec.exe /fixboot
I don't know if this will work, but that is the only fix i can think of.
To fix 2. just copy the ID of the original disk to the USB, either with dd or a hex-editor.


All times are GMT -5. The time now is 07:42 PM.