birthdaygerma.blogg.se

Putting grub on usb
Putting grub on usb




  1. #Putting grub on usb install#
  2. #Putting grub on usb windows#

Let me finish my exams n I will sort things out.

#Putting grub on usb windows#

I have a windows vista bootloader which manages XP by default and I added Linux to it using easy BCD. But don't let this confuse you, my boot procedure is really messed up. Then in the menu.lst file, replace the drive numbers with their appropriate ones, like in my case, hd(0,9) was replaced with hd(1,9) in the case of linux booting, and hd(0,0) was replaced by hd(1,0) for the Windows Vista bootloader. Now in the grub folder, in the boot folder you made in your pendrive, you will find a file called device.map I simply interchanged the assignment of sda (the hard drive) with the sdb (the pen drive). Sudo chmod -R 777 /media/usbdisk/boot/grubĭisclaimer : What ever I did from here were my own instincts, you could follow the steps since it worked for me, even if the steps don't work, they worst case scenario would be that you mess up the GRUB you copied, that didn't ever work (But make sure it doesn't work before you mess with it) In order to allow you to make changes to all its files, type in this command in the terminal So now you need to change the grub in your pendrive to modify make this grub run. So now, if your pendrive was hd1 like it was initially in my case, it becomes hd0 when it becomes the primary hdd. You see, each time you plug in your pendrive, the hd0 and the hd1 get messed up, because the boot order changes. If you were, then I'm afraid you'd have to read on, since this is the main reason for writing this post. succeededĭo I need to tell you that you are done once it says done? Well actually, I wasn't quite done here, but if you weren't facing the problem I was, this is your exit. Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst". Running "embed /boot/grub/fat_stage1_5 (hd0)". yesĬhecking if "/boot/grub/fat_stage1_5" exists. yesĬhecking if "/boot/grub/stage2" exists. Now to write the stage1 of the GRUB onto the boot sector of the USB, which would be different in your caseĬhecking if "/boot/grub/stage1" exists.

#Putting grub on usb install#

Now that I know the hdd and partition name (hd0,0) in my case which would be different in your case, we need to specify the grub we need to install in the MBR by: Now you don't want to rewrite your MBR when there is not the need to do so, do you? If you see more than one partitions, chances are this is not your flash drive, check out the next one that showed up, until you have found the one that you are sure is your pendrive. Okay, since I have set my pendrive as number hdd1, this is it. Partition num: 0, Filesystem type is fat, partition type 0xb Type inĭrive 0x80: C/H/S = 3, The number of sectors = 7987200, /dev/sdb Now to check out which of the hard-disks is the pen drive. This is what the output should look like, What this command did was that it looked for a file called stage1 (which I know exists in the grub directory) and reports where all it found it. In order to do so, type in the following in the GRUB prompt. Now we need to find where all the GRUB exists. You will notice that the GRUB prompt (GRUB>) appears. Now, there is a need to activate the GRUB prompt, to do so simply type Sudo cp -r /boot/grub /media/ drive_name /boot Now you have to copy your grub to the boot directory you created. Of course, needless to say, you'd have to replace drive_name with the name your drive is mounted with. Or simply execute the following command in your terminal. Make a folder called boot in the root directory of the pen drive. Plug in the drive and make sure it has a file system, format it if it doesn't. After all, it takes a mere 170KB, I could install a regular OS in this thing (4GB pen drive). I could have probed the matter a bit more, but then I decided to install a GRUB in my pen drive. I couldn't locate it neither in the motherboard manual, nor in the BIOS itself. I did try looking for a way to disable USB booting, but to no avail. Now you might say I could simply set the SATA drive as the preferred hard disk for booting, but once you remove the drive, and the BIOS detects that it is missing, it no longer keeps a track of the flash drive, plug it in another time and it tries to boot from the flash drive. Unfortunately, each time I plugged it in, the flash drive became the default hard disk, since it apparently had priority over SATA disks for booting. As this was intended to be a pen drive and not an MP3 player, it supported USB booting. About a month ago, I finally bought a flash drive (a 4GB one) for myself, to replace the antique 256MB MP3 player.






Putting grub on usb