How to Let Grub Support New NIC
Dear Sir: I want to let Grub Support NIC EE1000(intel 82540) with PXE for diskless boot, Would you please tell me what I should do? Best regards, Moore Xiao [EMAIL PROTECTED] 2003-02-18 ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
[grub #51] long delay when booting from hard disk
Reporter: [EMAIL PROTECTED] Summary: long delay when booting from hard disk Version: 0.93 Type: software bug Message: I get an unusually long delay (about 30 seconds) between loading of the stage2 and the appearance of the boot menu, when booting from the MBR of the first hard drive. My setup has Linux on an IDE disk and Windows NT on a scsi drive. GRUB has been installed on the MBR of the IDE drive. After the delay, the boot menu appears eventually and everything works as it should, I can boot Linux and chainload NT as described in the manual. When I'm using a grub floppy, the delay is two seconds at most. Interestingly, when booting from the floppy the drive identifications have changed their place. When I boot from the hard drive, the IDE disk is (hd0) and the SCSI is (hd1), with the floppy boot they're the other way around. Please send followups to [EMAIL PROTECTED]. ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
How to write MBR recursively?
Hello, I have the problem that my root-partition is mounted at /tmp/root. In a script i copy a hard disk image to this directory and now i want to write the MBR recursively to /tmp/root. How can i do this in my script? The option --root-directory doesn't work properly. grub-install also doesn't work because grub-install calls grub which set the grub variables to /sbin/grub and so grub couldn't be found. When i call the grub shell directly in my script i have the problem that this opens a subshell and all the commands after quiting the grub shell aren't executed. Any help would be appreciated. ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
Re: Question about installing GRUB
Sorry for the delayed response, regardless, I hope you find it to be of use. Dennis Chang writes: I'm trying to install GRUB onto the MBR of my system. But for now I only want one OS installed, ie. Windows. Can I do this? Yes, provided GRUB can access the filesystem where its configuration file menu.lst resides. In addition, in order to perform the install command, GRUB needs to be able to access the filesystem where its stage2 resides, and, this stage2 file must exist at boot time. My simple question should be yes however I have tried to install GRUB but I get errors. For instance, I've read (in your documentation) that stage1 loads stage2. Correct me if I'm wrong but stage2 is dependent on a GRUB supported filesystem. Thus, in my case, I should install fat_1.5 onto the sectors after the stage1. In this way I *should* have the menu.lst and the grub shell available to me at boot time? ^^ Please be aware of using the correct terminology here - the grub shell refers to the UNIX program /sbin/grub, which is an emulator for the boot time GRUB command program. What I've done is used a GRUB boot floppy to boot and run setup (hd0) from the GRUB shell. Since fd0 is root and the stage1 and stage2 files are in place it checks them, embeds a stage1.5, and installs stage1, stage1.5 and menu.lst. And I reboot with an error message, error 17. So setup embeds the stage1.5 onto your (hd0) drive, and also edits the embedded stage1.5 with the location of the stage2 file, which exists on the boot floppy, but not anywhere on any of your Windows partitions. You need to put the stage2 on some filesystem that is available to GRUB at boot time. In addition, there is no need for a stage1.5 for your situation. So you need to locate a partition with a filesystem where to store the stage2, menu.lst, and also the stage1 (for future installation flexibility). Easy - boot the GRUB boot floppy, then hit ESC, in order to get to GRUB command mode (you might have already done this in order to have run the setup command). Next, you must find a suitable filesystem for GRUB's files, here is how to do this, eg, grub root (hd |hit TAB here Possible disks are: hd0 hd1 hd2 GRUB will print the BIOS drives that it can access, then for each such BIOS drive, do the following, eg, grub root (hd0, |hit TAB here Possible partitions are: Partition num: 0, Filesystem type is fat, partition type 0x6 Partition num: 2, [BSD sub-partitions immediately follow] BSD Partition num: 'a', Filesystem type is ffs, partition type 0xa9 BSD Partition num: 'b', Filesystem type unknown, partition type 0xa9 BSD Partition num: 'e', Filesystem type is fat, partition type 0xa9 BSD Partition num: 'f', Filesystem type is ext2fs, partition type 0xa9 BSD Partition num: 'g', Filesystem type unknown, partition type 0xa9 BSD Partition num: 'h', Filesystem type is ext2fs, partition type 0xa9 BSD Partition num: 'i', Filesystem type is ext2fs, partition type 0xa9 BSD Partition num: 'j', Filesystem type is ext2fs, partition type 0xa9 BSD Partition num: 'k', Filesystem type is ext2fs, partition type 0xa9 Partition num: 3, Filesystem type is ext2fs, partition type 0x83 Partition num: 4, Filesystem type unknown, partition type 0x82 Partition num: 5, Filesystem type is ext2fs, partition type 0x83 Partition num: 6, Filesystem type is ext2fs, partition type 0x83 Partition num: 7, Filesystem type is ext2fs, partition type 0x83 Partition num: 8, Filesystem type is ext2fs, partition type 0x83 GRUB will print the partitions and filesystems that it can access. Now you need a way to copy stage1, stage2, and menu.lst (as binary files) to the appropriate filesystem. I will leave this part to your intelligence and creativity. Then, you need to execute GRUB's install command, here is the way that I do this from my menu.lst file, # Installation steps for GRUB # Entry 17:Install Grub to floppy [fd0] title Install Grub to A: [fd0] MBR - stage2 on [(fd0)/boot/grub/] root (fd0) install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/grub/menu.lst # Entry 18:Install Grub to MBR [hd0] title Install Grub to C: [hd0] MBR - stage2 on [(hd0,0)/boot/grub/] root (hd0,0) install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst So you need to replace the string boot/grub with wherever you decided to put GRUB's files. Note that this is relative to the specified root device, which in my case is (hd0,0), ie, the first partition on the first BIOS hard drive. And the stage2 file needs to be a system file, ie, Windows must be inhibited from moving it around under defrag operations, etc. And you need to remember the install commands from stanza #18 above, in order to be able to type them in manually to GRUB from its command mode,
[schizo@debian.org: Re: sed or grub-install bug?]
- Forwarded message from Clint Adams [EMAIL PROTECTED] - Date: Tue, 18 Feb 2003 01:57:06 -0500 From: Clint Adams [EMAIL PROTECTED] To: Leo Laursen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: sed or grub-install bug? +++ sed -n 's%.*- %\1%p' It's a grub bug. The offending line is: tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*- %\1%p'` I believe that this should be tmp_new_fname=`readlink $tmp_fname` - End forwarded message - -- Jason Thomas Phone: +61 2 6257 7111 Unix System Administrator Fax:+61 2 6257 7311 tSA Consulting Group Pty. Ltd. Mobile: 0418 29 66 81 1 Hall Street Lyneham ACT 2602 http://www.topic.com.au/ ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
Re: [schizo@debian.org: Re: sed or grub-install bug?]
At Wed, 19 Feb 2003 10:29:59 +1100, Jason Thomas wrote: Date: Tue, 18 Feb 2003 01:57:06 -0500 From: Clint Adams [EMAIL PROTECTED] To: Leo Laursen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: sed or grub-install bug? +++ sed -n 's%.*- %\1%p' It's a grub bug. The offending line is: tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*- %\1%p'` I believe that this should be tmp_new_fname=`readlink $tmp_fname` So, what is the bug? Generally speaking, if you don't tell me what wrong thing happens actually, I wouldn't change anything. Cheers, Okuji ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
[l.laursen@stofanet.dk: Re: sed or grub-install bug?]
here is the bug! - Forwarded message from Leo Laursen [EMAIL PROTECTED] - Date: Tue, 18 Feb 2003 07:49:22 +0100 From: Leo Laursen [EMAIL PROTECTED] To: Clint Adams [EMAIL PROTECTED] Subject: Re: sed or grub-install bug? Den 17-02 2003 kl. 06:08:58 -0500, skrev Clint Adams: sudo grub-install --root-directory=/boot /dev/ide/host2/bus0/target0/lun0/disc sed: -e udtryk nr. 1, tegn 12: Ugyldig reference \1 p? 's'-kommandos h?jreside sed: -e udtryk nr. 1, tegn 12: Ugyldig reference \1 p? 's'-kommandos h?jreside Unrecognized ls output: Not found or not a block device. (Invalid reference \1 on 's' command right side) Could you run sudo sh -x grub-install... and tell me what the sed commands it's trying are? Sure. Attached is grub.txt sudo sh -x grub-install --root-directory=/boot \ /dev/ide/host2/bus0/target0/lun0/disc grub.txt 21 Leo -- Do more than anyone expects, and pretty soon everyone will expect more. + prefix=/ + exec_prefix=/ + sbindir=//sbin + datadir=//usr/lib + PACKAGE=grub + VERSION=0.93 + host_cpu=i386 + host_os=linux-gnu + host_vendor=pc + pkgdatadir=//usr/lib/grub/i386-pc + grub_shell=//sbin/grub + log_file=/tmp/grub-install.log.1378 + img_file=/tmp/grub-install.img.1378 + rootdir= + grub_prefix=/boot/grub + install_device= + force_lba= + recheck=no + debug=no + test -x /bin/tempfile + mklog=/bin/tempfile --prefix=grub + mkimg=/bin/tempfile --prefix=grub ++ echo --root-directory=/boot ++ sed s/--root-directory=// + rootdir=/boot + test x '!=' x + install_device=/dev/ide/host2/bus0/target0/lun0/disc + test x/dev/ide/host2/bus0/target0/lun0/disc = x + test no = yes + bootdir=/boot/boot + grubdir=/boot/boot/grub + device_map=/boot/boot/grub/device.map + test -f //sbin/grub + : + test -f //usr/lib/grub/i386-pc/stage1 + : + test -f //usr/lib/grub/i386-pc/stage2 + : + test -d /boot/boot + test -d /boot/boot/grub + test no = yes + test -f /boot/boot/grub/device.map + : ++ sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' /boot/boot/grub/device.map ++ sort ++ uniq -d ++ sed -n 1p + tmp= + test -n '' ++ convert /dev/ide/host2/bus0/target0/lun0/disc ++ test -e /dev/ide/host2/bus0/target0/lun0/disc ++ : +++ echo /dev/ide/host2/bus0/target0/lun0/disc +++ sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' -e 's%\(fd[0-9]*\)$%\1%' -e 's%/part[0-9]*$%/disc%' -e 's%\(c[0-7]d[0-9]*\).*$%\1%' ++ tmp_disk=/dev/ide/host2/bus0/target0/lun0/disc +++ echo /dev/ide/host2/bus0/target0/lun0/disc +++ sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' -e 's%.*/fd[0-9]*$%%' -e 's%.*/floppy/[0-9]*$%%' -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' -e 's%.*c[0-7]d[0-9]*p*%%' ++ tmp_part= +++ grep -v '^#' /boot/boot/grub/device.map +++ grep '/dev/ide/host2/bus0/target0/lun0/disc *$' +++ sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%' ++ tmp_drive=(hd0) ++ test 'x(hd0)' = x ++ test x '!=' x ++ echo '(hd0)' + install_drive=(hd0) + test 'x(hd0)' = x ++ find_device /boot +++ df /boot/ +++ sed -n 's%.*\(/dev/[^ ]*\).*%\1%p' ++ tmp_fname=/dev/hde1 ++ test -z /dev/hde1 ++ test -L /dev/hde1 +++ ls -al /dev/hde1 +++ sed -n 's%.*- %\1%p' sed: -e udtryk nr. 1, tegn 12: Ugyldig reference \1 p? 's'-kommandos h?jreside ++ tmp_new_fname= ++ test -z '' ++ echo 'Unrecognized ls output' ++ exit 1 + root_device=Unrecognized ls output ++ find_device /boot/boot +++ df /boot/boot/ +++ sed -n 's%.*\(/dev/[^ ]*\).*%\1%p' ++ tmp_fname=/dev/hde1 ++ test -z /dev/hde1 ++ test -L /dev/hde1 +++ ls -al /dev/hde1 +++ sed -n 's%.*- %\1%p' sed: -e udtryk nr. 1, tegn 12: Ugyldig reference \1 p? 's'-kommandos h?jreside ++ tmp_new_fname= ++ test -z '' ++ echo 'Unrecognized ls output' ++ exit 1 + bootdir_device=Unrecognized ls output + test 'xUnrecognized ls output' '!=' 'xUnrecognized ls output' ++ convert 'Unrecognized ls output' ++ test -e 'Unrecognized ls output' ++ echo 'Unrecognized ls output: Not found or not a block device.' Unrecognized ls output: Not found or not a block device. ++ exit 1 + root_drive= + test x = x + exit 1 - End forwarded message - -- Jason Thomas Phone: +61 2 6257 7111 Unix System Administrator Fax:+61 2 6257 7311 tSA Consulting Group Pty. Ltd. Mobile: 0418 29 66 81 1 Hall Street Lyneham ACT 2602 http://www.topic.com.au/ ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
Re: [schizo@debian.org: Re: sed or grub-install bug?]
On Tue, 2003-02-18 at 22:20, Yoshinori K. Okuji wrote: At Wed, 19 Feb 2003 10:29:59 +1100, Jason Thomas wrote: +++ sed -n 's%.*- %\1%p' It's a grub bug. The offending line is: tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*- %\1%p'` I believe that this should be tmp_new_fname=`readlink $tmp_fname` So, what is the bug? Generally speaking, if you don't tell me what wrong thing happens actually, I wouldn't change anything. I'm guessing that something changed in ls's output so that that sed expression won't work on the output of ls anymore. Sadly, I don't think that readlink is a standard command you can count on the existence of :/ Jeremy ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
Re: [l.laursen@stofanet.dk: Re: sed or grub-install bug?]
Ok. Does this patch fix the bug? Index: util/grub-install.in === RCS file: /cvsroot/grub/grub/util/grub-install.in,v retrieving revision 1.37 diff -u -r1.37 grub-install.in --- util/grub-install.in20 May 2002 11:48:03 - 1.37 +++ util/grub-install.in19 Feb 2003 05:01:45 - @@ -193,7 +193,7 @@ # Resolve symlinks while test -L $tmp_fname; do - tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*- %\1%p'` + tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*- \(.*\)%\1%p'` if test -z $tmp_new_fname; then echo Unrecognized ls output 21 exit 1 Thanks, Okuji ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub
[grub #52] GRUB Hangs, it only displays the word Grub
Reporter: [EMAIL PROTECTED] Summary: GRUB Hangs, it only displays the word Grub Version: RH 8 Type: software bug Message: I'm instaling GRUB on the MBR of the second HD (Slave), My motherboard supports booting from any device I have.(Biostar M7VIF) Grubs Starts and hangs right after displaying the word GRUB. Lilo does the same. Is it posible to boot with GRUB from a slave HD?. I have WinXP and windows 2K on the first drive. Thanks A.Garza Please send followups to [EMAIL PROTECTED]. ___ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub