grub

How should I configure grub for booting linux kernel from a USB hard drive?

I have a laptop hard drive in an external enclosure which I use as a large pendrive. For an added twist, I have installed Linux on it, so I can boot any machine with my distribution of choice (e.g. for data recovery or repairing a b0rked system or just using a borrowed laptop without destroying the preinstalled Windows). The problem is t...

How do I get grub to boot Windows from a second hard drive

I normally boot into Linux using grub so have linux as the first hard drive in my machine. I have Windows installed onto a second hard drive and am trying to get grub to boot it. The grub config file contains title Windows rootnoverify (hd1,1) chainloader +1 makeactive but it does not work. ...

Grub and getting into Real Mode (low level assembler question)

I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub. Anyways the question boils down to - Does anybody know how to get back into real mode without having to get ri...

Making GRUB automatically boot the kernel

I am currently writing a kernel, and in an attempt to actually run it, I've decided to use GRUB. Currently, we have a script to attach GRUB's stage1, stage2, a pad file, and the actual kernel itself together which makes it bootable. The only problem is that when running it, you have to let GRUB know where the kernel is and how long it ...

how to fix, GRUB error 17 problem on laptop without working CD Reader

I broke the laptop. how did I break it? I remember feeling happy about wubi. now I feel bad about wubi and everything that I did. I used the partition editor within Windows (System Tools - administration) and removed my 11 GB partition of ubuntu. This was how my laptop has been partitioned EVER since I dual booted it three or so years...

How to set up GRUB in a cloned hard disk

My PC has a hard disk at /dev/hda and boots from its MBR using the GRUB bootloader. I connected a second hard disk at /dev/hdc, formatted it and copied to it all files from my original hard disk. Now I want to make the second hard disk bootable, when it is connected as the primary hard disk (i.e. as /dev/hda). (The second hard disk has ...

How do I prevent two OSes from clobbering grub files?

I want to install Linux and OpenSolaris on the same hard disk in different partitions. I'm worried because OpenSolaris seems to actively manage the grub data when updating the OS (part of the "boot environment" feature). Is there anything I should prepare for to prevent my grub data from getting clobbered. If I later want to add anoth...

How do I debug GRUB handing on "GRUB Loading stage2..." ?

I've seen this asked a lot around on the internet, with no satisfactory answers or root cause. Sometimes it's just 'well, replace your RAID controller', or 're-run grub install', etc. I'm running into this issue on a substantially large amount of hosts as to convince me there's some non-hardware reason it's happening - but it's also no...

Does dual booting Linux and Windows Vista require special treatment?

I'm planning to install Linux on a computer that is currently running Windows Vista. Vista needs to remain functional after the install. I've been reading and it sounds like Microsoft changed the way Vista boots compared to previous versions of Windows. Preferably, I'd like to use GRUB to do the dual booting. Is there anything in parti...

How do I programmatically create a bootable CD?

I'm using a barebones tutorial as the basis for an OS I'm working on, and it seems to be an older tutorial: it has be compiling the kernel down to a floppy image, and then loading it with GRUB. Basically, I still want to use GRUB, but I'd like to have my OS run from a CD instead. The main reason is that I don't actually have a real flop...

Dual booting Windows 2k3 Server and Linux MBR

I have Windows Server 2003 and Linux installed on one hard drive [on separate partitions]. My first partition is the linux boot partition, and maintains Grub. When I boot the Windows partition and shutdown W2k3 keeps modifying the MBR to boot directly, and only to the Windows partition. How do I prevent this behavior? I rather like using...

echo in a bash script changing '--md5' to '?-md5'

Hi, I'm writing a VMWare ESX automated build script and I'm falling at the last hurdle, probably as I'm really not strong at scripting. I need to secure Grub so in my script I have a like saying; echo "password --md5 password-converted-to-md5" >> /boot/grub/grub.conf This unfortunately places the following into this file; password ...

Loading different Linux Distribution each time computer starts automatically?

I have two Linux distributions (OpenSuSE, Ubuntu) installed on two different partitions. Each time i start my machine, GRUB loads up allowing me to select one of the two distributions. I don't want the GRUB to show up so I limit timeout to zero in /boot/grub/menu.lst which will most probably make my machine load OpenSuSE each time i sta...

Custom code with GRUB?

Can I run some some custom code at the time when GRUB loads up? In other words does GRUB provide a facility to run some custom code before loading any operating system? ...

Multi-Boot flashdrive with custom Grub or custom loader (make a program)

Ok guys i need help with this isuue (sorry for my english). Well i have two operating systems, very small ones. Kolibri (if you dont know it, i strongly recomend you to read about it) Kubuntu And also i have a program made in qbaisc who runs on msdos (a console program). Ok, the two OS are .iso booteable, and the program a simple ...

Compiling kernel to a binary file on mac

I was following these tutorials to make a simple kernel that I would then load using GRUB. The instructions for compiling didn't work (ld couldn't find the -T option) and when I finally got a compiled file it was in Macho format. What are the correct steps to take when compiling these files on Mac. Edit: I compiled the code on an Ubuntu ...

How do I uninstall GRUB Bootloader but keep my Ubuntu installation?

I currently have Ubuntu 9.10 and Windows 7 32bit installed with my windows bootloader being able to boot into ubuntu. I get very annoyed that Ubuntu is automaticaly selected at startup and I want to switch to my default windows bootloader and remove GRUB. How do I do this? BTW: My computer boots like this GRUB>Ubuntu OR GRUB>Windows Wi...

Using bluetooth keyboard in grub bootloader

I want to choose between several OS's during startup. How can i manage this by using my bluetooth keyboard/Cellphone or at least my IR remote? ...

Query regarding main() of GRUB

Below is the code of main() of grub. Here I want to know about this line: file = fopen(arg_v[1], "rb"); Here which file fopen is opening? What file this arg v[1] is pointing to? int main(unsigned arg_c, char *arg_v[]) { FILE *file; if(arg_c < 2) { printf("Checks if file is Multiboot compatible...

Linux installation gone wrong

Tried installing Linux(red hat 5) along with windows7. I created a new partition(10 GB in size) and used it for Linux installation. After installation, I was getting 'GRUB geom error' and my system wasn't booting. Few tries, and I had to format my entire hard disk and had to run fixmbr which came up with a warning msg "a new MBR will...