Avast Posted July 29, 2011 Report Posted July 29, 2011 Does anyone know Grub or understand programming enough to pick it up fast? I can walk you through what I'm trying to do if your interested in helping. It might also be useful for yourself sometime. Quote
Dav Posted July 29, 2011 Report Posted July 29, 2011 You might drum up more interest if you give some details on what you are trying to do. I personally do not have the skills or time.. sorry Quote
Avast Posted July 29, 2011 Author Report Posted July 29, 2011 I don't want to waste time with details if no one is interested in helping, or doesn't know grub. So I was just waiting for one of those two options before I get into detail. Besides curiosity does drum up interest. Quote
»Lynx Posted July 29, 2011 Report Posted July 29, 2011 What do you mean by 'know grub'. I use GRUB on my Arch box. Quote
Cheese Posted July 29, 2011 Report Posted July 29, 2011 why do ppl keep trying to use programming languages that arent C? Quote
»Lynx Posted July 29, 2011 Report Posted July 29, 2011 Because the GRUB developers are too pr0 for C (and apparently too pr0 for a svn that the rest of the world can understand) Quote
Avast Posted July 29, 2011 Author Report Posted July 29, 2011 (edited) I am trying to boot windows 7 from a USB stick. I am using tutorial 43. http://sites.google....ials/firawinisoYou use RmprepUSB to prepare the USB stick (format, make partition etc)Then you put Firadisk onto the USB.You put the ISO'S you want use into the ISO folder. So I used a Windows 7 ISO, and a UBCD503 ISO. ubcd is Ultimate Boot CD. Here is the website. As you can see you get all these features with it. http://www.ultimatebootcd.com/Then you use RMprepUSB to install Grub4dos, which gives you a grub file on the USB stickThen you make a text file, and you put your code into it, and name it Menu.lstI am wondering if the code they are using is accurate and works? Can someone go over this code and inform me if it can possibly be written better or if it has errors? # NORMAL HIGHLIGHT HELPTEXT HEADING in pairs consisting of foreground/backgroundcolor black/cyan blue/cyan red/light-blue red/cyan write (md)0x220+1 !BAT\necho -n -P:0000 $[0133] --- Windows install --- \0initscript (md)0x220+1 title INSTALL Windows 7 32-bit\nThis will install any edition of Windows 32-bit to your hard diskset MYISO=win7.isodd if=()/firadisk/au.xml of=()/AutoUnattend.xmlmap --mem (md)0x800+4 (99)set mm=map /ISO/%MYISO% (0xff)%mm%map (hd0) (hd1)map (hd1) (hd0)map --hookset mm=write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/ISO/%MYISO%;\n\0%mm%chainloader (0xff)/BOOTMGR || chainloader (0xff) title REPAIR Windows 7 32-bit\nThis will repair any edition of Windows 32-bit on your hard disk - choose the Repair option after selecting a country/languageset MYISO=win7.isodd if=()/firadisk/spaces.txt of=()/AutoUnattend.xmlmap --mem (md)0x800+4 (99)set mm=map /ISO/%MYISO% (0xff)%mm%map (hd0) (hd1)map (hd1) (hd0)map --hookset mm=write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/ISO/%MYISO%;\n\0%mm%chainloader (0xff)/BOOTMGR || chainloader (0xff) ### ADD MORE ISO MENU ENTRIES HERE - DUPLICATE THE TWO ENTRIES ABOVE AND CHANGE THE ISO FILENAME titleroot () title Boot from 1st Hard Disk \nBoot from MBR of first hard disk and remove the USB drivemap (hd0) (hd1)map (hd1) (hd0)map --hookchainloader (hd0)+1rootnoverify (hd0) title root () title Choose any iso file...root () title root () title INSTALL WINDOWS - Boot from any Windows ISO to install Windows\nThis menu allows you to type in the name of any Windows ISO file and boot from it# find the ISO folder by looking for a marker filefind --set-root /ISO/choose_an_isoclearecho# list all files in the /ISO folder so the user can see themls ()/ISO/echo# Ask user which iso they want (name is converted to uppercase as /u is specified)set /p /u ask=Enter iso filename WITH NO .ISO EXTENSION (e.g. Win7Pro32 ) : if "%ask%"=="" echo No iso file specified! && configfile /menu.lstclear# check if user entered a valid filename with no ISO extension!ls /ISO/%ask%.iso || echo Cannot find /ISO/%ask%.iso !!! && pause --wait=3 && configfile (bd)/menu.lstecho Loading /ISO/%ask%.iso - please wait ...#set root drive to USB stickfind --set-root /firadisk/loadiso.cmdmap --mem (md)0x800+4 (99)dd if=()/firadisk/au.xml of=()/AutoUnattend.xmlset mm=find --set-root /ISO/%ask%.iso%mm%# run the grub4dos map command and specify the iso file we want to loadset mm=map /ISO/%ask%.iso (0xff)%mm%map (hd0) (hd1)map (hd1) (hd0)map --hook# Specify the same iso file for when firadisk runs in winpefind --set-root /firadisk/loadiso.cmdset mm=write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:/ISO/%ask%.iso;\n\0%mm%chainloader (0xff)/BOOTMGR || chainloader (0xff)clear title REPAIR WINDOWS - Boot from any Windows ISO to repair Windows\nThis menu allows you to type in the name of any Windows ISO file and boot from it for a repair operation only# find the ISO folder by looking for a marker filefind --set-root /ISO/choose_an_isoclearecho# list all files in the /ISO folder so the user can see themls ()/ISO/echo# Ask user which iso they want (name is converted to uppercase as /u is specified)set /p /u ask=Enter iso filename WITH NO .ISO EXTENSION (e.g. win7pro32 ) : if "%ask%"=="" echo No iso file specified! && configfile /menu.lstclear# check if user entered a valid filename with no ISO extension!ls /ISO/%ask%.iso || echo Cannot find /ISO/%ask%.iso !!! && pause --wait=3 && configfile (bd)/menu.lstecho Loading /ISO/%ask%.iso - please wait ...map --mem (md)0x800+4 (99)#set root drive to USB stickfind --set-root /firadisk/loadiso.cmddd if=()/firadisk/spaces.txt of=()/AutoUnattend.xmlset mm=find --set-root /ISO/%ask%.iso%mm%# run the grub4dos map command and specify the iso file we want to loadset mm=map /ISO/%ask%.iso (0xff)%mm%map (hd0) (hd1)map (hd1) (hd0)map --hook# clear any memory drive contentsfind --set-root /firadisk/loadiso.cmdwrite (99) DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD\n\0chainloader (0xff)/BOOTMGR || chainloader (0xff)clear My problem is when I boot from the USB grub loads the menu. I select windows 7 install, and then I either get error 15, or error 21, and I don't know why. Here is the error list. http://www.linuxself...er/grub_13.html 15 : File not found This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK. 21 : Selected disk does not exist This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system. Of Course I have gotten Windows 7 to boot from a USB Stick already. Without FiraDisk. I just do the following. Bootable USB guide, here we assume that you are using either Vista or Windows 7 to create a bootable USB. 1. Insert your USB (4GB+ preferable) stick to the system and backup all the data from the USB as we are going to format the USB to make it as bootable. 2. Open elevated Command Prompt. To do this, type in CMD in Start menu search field and hit Ctrl + Shift + Enter. Alternatively, navigate to Start > All programs >Accessories > right click on Command Prompt and select run as administrator. 3. When the Command Prompt opens, enter the following command: DISKPART and hit enter. LIST DISK and hit enter. Once you enter the LIST DISK command, it will show the disk number of your USB drive. In the below image my USB drive disk no is Disk 1. 4. In this step you need to enter all the below commands one by one and hit enter. As these commands are self explanatory, you can easily guess what these commands do. SELECT DISK 1 (Replace DISK 1 with your disk number) CLEAN CREATE PARTITION PRIMARY SELECT PARTITION 1 ACTIVE FORMAT FS=NTFS (Format process may take few seconds) ASSIGNEXIT Don’t close the command prompt as we need to execute one more command at the next step. Just minimize it. 5. Insert your Windows DVD in the optical drive and note down the drive letter of the optical drive and USB media. Here I use “D” as my optical (DVD) drive letter and “G” as my USB drive letter. 6. Go back to command prompt and execute the following commands: 6.1. Change directory to the DVD’s boot directory where bootsect lives: d: cd d:\boot 6.2. Use bootsect to set the USB as a bootable NTFS drive prepared for a Vista/7 image. I’m assuming that your USB flash drive has been labeled disk G:\ by the computer: bootsect /nt60 g:(Where “G” is your USB drive letter) 7. Copy Windows DVD contents to USB. You are done with your bootable USB. You can now use this bootable USB as bootable DVD on any computer that comes with USB boot feature (most of the current motherboards support this feature). Note that this bootable USB guide will not work if you are trying to make a bootable USB on XP computer. This works perfectly fine, of course you are not using ISO'S you just copy every file, the whole content of windows 7 CD onto the USB disk after. I don't know how to get this method to work for UBCD503.ISO. Or to involve multiple versions of windows. Grub is good for that because it should give up 10 options, and when you pick one, it goes to the ISO. Edited July 29, 2011 by Avast Quote
Avast Posted August 1, 2011 Author Report Posted August 1, 2011 All these computer experts on ssforums, none of them know how to boot windows from USB. Come on Dezmond, I thought computers are your thing! Quote
Dr Brain Posted August 1, 2011 Report Posted August 1, 2011 You lost our interest when you tried to drum up our interest by not telling us anything. Oh, and then there's the fact that you've historically written posts demonizing us for trying to explain simple concepts to you. It certainly doesn't make helping you very attractive. See the fable about the scorpion and the frog. Sorry. Quote
dezmond Posted August 1, 2011 Report Posted August 1, 2011 I don't post, I read them! (Excluding this post!) Quote
»Lynx Posted August 1, 2011 Report Posted August 1, 2011 (edited) The idea is that you edit the file they provide (the first code block you posted) amending it so that it points to your .iso files. You don't appear to have done that ... Hint: ... title INSTALL Windows 7 32-bit\nThis will install any edition of Windows 32-bit to your hard disk set MYISO=win7.iso ... title REPAIR Windows 7 32-bit\nThis will repair any edition of Windows 32-bit on your hard disk - choose the Repair option after selecting a country/language set MYISO=win7.iso ... title Choose any iso file... root () ... find --set-root /ISO/choose_an_iso clear ... title REPAIR WINDOWS - Boot from any Windows ISO to repair Windows\nThis menu allows you to type in the name of any Windows ISO file and boot from it for a repair operation only # find the ISO folder by looking for a marker file find --set-root /ISO/choose_an_iso .. set mm=find --set-root /ISO/%ask%.iso %mm% # run the grub4dos map command and specify the iso file we want to load set mm=map /ISO/%ask%.iso (0xff) ... Also, a big hint is: # Ask user which iso they want (name is converted to uppercase as /u is specified)[/font] set /p /u ask=Enter iso filename WITH NO .ISO EXTENSION (e.g. win7pro32 ) : Enjoy the irritations of GRUB! PS: I couldn't find (or couldn't be arsed to find) the 'clear formatting' command so the font is all funky. Also, for the record creating a bootable ISO of Windows7 sounds like a terrible idea - why not create a portable Linux or something that won't have speed issues (and is designed for portability)? Edited August 1, 2011 by Lynx Quote
Avast Posted August 2, 2011 Author Report Posted August 2, 2011 (edited) Lynx when you unpack FiraDisk.zip, you get something like FiraDisk (with all their files) AutoUnattended.xml and a ISO folder. You put all your ISO's into that ISO folder.And you name them according to what Menu.lst has. I already did that, just never stated that I did. All I said was that I followed their tutorial and it doesn't work. Which means I think I did all the obvious. My ISO happens to be named Win7.ISO anyways so no editing was required. I still don't understand how even if Grub located the ISO it would unpack it? and then run the bootmngr, or setup? This whole process doesn't make sense to me. And creating a bootable ISO of windows 7? Is that what I am doing? Does that mean I need to use WAIK to edit the ISO further to make it bootable? I am trying to make windows 7 bootable from a USB stick. I was hoping not only to boot Windows 7 Professional, but maybe ultimate, both 64, and 32 bit, and to have Ultimate BOOT cd on it also. I was hoping once it's functional to use grub and make the menu pretty and add graphics. But I agree having Linux, maybe ubuntu on a USB disk would be nice. And not just bootable, but operational,. So I could insert the USB into any computer and open the Linux OS on it. However I had a hard time doing this 4 years ago. Maybe things changed, and there is more information on how to accomplish it. Edited August 2, 2011 by Avast Quote
Avast Posted August 2, 2011 Author Report Posted August 2, 2011 (edited) You lost our interest when you tried to drum up our interest by not telling us anything. Oh, and then there's the fact that you've historically written posts demonizing us for trying to explain simple concepts to you. It certainly doesn't make helping you very attractive. See the fable about the scorpion and the frog. Sorry. I didn't tell anyone because it wasn't anyone's business unless they knew grub or wanted to help. Here is a story for you, since we are teaching lessons. A friend of Socrates asked Oracle of Delphi : "Is anyone wiser than Socrates?", the answer was: "No". Socrates tried to find someone who is wiser than himself, since he denied any knowledge, among politicians poets and craftsmen. It appeared that politicians claimed wisdom without knowledge, poets could touch people with their words but did not know its meaning and craftsmen could claim knowledge only in specific and narrow fields. The interpretation of Oracle's answer might be awareness of Socrates of his ignorance. Edited August 2, 2011 by Avast Quote
Cheese Posted August 2, 2011 Report Posted August 2, 2011 why would i help anyone too dumb to know what "you're" means Quote
Avast Posted August 2, 2011 Author Report Posted August 2, 2011 (edited) your* And because a smart person would not think of things with such a narrow mind, or see the world as being so singular that it only revolves around me. Solving this problem has little benefits to me, and probably greater benefits to other people. It's always nice to have a resource of knowledge that other people can use in the future too. I'm only interested in help from smart people. I troll to find out who those people are. You failed my test when you got hung up on you're and your. Edited August 2, 2011 by Avast Quote
Cheese Posted August 2, 2011 Report Posted August 2, 2011 you failed the test of being smart good day Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.