[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create floppy image with grub.cfg in specified location

From: Y. Fei
Subject: Create floppy image with grub.cfg in specified location
Date: Sat, 14 Aug 2010 07:10:52 -0700 (PDT)


I installed both Debian squeeze and Windows XP on physical partitions. It works 
fine when I start up the linux from real PC. Sometimes I also want to start up 
the same Linux in Windows VMWare (from physical partition) for convenient, then 
I am in trouble.

I want to start Linux in Windows VMWare using a different grub.cfg. But 
grub-rescue/grub-setup etc will always boot the system to default 

Debian or Grub2 with version of six months ago has a script "grub-mkfloppy". I 
did some simple changes on the script and then the script can create a floppy 
image with my customized grub.cfg by adding below lines,
    cat `dirname $0`/mygrub.cfg >> ${aux_dir}/boot/grub/grub.cfg

Recently I upgrade debian, and maybe including the grub2. The script is missed. 
I checked google and were told the successor is `grub-rescue'. Then I trid to 
re-create the floppy image, because the old floppy image will always load old 
vmlinuz. I tried many many ways, even to hack the grub-rescue script, but it 
does not work.

Anyone knows the approach? My purpose is to create a floppy image. When being 
loaded, the MBR uses the grub.cfg in specified location, e.g. inside floppy 
image or some places that it can address.

The version of linux kernel,
    Linux bardle 2.6.32-5-686 #1 SMP Sat Jul 24 02:27:10 UTC 2010 i686 GNU/Linux

Below are some grub version,
    grub-script-check (GRUB) 1.98+20100710-1
    grub-mkimage (GRUB) 1.98+20100710-1
    grub-setup (GRUB) 1.98+20100710-1
    grub-install (GRUB) 1.98+20100710-1
    grub-mkrescue (GRUB) 1.98+20100710-1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]