bug-grub
[Top][All Lists]
Advanced

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

Re: Cross installation of GRUB


From: adrian15
Subject: Re: Cross installation of GRUB
Date: Tue, 09 May 2006 18:43:37 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Stephen Liu wrote:
Hi adrian15,

Sometimes ago I tried to install grub on USB pendrive making it
bootable.  Unfortunately the BIOS of the PC failed to find the pendrive
during booting.

Booting options on BIOS
USB HDD
USB ZIP
USB Floppy
I think you should use USB HDD. If the BIOS cannot find the pendrive I cannot help you.
# fdisk /dev/sdb (USB pendrive)
If it was a normal fat pendrive you did not need to format it.
# mount /dev/sdb1 /mnt/
# mkdir /mnt/boot
# mkdir /mnt/boot/grub
# cp /boot/grub/stage1 /mnt/boot/grub/
# cp /boot/grub/stage2 /mnt/boot/grub/
# cp /boot/grub/grub.conf /mnt/boot/grub/menu.lst
In this step I will also copy the *stage1_5 files although it is not compulsory for the pendrive to boot it is very useful as a backup.
# ls -l /mnt/boot/grub/
total 120
-rwxr-xr-x 1 root root    753 May  8 22:26 menu.lst
-rwxr-xr-x 1 root root    512 May  8 22:24 stage1
-rwxr-xr-x 1 root root 102332 May  8 22:24 stage2

# cat /mnt/boot/grub/menu.lst
# grub.conf generated by anaconda

At this juncture I have no idea how to edit this file. Please advise. TIA
Look at the bottom of this email.


# echo abc > /mnt/myusb
# cd /mnt/
Before executing grub is very recomendable to umount the usb-harddisk/pendrive. Because the changes that grub makes
to the pendrive may be lost.

# grub
Probing devices to guess BIOS drives. This may take a long time.

# ls -l boot/grub/
total 120
-rwxr-xr-x 1 root root    753 May  8 22:26 menu.lst
-rwxr-xr-x 1 root root    512 May  8 22:24 stage1
-rwxr-xr-x 1 root root 102332 May  8 22:24 stage2

Where is /boot/grub/grub.conf ?
grub.conf is a link and link do not exist in fat systems. It's fine if you only have the menu.lst file.
Is there any change made after running "setup (hd1,0)"?
Well... Yes. There's a change. THERE'S A BIG CHANGE! You loose all the data of this partition and the ability of writing data to it. Because it is FAT partition and grub should not be installed into this FAT "boot sectors".

Reread my howto and you will see that in this step it is read:
setup (hd1) and not setup (hd1,0).

So... rerun fdisk and the format commands... and run setup (hd0) in this step.

Once you think you're done. You can test if the pendrive boots with qemu.

qemu -boot c -hda /dev/sdb

And then reboot and see if your bios can see it or not.


==========

About the menu.lst... what do you want to do when you do boot it? Nothing? Do not put a menu.lst! If you want to boot your current hard disk. You should edit the menu.lst so that former references to your current hard disk (hd0) are renamed to (hd1).

And all the references to the usb hard disk, such as the splashimage file, which YOU SHOULD ALSO COPY IF YOU DO NOT DELETE ITS LINE IN MENU.LST, should begin with (hd0) instead of (hd1).



adrian15




reply via email to

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